nfs patch for NetApp snapshot

I Lee Hetherington (ilh@sls.lcs.mit.edu)
Fri, 18 Dec 1998 15:01:39 -0500


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

Can someone comment on the attached patch?

Basically, 2.1.131 works fine with .snapshot directories at the mount
point, but not in subdirectories. My patch removes the test
IS_ROOT(...). With the patch, subdirectories seem to work fine.

Why is the IS_ROOT(...) there at all?

--Lee Hetherington

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

--- fs/nfs/inode.c.orig Fri Dec 18 13:17:42 1998
+++ fs/nfs/inode.c Fri Dec 18 13:56:44 1998
@@ -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)

--------------20AE77585B13F025256A1212--

-
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/