Improved logic in ll_listxattr()
i=tom.wang
i=dmitry.zogin
sanity test_17k created
o=grev
i=dmitry.zogin
ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1);
rc = ll_getxattr_common(inode, NULL, buffer, size, OBD_MD_FLXATTRLS);
+ if (rc < 0)
+ GOTO(out, rc);
if (S_ISREG(inode->i_mode)) {
struct ll_inode_info *lli = ll_i2info(inode);
if (rc2 < 0) {
GOTO(out, rc2 = 0);
- } else {
+ } else if (S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)) {
const int prefix_len = sizeof(XATTR_LUSTRE_PREFIX) - 1;
const size_t name_len = sizeof("lov") - 1;
const size_t total_len = prefix_len + name_len + 1;
}
run_test 17i "don't panic on short symlink"
+test_17k() { #bug 22301
+ rsync --help | grep -q xattr ||
+ skip_env "$(rsync --version| head -1) does not support xattrs"
+ mkdir -p $DIR/{$tdir,$tdir.new}
+ touch $DIR/$tdir/$tfile
+ ln -s $DIR/$tdir/$tfile $DIR/$tdir/$tfile.lnk
+ rsync -av -X $DIR/$tdir/ $DIR/$tdir.new ||
+ error "rsync failed with xattrs enabled"
+}
+run_test 17k "symlinks: rsync with xattrs enabled ========================="
+
test_18() {
touch $DIR/f
ls $DIR || error