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>
- echo "Test SOM for single client muti-threaded($num) write"
+ echo "Test SOM for single client multi-threaded($num) write"
$TRUNCATE $DIR/$tfile 0
for ((i = 0; i < $num; i++)); do
$MULTIOP $DIR/$tfile Oz${offset}w${bs}c &
$TRUNCATE $DIR/$tfile 0
for ((i = 0; i < $num; i++)); do
$MULTIOP $DIR/$tfile Oz${offset}w${bs}c &
- echo "Test SOM for muti-client ($num) writes"
+ echo "Test SOM for multi-client ($num) writes"
$TRUNCATE $DIR/$tfile 0
for client in ${CLIENTS//,/ }; do
do_node $client $MULTIOP $DIR/$tfile Oz${offset}w${bs}c &
$TRUNCATE $DIR/$tfile 0
for client in ${CLIENTS//,/ }; do
do_node $client $MULTIOP $DIR/$tfile Oz${offset}w${bs}c &
- echo "Test SOM for muti-client ($num) writes"
+ echo "Test SOM for multi-client ($num) writes"
touch $DIR/$tfile || error "touch $tfile failed"
$TRUNCATE $DIR/$tfile 0
for client in ${CLIENTS//,/ }; do
touch $DIR/$tfile || error "touch $tfile failed"
$TRUNCATE $DIR/$tfile 0
for client in ${CLIENTS//,/ }; do
#include <libcfs/util/list.h>
#include <libcfs/util/parser.h>
#include <libcfs/util/list.h>
#include <libcfs/util/parser.h>
-#ifndef PATH_MAX
-#define PATH_MAX (4096)
-#endif
-
#define container_of(ptr, type, member) ({ \
const typeof(((type *) 0)->member) * __mptr = (ptr); \
(type *) ((char *) __mptr - offsetof(type, member)); })
#define container_of(ptr, type, member) ({ \
const typeof(((type *) 0)->member) * __mptr = (ptr); \
(type *) ((char *) __mptr - offsetof(type, member)); })