Whamcloud - gitweb
LU-11696 utils: "lfs getsom" returns "24" to userspace 14/33714/2
authorQian Yingjin <qian@ddn.com>
Mon, 26 Nov 2018 02:11:06 +0000 (10:11 +0800)
committerOleg Drokin <green@whamcloud.com>
Fri, 4 Jan 2019 04:48:07 +0000 (04:48 +0000)
commit9209e0e9428b6671c6bab9f901e04fdf5b29abc5
tree045795069172238f9fad78ca853649fb3dd4f9ae
parente022922fb4a2429d0c2488a13ad8127c068aa2b8
LU-11696 utils: "lfs getsom" returns "24" to userspace

The "lfs getsom" command always returns "24" to userspace because
"rc = 24" (sizeof(struct lustre_som_attrs)) after fetching the
xattr from the kernel.
In this patch, rc is set to 0 if the lfs_getsom()->lgetxattr()
call returns a positive value.

Signed-off-by: Qian Yingjin <qian@ddn.com>
Change-Id: Ie3151f67b5ce2b5b2bc35a4b6528ba9a20a5db9f
Reviewed-on: https://review.whamcloud.com/33714
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Nunez <jnunez@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/tests/sanity.sh
lustre/utils/lfs.c
lustre/utils/llsom_sync.c