lkml.org 
[lkml]   [2019]   [Sep]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL 5.2 47/94] pNFS/flexfiles: Don't time out requests on hard mounts
    Date
    From: Trond Myklebust <trond.myklebust@hammerspace.com>

    [ Upstream commit 7af46292dadcf8870946916f79fdddf79bd7267f ]

    If the mount is hard, we should ignore the 'io_maxretrans' module
    parameter so that we always keep retrying.

    Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    fs/nfs/flexfilelayout/flexfilelayout.c | 11 +++++++++--
    1 file changed, 9 insertions(+), 2 deletions(-)

    diff --git a/fs/nfs/flexfilelayout/flexfilelayout.c b/fs/nfs/flexfilelayout/flexfilelayout.c
    index bcff3bf5ae09e..e7d365ccc258b 100644
    --- a/fs/nfs/flexfilelayout/flexfilelayout.c
    +++ b/fs/nfs/flexfilelayout/flexfilelayout.c
    @@ -8,6 +8,7 @@
    */

    #include <linux/nfs_fs.h>
    +#include <linux/nfs_mount.h>
    #include <linux/nfs_page.h>
    #include <linux/module.h>
    #include <linux/sched/mm.h>
    @@ -928,7 +929,9 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio,
    pgm = &pgio->pg_mirrors[0];
    pgm->pg_bsize = mirror->mirror_ds->ds_versions[0].rsize;

    - pgio->pg_maxretrans = io_maxretrans;
    + if (NFS_SERVER(pgio->pg_inode)->flags &
    + (NFS_MOUNT_SOFT|NFS_MOUNT_SOFTERR))
    + pgio->pg_maxretrans = io_maxretrans;
    return;
    out_nolseg:
    if (pgio->pg_error < 0)
    @@ -936,6 +939,7 @@ ff_layout_pg_init_read(struct nfs_pageio_descriptor *pgio,
    out_mds:
    pnfs_put_lseg(pgio->pg_lseg);
    pgio->pg_lseg = NULL;
    + pgio->pg_maxretrans = 0;
    nfs_pageio_reset_read_mds(pgio);
    }

    @@ -996,12 +1000,15 @@ ff_layout_pg_init_write(struct nfs_pageio_descriptor *pgio,
    pgm->pg_bsize = mirror->mirror_ds->ds_versions[0].wsize;
    }

    - pgio->pg_maxretrans = io_maxretrans;
    + if (NFS_SERVER(pgio->pg_inode)->flags &
    + (NFS_MOUNT_SOFT|NFS_MOUNT_SOFTERR))
    + pgio->pg_maxretrans = io_maxretrans;
    return;

    out_mds:
    pnfs_put_lseg(pgio->pg_lseg);
    pgio->pg_lseg = NULL;
    + pgio->pg_maxretrans = 0;
    nfs_pageio_reset_write_mds(pgio);
    }

    --
    2.20.1
    \
     
     \ /
      Last update: 2019-09-04 18:06    [W:4.081 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site