open_by_handle_at() cannot open file after drop_caches

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When I tested xfstest/generic/426 with NFSv4.0, it failed..

The test steps are as follows:

1. Use name_to_handle_at() to change the filename to filehandle.

2. Execute "echo 3 > /proc/sys/vm/drop_caches".

3. Use open_by_handle_at() to open files with the filehandle created bystep 1.

Step 3 calls nfs_fh_to_dentry() to convert the filehandle to dentry.

But because the inode and dentry cache information was deleted in step 2, a new inode is generated using the nfs_fhget().

And then a new dentry is generated using the d_obtain_alias().

However, during the call to the d_obtain_alias() function, the d_iname of the dentry is assigned the slash_name"/".

Nfsd will check the dentry's d_iname, when open claim type is NFS4_OPEN_CLAIM_NULL.

So when dentry's d_inameis "/", it fails with the error "nfserr_badname"

So I want to know why the newly created dentry is named "/",

and when using open_by_handle_at() to open a file, is it possible to set the claim type to NFS4_OPEN_CLAIM_PREVIOUS ?


Thanks,

cuiyue






[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux