removed cwd "./" (refer to Bugzilla 14399).
* File join has been disabled in this release, refer to Bugzilla 16929.
+Severity : normal
+Bugzilla : 20122
+Description: don't panic if EPROTO was hit when reading symlink
+Details : correctly handling request reference in error cases.
+
Severity : enhancement
Bugzilla : 19856
Description: Add LustreNetLink, a kernel-userspace communcation path.
#define OBD_FAIL_MDS_LOV_PREP_CREATE 0x141
#define OBD_FAIL_MDS_REINT_DELAY 0x142
#define OBD_FAIL_MDS_OPEN_WAIT_CREATE 0x143
+#define OBD_FAIL_MDS_READLINK_EPROTO 0x144
/* CMD */
#define OBD_FAIL_MDS_IS_SUBDIR_NET 0x180
#define OBD_FAIL_PTLRPC_PAUSE_REQ 0x50a
#define OBD_FAIL_PTLRPC_PAUSE_REP 0x50c
#define OBD_FAIL_PTLRPC_IMP_DEACTIVE 0x50d
-
#define OBD_FAIL_PTLRPC_DUMP_LOG 0x50e
#define OBD_FAIL_PTLRPC_LONG_REPL_UNLINK 0x50f
#define OBD_FAIL_PTLRPC_LONG_BULK_UNLINK 0x510
/* do not return an error if we cannot cache the symlink locally */
if (lli->lli_symlink_name) {
memcpy(lli->lli_symlink_name, *symname, symlen);
- ptlrpc_req_finished (*request);
- *request = NULL;
*symname = lli->lli_symlink_name;
}
-
RETURN(0);
- failed:
- ptlrpc_req_finished (*request);
+failed:
RETURN (rc);
}
GOTO(out, rc);
rc = vfs_readlink(dentry, buffer, buflen, symname);
- ptlrpc_req_finished(request);
out:
+ ptlrpc_req_finished(request);
ll_inode_size_unlock(inode, 0);
RETURN(rc);
}
we delay request releasing until ll_put_link then. */
RETURN(request);
#else
- if (request != NULL) {
+ if (lli->lli_symlink_name == NULL) {
/* falling back to recursive follow link if the request
* needs to be cleaned up still. */
- rc = vfs_follow_link(nd, symname);
+ rc = vfs_follow_link(nd, symname);
GOTO(out, rc);
}
nd_set_link(nd, symname);
CERROR("readlink failed: %d\n", rc);
rc = -EFAULT;
} else {
+ if (OBD_FAIL_CHECK(OBD_FAIL_MDS_READLINK_EPROTO))
+ rc -= 2;
repbody->valid |= OBD_MD_LINKNAME;
repbody->eadatasize = rc;
/* NULL terminate */
}
run_test 17h "create objects: lov_free_memmd() doesn't lbug"
+test_17i() { #bug 20018
+ mkdir -p $DIR/$tdir
+ local foo=$DIR/$tdir/$tfile
+ ln -s $foo $foo || error "create symlink failed"
+#define OBD_FAIL_MDS_READLINK_EPROTO 0x143
+ do_facet mds lctl set_param fail_loc=0x80000144
+ ls -l $foo && error "error not detected"
+ return 0
+}
+run_test 17i "don't panic on short symlink"
+
test_18() {
touch $DIR/f
ls $DIR || error