CDEBUG(D_CACHE,
"PCC-RO caching for "DFID" not allowed, rc = %d\n",
PFID(ll_inode2fid(inode)), rc);
- /* Ignore EEXIST error if the file has already attached. */
- if (rc == -EEXIST)
+ /*
+ * Ignore EEXIST error if the file has already attached.
+ * Ignore EINPROGRESS error if the file is being attached,
+ * i.e. copy data from OSTs into PCC.
+ */
+ if (rc == -EEXIST || rc == -EINPROGRESS)
rc = 0;
RETURN(rc);
}
ENTRY;
pcc_inode_lock(inode);
- pcci = lli->lli_pcc_inode;
+ pcci = ll_i2pcci(inode);
if (lli->lli_pcc_state & PCC_STATE_FL_ATTACHING) {
*flags |= PCC_DETACH_FL_ATTACHING;
GOTO(out_unlock, rc = 0);
head -n 1)
stack_trap "$LCTL set_param llite.*.pcc_async_threshold=$thresh"
- $LCTL set_param llite.*.pcc_async_threshold=1G
+ $LCTL set_param llite.*.pcc_async_threshold=0
dd if=/dev/zero of=$file bs=$bs count=$count ||
error "Write $file failed"
sleep 3
cat $file || error "cat $file failed"
- check_lpcc_state $file "readonly" client
+ wait_readonly_attach_fini $file client
mtime1=$(stat -c "%Y" $file)
(( mtime0 == mtime1 )) || error "mtime changed from $mtime0 to $mtime1"
}
}
+ if (argc <= optind) {
+ fprintf(stderr, "%s: must specify one or more FIDs\n", argv[0]);
+ return CMD_HELP;
+ }
+
while (optind < argc) {
int rc2;
}
}
+ if (argc <= optind) {
+ fprintf(stderr, "%s: must specify Lustre mount point\n",
+ argv[0]);
+ return CMD_HELP;
+ }
+
mntpath = argv[optind++];
+ if (argc <= optind) {
+ fprintf(stderr, "%s: must specify one or more fids\n", argv[0]);
+ return CMD_HELP;
+ }
+
dirfd = open(mntpath, O_RDONLY);
if (dirfd < 0) {
rc = -errno;