Description: test_7 on sanity-quota.sh can't be used on separate machines
Details : add facet to handle it
+Severity : normal
+Bugzilla : 13030
+Description: "ll_intent_file_open()) lock enqueue: err: -13" with nfs
+Details : with NFS, the anon dentry's parent was set to itself in
+ d_alloc_anon(), so in MDS, we use rec->ur_fid1 to find the
+ corresponding dentry other than use rec->ur_name.
+
--------------------------------------------------------------------------------
2007-08-10 Cluster File Systems, Inc. <info@clusterfs.com>
if (rc != 0 || it_open_error(DISP_OPEN_OPEN, itp)) {
rc = rc ? rc : it_open_error(DISP_OPEN_OPEN, itp);
- CERROR("lock enqueue: err: %d\n", rc);
+ CDEBUG(D_VFSTRACE, "lock enqueue: err: %d\n", rc);
GOTO(out, rc);
}
}
/* Step 2: Lookup the child */
- dchild = ll_lookup_one_len(rec->ur_name, dparent, rec->ur_namelen - 1);
+
+ if (!(lustre_msg_get_flags(req->rq_reqmsg) & MSG_REPLAY) &&
+ (rec->ur_flags & MDS_OPEN_LOCK) && (rec->ur_namelen == 1)) {
+ /* hack for nfsd with no_subtree_check, it will use anon
+ * dentry w/o filename to open the file. the anon dentry's
+ * parent was set to itself, so rec->ur_fid1 is the file.
+ * And in MDC it cannot derive the dentry's parent dentry,
+ * hence the file's name, so we hack here in MDS,
+ * refer to bug 13030. */
+ dchild = mds_fid2dentry(mds, rec->ur_fid1, NULL);
+ } else {
+ dchild = ll_lookup_one_len(rec->ur_name, dparent,
+ rec->ur_namelen - 1);
+ }
if (IS_ERR(dchild)) {
rc = PTR_ERR(dchild);
dchild = NULL; /* don't confuse mds_finish_transno() below */