linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/3] NFSv4.1/pnfs: Don't ask for a read layout for an empty file.
@ 2015-08-31  9:08 Trond Myklebust
  2015-08-31  9:08 ` [PATCH v2 2/3] NFSv4.1/pnfs: Handle LAYOUTGET return values correctly Trond Myklebust
  0 siblings, 1 reply; 3+ messages in thread
From: Trond Myklebust @ 2015-08-31  9:08 UTC (permalink / raw)
  To: linux-nfs

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
---
 fs/nfs/pnfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 4eec540de9ea..c4f918eca3d2 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1494,6 +1494,9 @@ pnfs_update_layout(struct inode *ino,
 	if (!pnfs_enabled_sb(NFS_SERVER(ino)))
 		goto out;
 
+	if (iomode == IOMODE_READ && i_size_read(ino) == 0)
+		goto out;
+
 	if (pnfs_within_mdsthreshold(ctx, ino, iomode))
 		goto out;
 
-- 
2.4.3


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

end of thread, other threads:[~2015-08-31  9:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-31  9:08 [PATCH v2 1/3] NFSv4.1/pnfs: Don't ask for a read layout for an empty file Trond Myklebust
2015-08-31  9:08 ` [PATCH v2 2/3] NFSv4.1/pnfs: Handle LAYOUTGET return values correctly Trond Myklebust
2015-08-31  9:08   ` [PATCH v2 3/3] NFSv4.1/pNFS: Don't request a minimal read layout beyond the end of file Trond Myklebust

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).