Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Entity 'nbsp' not defined in Entity, line: 60 in /srv/lkml.org/scripts/getmail.php on line 208
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Entity 'nbsp' not defined in Entity, line: 60 in /srv/lkml.org/scripts/getmail.php on line 208
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: error parsing attribute name in Entity, line: 60 in /srv/lkml.org/scripts/getmail.php on line 208
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: attributes construct error in Entity, line: 60 in /srv/lkml.org/scripts/getmail.php on line 208
Warning: DOMDocument::loadXML() [function.DOMDocument-loadXML]: Couldn't find end of Start Tag Trond.Myklebust line 60 in Entity, line: 60 in /srv/lkml.org/scripts/getmail.php on line 208
Warning: XSLTProcessor::transformToXml() expects parameter 1 to be object, boolean given in /srv/lkml.org/scripts/getmail.php on line 211
This message generated a parse failure. Raw output follows here. Please use 'back' to navigate.
From devnull@lkml.org Wed Dec 3 06:03:58 2008
Delivery-date: Tue, 05 Sep 2006 04:57:50 +0000
Received: (majordomo@vger.kernel.org) by vger.kernel.org id S965153AbWIEE5S (ORCPT ); Tue, 5 Sep 2006 00:57:18 -0400
Received: from pat.uio.no ([129.240.10.4]:12711 "EHLO pat.uio.no") by vger.kernel.org with ESMTP id S965149AbWIEE5Q (ORCPT ); Tue, 5 Sep 2006 00:57:16 -0400
Received: from mail-mx1.uio.no ([129.240.10.29]) by pat.uio.no with esmtp (Exim 4.43) id 1GKSzl-0004PY-Je; Tue, 05 Sep 2006 06:57:09 +0200
Received: from nat-198-95-226-230.netapp.com ([198.95.226.230] helo=[10.58.52.225]) by mail-mx1.uio.no with esmtpsa (SSLv3:RC4-MD5:128) (Exim 4.43) id 1GKSzi-0001ei-Fx; Tue, 05 Sep 2006 06:57:07 +0200
Subject: Re: [PATCH 0/7] Permit filesystem local caching and NFS superblock sharing [try #13]
From: Trond Myklebust
To: Ian Kent
Cc: David Howells , Andrew Morton , torvalds@osdl.org, steved@redhat.com, linux-fsdevel@vger.kernel.org, linux-cachefs@redhat.com, nfsv4@linux-nfs.org, linux-kernel@vger.kernel.org
In-Reply-To: <1157429219.3915.11.camel@raven.themaw.net>
References: <20060901195009.187af603.akpm@osdl.org> <20060831102127.8fb9a24b.akpm@osdl.org> <20060830135503.98f57ff3.akpm@osdl.org> <20060830125239.6504d71a.akpm@osdl.org> <20060830193153.12446.24095.stgit@warthog.cambridge.redhat.com> <27414.1156970238@warthog
Content-Type: multipart/mixed; boundary="=-EYvKbG5nnZ2BULxojOOW"
Date: Tue, 05 Sep 2006 00:57:01 -0400
Message-Id: <1157432221.32412.41.camel@localhost>
Mime-Version: 1.0
X-Mailer: Evolution 2.6.1
X-UiO-Spam-info: not spam, SpamAssassin (score=-3.183, required 12, autolearn=disabled, AWL 1.82, UIO_MAIL_IS_INTERNAL -5.00)
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
X-Mailing-List: linux-kernel@vger.kernel.org
--=-EYvKbG5nnZ2BULxojOOW
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Tue, 2006-09-05 at 12:06 +0800, Ian Kent wrote:
> > One way to fix this is to simply not hash the dentry when we're doing
> > the O_EXCL intent optimisation, but rather to only hash it _after_ we've
> > successfully created the file on the server. Something like the attached
> > patch ought to do it.
>
> No.
>
> This patch simply marks the dentry negative and returns ENOMEM from the
> lookup which, as would be expected, results in this error being returned
> to userspace.
Oops. You are right. I forgot to set res=NULL...
--=-EYvKbG5nnZ2BULxojOOW
Content-Disposition: inline; filename=linux-2.6.18-063-fix_exclusive_create.dif
Content-Type: message/rfc822; name=linux-2.6.18-063-fix_exclusive_create.dif
From: Trond Myklebust
Date:
NFS: nfs_lookup - don't hash dentry when optimising away the lookup
Subject: No Subject
Message-Id: <1157432220.32412.40.camel@localhost>
Mime-Version: 1.0
Content-Transfer-Encoding: 7bit
Signed-off-by: Trond Myklebust
---
fs/nfs/dir.c | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 51328ae..3419c2d 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -904,9 +904,15 @@ static struct dentry *nfs_lookup(struct
lock_kernel();
- /* If we're doing an exclusive create, optimize away the lookup */
- if (nfs_is_exclusive_create(dir, nd))
- goto no_entry;
+ /*
+ * If we're doing an exclusive create, optimize away the lookup
+ * but don't hash the dentry.
+ */
+ if (nfs_is_exclusive_create(dir, nd)) {
+ d_instantiate(dentry, NULL);
+ res = NULL;
+ goto out_unlock;
+ }
error = NFS_PROTO(dir)->lookup(dir, &dentry->d_name, &fhandle, &fattr);
if (error == -ENOENT)
@@ -1161,6 +1167,8 @@ int nfs_instantiate(struct dentry *dentr
if (IS_ERR(inode))
return error;
d_instantiate(dentry, inode);
+ if (d_unhashed(dentry))
+ d_rehash(dentry);
return 0;
}
--=-EYvKbG5nnZ2BULxojOOW--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/