public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] don't encode parent in nfs filehandles unless nessecary
@ 2008-01-03 18:33 Christoph Hellwig
  2008-02-22  3:49 ` Christoph Hellwig
  0 siblings, 1 reply; 2+ messages in thread
From: Christoph Hellwig @ 2008-01-03 18:33 UTC (permalink / raw)
  To: xfs

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@lst.de>

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;

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] don't encode parent in nfs filehandles unless nessecary
  2008-01-03 18:33 [PATCH] don't encode parent in nfs filehandles unless nessecary Christoph Hellwig
@ 2008-02-22  3:49 ` Christoph Hellwig
  0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2008-02-22  3:49 UTC (permalink / raw)
  To: xfs

On Thu, Jan 03, 2008 at 07:33:11PM +0100, Christoph Hellwig wrote:
> 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.

ping?

> 
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> 
> 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;
---end quoted text---

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-02-22  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-03 18:33 [PATCH] don't encode parent in nfs filehandles unless nessecary Christoph Hellwig
2008-02-22  3:49 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox