[patch] NFS NetworkAppliance .snapshot

I Lee Hetherington (ilh@sls.lcs.mit.edu)
Tue, 05 Jan 1999 16:02:50 -0500


This is a multi-part message in MIME format.
--------------9EEDC187C8EF0C255BC5F848
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Linus,

I posted the attached one-line patch several weeks ago and have been
running it without incident. I'd like to see it make it into 2.2.

Basically, the NetworkAppliance .snapshot patch that went in somewhere
around 2.1.130 only worked (for me at least) when the .snapshot
directory was accessed from the mount point. Accessing .snapshot
directories further down in the directory caused NFS I/O errors.

My patch gets rid of the condition IS_ROOT(...) and the errors go away.
This patch is relative to 2.2.0-pre4-ac1 (or just pre4).

--Lee Hetherington

PS: Sorry, but I forgot the patch last time.

--------------9EEDC187C8EF0C255BC5F848
Content-Type: text/plain; charset=us-ascii;
name="nfs-snapshot.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="nfs-snapshot.patch"

--- linux-2.2.0-pre4-ac1/fs/nfs/inode.c Mon Dec 28 16:40:23 1998
+++ linux/fs/nfs/inode.c Sat Jan 2 10:22:29 1999
@@ -474,7 +474,7 @@
* unhashed inode to avoid aliasing problems.
*/
if ((dentry->d_parent->d_inode->u.nfs_i.flags & NFS_IS_SNAPSHOT) ||
- (IS_ROOT(dentry->d_parent) && dentry->d_name.len == 9 &&
+ (dentry->d_name.len == 9 &&
memcmp(dentry->d_name.name, ".snapshot", 9) == 0)) {
struct inode *inode = get_empty_inode();
if (!inode)

--------------9EEDC187C8EF0C255BC5F848--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/