Whamcloud - gitweb
LU-11696 utils: "lfs getsom" returns "24" to userspace 08/34308/2
authorQian Yingjin <qian@ddn.com>
Mon, 26 Nov 2018 02:11:06 +0000 (10:11 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 19 Mar 2019 06:00:29 +0000 (06:00 +0000)
commitb426c169590b3401ecad2ea744164812ee1ef934
tree03b91135786e9b5caa06a7ac3b55917292db122e
parent97654820f8a60b1752b92b79cd6bc254a4e48958
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.

Lustre-change: https://review.whamcloud.com/33714
Lustre-commit: 9209e0e9428b6671c6bab9f901e04fdf5b29abc5

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