superblock: mask getattr requests with supported_attrs
on creation of a new superblock, construct a bitmap for the default attribute mask to be used for GETATTR and READDIR requests on that filesystem. mask out any unsupported attributes, and store the bitmap in the field nfs41_superblock.default_getattr replaced function init_getattr_request() with nfs41_superblock_getattr_mask(), which returns a copy of superblock->default_getattr removed the locking in nfs41_superblock_supported_attrs() and nfs41_superblock_supported_attrs_exclcreat(), as the supported_attrs and suppattr_exclcreat fields are read-only after the superblock is first initialized. also factored out their common code into a bitmap_intersect() function in util.h Signed-off-by: Casey Bodley <cbodley@citi.umich.edu>
This commit is contained in:
parent
b955b6d3fe
commit
c59124dd20
9 changed files with 65 additions and 71 deletions
|
|
@ -490,7 +490,7 @@ static int handle_readdir(nfs41_upcall *upcall)
|
|||
fetch_entries:
|
||||
entry_buf_len = max_buf_len;
|
||||
|
||||
init_getattr_request(&attr_request);
|
||||
nfs41_superblock_getattr_mask(state->file.fh.superblock, &attr_request);
|
||||
attr_request.arr[0] |= FATTR4_WORD0_RDATTR_ERROR;
|
||||
|
||||
if (strchr(args->filter, FILTER_STAR) || strchr(args->filter, FILTER_QM)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue