Whamcloud - gitweb
LU-11109 mdt: handle zero length xattr values correctly 55/32755/3
authorJohn L. Hammond <jhammond@whamcloud.com>
Mon, 2 Jul 2018 19:52:01 +0000 (14:52 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 9 Aug 2018 18:20:27 +0000 (18:20 +0000)
commit1e4164a1254d7fb75e49af73994d2e53864536ab
tree370e8576445072e00875f2fac12fae45f1dba08d
parent1c7e7d1243f78c72210a0ba3c22d5c84838a416e
LU-11109 mdt: handle zero length xattr values correctly

In mdt_getxattr(), set OBD_MD_FLXATTR in mbo_valid of the reply's MDT
body so that the client can distinguish between nonexistent extended
attributes and zero length values. In ll_xattr_list() and
ll_getxattr_common() test for OBD_MD_FLXATTR and return 0 rather than
-ENODATA in the appropriate cases. Add sanity test_102t() to test that
zero length values are handled correctly.

Signed-off-by: John L. Hammond <jhammond@whamcloud.com>
Change-Id: I15649581c26dc52e83ca714b44f8372f29954ed5
Reviewed-on: https://review.whamcloud.com/32755
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Mike Pershin <mpershin@whamcloud.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
lustre/llite/xattr.c
lustre/llite/xattr26.c
lustre/mdt/mdt_xattr.c
lustre/tests/multiop.c
lustre/tests/sanity.sh