ofir vainshtein has uploaded this change for review.
NFSv4: Skip getattrs in nfs4_object_type when FSAL lacks named attrs
Commit 6f6989c1fdae ("NFSv4: named attributes (OPENATTR) in the
protocol and FSAL API") added nfs4_object_type(), which calls
obj->obj_ops->getattrs(obj, ATTR_TYPE) because named attributes and
their directories store REGULAR_FILE and DIRECTORY in obj->type while
reporting EXTENDED_ATTR and ATTR_DIRECTORY via getattrs().
When the export does not support fso_named_attr (for example FSALs with
named_attr = false), obj->type is always the true object type, and the
extra getattrs() in CREATE, OPENATTR, and NVERIFY can trigger an
unnecessary backend GETATTR (e.g. when Attr_Expiration_Time = 0).
Return obj->type directly when the export does not support
fso_named_attr.
Change-Id: I15cf1d1160269e393ee59e1a4982034225d71cbe
Signed-off-by: Ofir Vainshtein <ofirvins@google.com>
---
M src/Protocols/NFS/nfs_proto_tools.c
1 file changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.gerrithub.io:29418/ffilz/nfs-ganesha refs/changes/18/1260418/1
To view, visit change 1260418. To unsubscribe, or for help writing mail filters, visit settings.