public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: xfs@oss.sgi.com
Subject: [PATCH] don't encode parent in nfs filehandles unless nessecary
Date: Thu, 3 Jan 2008 19:33:12 +0100	[thread overview]
Message-ID: <20080103183311.GA23209@lst.de> (raw)

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;

             reply	other threads:[~2008-01-03 18:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-03 18:33 Christoph Hellwig [this message]
2008-02-22  3:49 ` [PATCH] don't encode parent in nfs filehandles unless nessecary Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080103183311.GA23209@lst.de \
    --to=hch@lst.de \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox