volume: cache volume attributes on mount

struct NFS41_V_NET_ROOT_EXTENSION now stores only the FILE_FS_ATTRIBUTE_INFORMATION (without the extra buffer space for a name).  on QueryVolumeInfo() for FileFsAttributeInformation on the root directory, the FILE_FS_ATTRIBUTE_INFORMATION is copied into the output buffer, and the name is added there.  QueryVolumeInfo() only makes upcalls when FileFsAttributeInformation queries are not for the root directory

new function is_root_directory() uses the logic from Set/GetReparsePoint() to determine whether it's operating on the root directory

moved logic from volume.c:handle_volume_attributes() to superblock.c:nfs41_superblock_fs_attributes().  the mount downcall copies the FILE_FS_ATTRIBUTE_INFORMATION buffer down to the driver.  the driver reads this buffer directly into VNetRootContext->FsAttrs

Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
Casey Bodley 2012-04-10 12:05:43 -04:00 committed by unknown
parent 4c8c263b49
commit 2baeeb855b
6 changed files with 94 additions and 78 deletions

View file

@ -443,6 +443,11 @@ static __inline void nfs41_superblock_supported_attrs_exclcreat(
bitmap_intersect(attrs, &superblock->suppattr_exclcreat);
}
struct _FILE_FS_ATTRIBUTE_INFORMATION;
void nfs41_superblock_fs_attributes(
IN const nfs41_superblock *superblock,
OUT struct _FILE_FS_ATTRIBUTE_INFORMATION *FsAttrs);
void nfs41_superblock_space_changed(
IN nfs41_superblock *superblock);