Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3ebf44902f77537b5784eb5059c2b78d8b5a920a
Commit:     3ebf44902f77537b5784eb5059c2b78d8b5a920a
Parent:     a0a24741cac414aba5918e9939afafa70c37f952
Author:     Steven Whitehouse <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 10 12:28:27 2007 +0100
Committer:  Steven Whitehouse <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 12:28:27 2007 +0100

    [GFS2] Accept old format NFS filehandles
    
    On Tue, 2007-07-10 at 10:06 +0100, Christoph Hellwig wrote:
    > > -#define GFS2_LARGE_FH_SIZE 10
    > > -
    > > -struct gfs2_fh_obj {
    > > -   struct gfs2_inum_host this;
    > > -   u32 imode;
    > > -};
    > > +#define GFS2_LARGE_FH_SIZE 8
    >
    > Because gfs2_decode_fh only accepts file handles with GFS2_LARGE_FH_SIZE
    > or GFS2_LARGE_FH_SIZE you don't accept filehandles sent out by and older
    > gfs version anymore.  Stale filehandles because of a new kernel version
    > are a big no-no, so please add back code to handle the old filehandles
    > on the decode side.
    >
    
    This should fix that problem I think since its only relating to end of
    the fh we can just ignore that field in order to accept the older
    format.
    
    Signed-off-by: Steven Whitehouse <[EMAIL PROTECTED]>
    Cc: Christoph Hellwig <[EMAIL PROTECTED]>
    Cc: Wendy Cheng <[EMAIL PROTECTED]>
---
 fs/gfs2/ops_export.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/gfs2/ops_export.c b/fs/gfs2/ops_export.c
index e317db2..99ea565 100644
--- a/fs/gfs2/ops_export.c
+++ b/fs/gfs2/ops_export.c
@@ -28,6 +28,7 @@
 
 #define GFS2_SMALL_FH_SIZE 4
 #define GFS2_LARGE_FH_SIZE 8
+#define GFS2_OLD_FH_SIZE 10
 
 static struct dentry *gfs2_decode_fh(struct super_block *sb,
                                     __u32 *p,
@@ -44,6 +45,7 @@ static struct dentry *gfs2_decode_fh(struct super_block *sb,
 
        switch (fh_len) {
        case GFS2_LARGE_FH_SIZE:
+       case GFS2_OLD_FH_SIZE:
                parent.no_formal_ino = ((u64)be32_to_cpu(fh[4])) << 32;
                parent.no_formal_ino |= be32_to_cpu(fh[5]);
                parent.no_addr = ((u64)be32_to_cpu(fh[6])) << 32;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to