projects/linux·commit 0af4c8be

pNFS: Remove unwanted optimisation of layoutget

0af4c8be · Trond Myklebust <[email protected]> · 2018-08-21 10:25:34 -04:00

If we knew that the file was empty, we wouldn't be asking for a layout.
Any optimisation here is already done before calling pnfs_update_layout().
As it stands, we sometimes end up doing an unnecessary inband read to
the MDS even when holding a layout.

Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
Commit
0af4c8be97a14d1df8a78b4993a09e8dff545a18
Parents
1c1aeaf1

Changes

1 files changed · +0 −6

FileStatusAddDelContent
fs/nfs/pnfs.cmodified+0−6View file

fs/nfs/pnfs.c

View file
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e11e666..e8f232d 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1823,12 +1823,6 @@ pnfs_update_layout(struct inode *ino,
goto out;
}
- if (iomode == IOMODE_READ && i_size_read(ino) == 0) {
- trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
- PNFS_UPDATE_LAYOUT_RD_ZEROLEN);
- goto out;
- }
-
if (pnfs_within_mdsthreshold(ctx, ino, iomode)) {
trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
PNFS_UPDATE_LAYOUT_MDSTHRESH);