Skip to content

Commit 0af4c8b

Browse files
trondmyamschuma-ntap
authored andcommitted
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>
1 parent 1c1aeaf commit 0af4c8b

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

fs/nfs/pnfs.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1823,12 +1823,6 @@ pnfs_update_layout(struct inode *ino,
18231823
goto out;
18241824
}
18251825

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-
18321826
if (pnfs_within_mdsthreshold(ctx, ino, iomode)) {
18331827
trace_pnfs_update_layout(ino, pos, count, iomode, lo, lseg,
18341828
PNFS_UPDATE_LAYOUT_MDSTHRESH);

0 commit comments

Comments
 (0)