aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrond Myklebust <trondmy@gmail.com>2018-08-21 10:25:34 -0400
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2018-08-21 13:39:08 -0400
commit0af4c8be97a14d1df8a78b4993a09e8dff545a18 (patch)
tree0a4917fa2cd8ea7b3ddfac84f0cc8730af19a757
parent1c1aeaf1432f51b57341741dcb76a3825d63a168 (diff)
pNFS: Remove unwanted optimisation of layoutget
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 <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r--fs/nfs/pnfs.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index e11e666ea477..e8f232de484f 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1823,12 +1823,6 @@ pnfs_update_layout(struct inode *ino,
1823 goto out; 1823 goto out;
1824 } 1824 }
1825 1825
1826 if (iomode == IOMODE_READ && i_size_read(ino) == 0) {
1827 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
1828 PNFS_UPDATE_LAYOUT_RD_ZEROLEN);
1829 goto out;
1830 }
1831
1832 if (pnfs_within_mdsthreshold(ctx, ino, iomode)) { 1826 if (pnfs_within_mdsthreshold(ctx, ino, iomode)) {
1833 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg, 1827 trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
1834 PNFS_UPDATE_LAYOUT_MDSTHRESH); 1828 PNFS_UPDATE_LAYOUT_MDSTHRESH);