From: Peng Tao <bergwolf@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Patrick Farrell <paf@cray.com>,
Cheng Shao <cheng_shao@xyratex.com>,
Peng Tao <bergwolf@gmail.com>,
Andreas Dilger <andreas.dilger@intel.com>
Subject: [PATCH 03/16] staging/lustre/nfs: writing to new files will return ENOENT
Date: Tue, 26 Nov 2013 10:04:57 +0800 [thread overview]
Message-ID: <1385431510-18988-4-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1385431510-18988-1-git-send-email-bergwolf@gmail.com>
From: Patrick Farrell <paf@cray.com>
This happend with SLES11SP2 Lustre client, which in turn acts as an
NFS server, exporting a subtree of an Lustre fs through NFS.
We detected that whenever we are writing to a new file using, fx,
'echo blah > newfile', it will return ENOENT error. We found
out that this was caused by the anonymous dentry. In SLESS11SP2,
anonymous dentries are assigned '/' as the name, instead of an
empty string. When MDT handles the intent_open call, it will look
up the obj by the name if it is not an empty string, and thus
couldn't find it.
As MDS_OPEN_BY_FID is always set on this request, we never need
to send the name in this request. The fid is already available
and should be used in case the file has been renamed.
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3544
Lustre-change: http://review.whamcloud.com/6920
Signed-off-by: Cheng Shao <cheng_shao@xyratex.com>
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Peng Tao <bergwolf@gmail.com>
Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
---
drivers/staging/lustre/lustre/llite/file.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
index 82248e9..f36c5d8 100644
--- a/drivers/staging/lustre/lustre/llite/file.c
+++ b/drivers/staging/lustre/lustre/llite/file.c
@@ -368,8 +368,6 @@ static int ll_intent_file_open(struct file *file, void *lmm,
{
struct ll_sb_info *sbi = ll_i2sbi(file->f_dentry->d_inode);
struct dentry *parent = file->f_dentry->d_parent;
- const char *name = file->f_dentry->d_name.name;
- const int len = file->f_dentry->d_name.len;
struct md_op_data *op_data;
struct ptlrpc_request *req;
__u32 opc = LUSTRE_OPC_ANY;
@@ -394,8 +392,9 @@ static int ll_intent_file_open(struct file *file, void *lmm,
}
op_data = ll_prep_md_op_data(NULL, parent->d_inode,
- file->f_dentry->d_inode, name, len,
+ file->f_dentry->d_inode, NULL, 0,
O_RDWR, opc, NULL);
+
if (IS_ERR(op_data))
return PTR_ERR(op_data);
--
1.7.9.5
next prev parent reply other threads:[~2013-11-26 2:05 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-26 2:04 [PATCH 00/16] staging/lustre: sync with external tree, set 2 Peng Tao
2013-11-26 2:04 ` [PATCH 01/16] staging/lustre/server: use unified request handler for MGS Peng Tao
2013-11-26 2:04 ` [PATCH 02/16] staging/lustre/llog: MGC to use OSD API for backup logs Peng Tao
2013-11-26 3:14 ` Greg Kroah-Hartman
2013-11-26 3:25 ` Peng Tao
2013-11-26 3:34 ` Greg Kroah-Hartman
2013-11-26 4:05 ` Peng Tao
2013-11-26 2:04 ` Peng Tao [this message]
2013-11-26 6:45 ` [PATCH 03/16] staging/lustre/nfs: writing to new files will return ENOENT Patrick Farrell
2013-11-26 14:09 ` Peng Tao
2013-11-26 2:04 ` [PATCH 04/16] staging/lustre/ptlrpc: Fix race during exp_flock_hash creation Peng Tao
2013-11-26 2:04 ` [PATCH 05/16] staging/lustre/mdc: prevent fall through in mdc_iocontrol() Peng Tao
2013-11-26 2:05 ` [PATCH 06/16] staging/lustre/lu: shrink lu_object by 8 bytes on x86_64 Peng Tao
2013-11-26 2:05 ` [PATCH 07/16] staging/lustre/mdt: HSM coordinator client interface Peng Tao
2013-11-26 2:05 ` [PATCH 08/16] staging/lustre/mdt: HSM coordinator agent interface Peng Tao
2013-11-26 3:30 ` Greg Kroah-Hartman
2013-11-26 4:09 ` Peng Tao
2013-11-26 2:05 ` [PATCH 09/16] staging/lustre/scrub: OI scrub on OST Peng Tao
2013-11-26 2:05 ` [PATCH 10/16] staging/lustre/scrub: control OI scrub on OST from user space Peng Tao
2013-11-26 2:05 ` [PATCH 11/16] staging/lustre/llite: don't check for O_CREAT in it_create_mode Peng Tao
2013-11-26 2:05 ` [PATCH 12/16] staging/lustre/build: clean up unused variables and dead code Peng Tao
2013-11-26 2:05 ` [PATCH 13/16] staging/lustre/build: fix compilation issue with is_compat_task Peng Tao
2013-11-26 2:05 ` [PATCH 14/16] staging/lustre/ptlrpc: Fix a crash when dereferencing NULL pointer Peng Tao
2013-11-26 2:05 ` [PATCH 15/16] staging/lustre/hsm: Add hsm_release feature Peng Tao
2013-11-26 2:05 ` [PATCH] staging/lustre/llite: extended attribute cache Peng Tao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1385431510-18988-4-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=andreas.dilger@intel.com \
--cc=cheng_shao@xyratex.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paf@cray.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox