Leftover fix since LU-10986 lfs: make lfs project tolerant errors
We should proceed other dirs if we hit errors, otherwise,
some dirtree like following will fail if aaaa not exists.
testdir/
├── subdir
│ └── 1
├── bbbb -> aaaa
└── cccc
Also remove extra error output since we have output failing
messages inside every action function.
Lustre-change: https://review.whamcloud.com/33707
Lustre-commit:
e022922fb4a2429d0c2488a13ad8127c068aa2b8
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Change-Id: I0062dbc3f4d1925c9e9e1a509ee35ac569bd9b74
Reviewed-on: https://review.whamcloud.com/34103
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Jenkins
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
" failed to get xattr for '$dir/pipe'" || return 1
#command can process further if it hit some errors
touch $dir/aaa $dir/bbb
+ mkdir $dir/subdir -p
+ touch $dir/subdir/aaa $dir/subdir/bbb
#create one invalid link file
ln -s $dir/not_exist_file $dir/ccc
local cnt=$(lfs project -r $dir 2>/dev/null | wc -l)
- [ $cnt -eq 2 ] || error "expected 2 got $cnt"
+ [ $cnt -eq 5 ] || error "expected 5 got $cnt"
cleanup_quota_test
}
}
}
- if (ret)
- fprintf(stderr, "%s: failed to handle dir '%s': %s\n",
- progname, pathname, strerror(errno));
-
closedir(dir);
return ret;
}
while (!list_empty(&head)) {
lpi = list_entry(head.next, struct lfs_project_item, lpi_list);
list_del(&lpi->lpi_list);
- if (rc == 0) {
- rc = lfs_project_handle_dir(&head, lpi->lpi_pathname,
- phc, func);
- if (!ret && rc)
- ret = rc;
- }
+ rc = lfs_project_handle_dir(&head, lpi->lpi_pathname,
+ phc, func);
+ if (!ret && rc)
+ ret = rc;
free(lpi);
}