nfs4: Get correct change value for attribute directories
This commit is contained in:
@@ -179,7 +179,7 @@ status_t
|
|||||||
DirectoryCache::Revalidate()
|
DirectoryCache::Revalidate()
|
||||||
{
|
{
|
||||||
uint64 change;
|
uint64 change;
|
||||||
if (fInode->GetChangeInfo(&change) == B_OK && change == fChange) {
|
if (fInode->GetChangeInfo(&change, true) == B_OK && change == fChange) {
|
||||||
fExpireTime = system_time() + kExpirationTime;
|
fExpireTime = system_time() + kExpirationTime;
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,14 +14,17 @@
|
|||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
NFS4Inode::GetChangeInfo(uint64* change)
|
NFS4Inode::GetChangeInfo(uint64* change, bool attrDir)
|
||||||
{
|
{
|
||||||
do {
|
do {
|
||||||
RPC::Server* serv = fFileSystem->Server();
|
RPC::Server* serv = fFileSystem->Server();
|
||||||
Request request(serv);
|
Request request(serv);
|
||||||
RequestBuilder& req = request.Builder();
|
RequestBuilder& req = request.Builder();
|
||||||
|
|
||||||
req.PutFH(fInfo.fHandle);
|
if (attrDir)
|
||||||
|
req.PutFH(fInfo.fAttrDir);
|
||||||
|
else
|
||||||
|
req.PutFH(fInfo.fHandle);
|
||||||
|
|
||||||
Attribute attr[] = { FATTR4_CHANGE };
|
Attribute attr[] = { FATTR4_CHANGE };
|
||||||
req.GetAttr(attr, sizeof(attr) / sizeof(Attribute));
|
req.GetAttr(attr, sizeof(attr) / sizeof(Attribute));
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
class NFS4Inode : protected NFS4Object {
|
class NFS4Inode : protected NFS4Object {
|
||||||
public:
|
public:
|
||||||
status_t GetChangeInfo(uint64* change);
|
status_t GetChangeInfo(uint64* change, bool attrDir = false);
|
||||||
status_t ReadLink(void* buffer, size_t* length);
|
status_t ReadLink(void* buffer, size_t* length);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|||||||
Reference in New Issue
Block a user