return TOKEN_TEST;
}
--(amin|atime|cmin|ctime|gid|group|iname|inum|links|mmin|mtime|name|path|perm|projid|size|type|uid|user)\0 {
+-(amin|atime|cmin|ctime|gid|group|iname|inum|links|mmin|mtime|name|path|perm|pool|projid|size|type|uid|user)\0 {
LF3_DEBUG("unary '%s'\n", yytext);
expr_arg_begin = lf3_arg_index;
expr_arg_end = lf3_arg_index + 2;
return lf3_fnmatch_expr(LF3_FNMATCH_CI, lf3_arg[begin + 1], "call-with-relative-path");
}
+static char *lf3_pool_expr(int begin, int end)
+{
+ assert(begin + 2 == end);
+
+ return xsprintf("(member %Q (lov-pools))", lf3_arg[begin + 1]);
+}
+
static char *lf3_exec_plus_expr(int begin, int end)
{
char *expr = NULL;
X1(type);
X1(exec);
X1(perm);
+ X1(pool);
// X1(used); TODO
X1(print);
X1(print0);
}
run_test 109 "lipe_find3 -path and -ipath do the right thing"
+test_110() {
+ local file=$MOUNT/$tfile
+ local fid
+ local pool=$TESTNAME
+
+ pool_add "$pool" || error "cannot add pool '$pool'"
+ pool_add_targets "$pool" 0 || error "cannot add OST 0 to '$pool'"
+
+ init_lipe_find3_env
+ $LFS setstripe -c1 -p "$pool" "$file"
+ echo XXX > "$file"
+ fid=$($LFS path2fid "$file")
+
+ expect1 "$fid" lipe_find3_facet mds1 -pool "$pool"
+ expect_empty lipe_find3_facet mds1 -pool ""
+ expect_empty lipe_find3_facet mds1 -pool quux
+
+ rm "$file"
+ echo XXX > "$file"
+ fid=$($LFS path2fid "$file")
+
+ expect1 "$fid" lipe_find3_facet mds1 \! -pool "$pool"
+ expect_empty lipe_find3_facet mds1 -pool ""
+
+ # We do not validate user supplied pool names in lipe_find3 or
+ # lipe_scan3. This is because it is possible for LOV xattrs to
+ # contain pool that no longer exist.
+ expect_error lipe_find3_facet mds1 -pool
+}
+run_test 110 "lipe_find3 -pool does the right thing"
+
test_130() {
local file=$MOUNT/$tfile
local xtime