xfs
[Top] [All Lists]

[PATCH] don't encode parent in nfs filehandles unless nessecary

To: xfs@xxxxxxxxxxx
Subject: [PATCH] don't encode parent in nfs filehandles unless nessecary
From: Christoph Hellwig <hch@xxxxxx>
Date: Thu, 3 Jan 2008 19:33:12 +0100
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.3.28i
As Dave pointed out after the export ops changes we now always encode
the parent into the filehandle for regular files, but it's not actually
needed when the filesystem is export with no_subtree_check.  This
one-liner fixes xfs_fs_encode_fh to skip encoding the parent unless
nessecary.


Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Index: linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c
===================================================================
--- linux-2.6-xfs.orig/fs/xfs/linux-2.6/xfs_export.c    2008-01-02 
17:02:48.000000000 +0100
+++ linux-2.6-xfs/fs/xfs/linux-2.6/xfs_export.c 2008-01-03 19:30:51.000000000 
+0100
@@ -66,7 +66,7 @@ xfs_fs_encode_fh(
        int                     len;
 
        /* Directories don't need their parent encoded, they have ".." */
-       if (S_ISDIR(inode->i_mode))
+       if (S_ISDIR(inode->i_mode) || !connectable)
                fileid_type = FILEID_INO32_GEN;
        else
                fileid_type = FILEID_INO32_GEN_PARENT;


<Prev in Thread] Current Thread [Next in Thread>
  • [PATCH] don't encode parent in nfs filehandles unless nessecary, Christoph Hellwig <=