Re: [PATCH] NFSv4.1/pnfs: Fix a close/delegreturn hang when return-on-close is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Aug 18, 2015 at 9:36 PM, Trond Myklebust
<trond.myklebust@xxxxxxxxxxxxxxx> wrote:
> The helper pnfs_roc() has already verified that we have no delegations,
> and no further open files, hence no outstanding I/O and it has marked
> all the return-on-close lsegs as being invalid.
> Furthermore, it sets the NFS_LAYOUT_RETURN bit, thus serialising the
> close/delegreturn with all future layoutget calls on this inode.
>
> The checks in pnfs_roc_drain() for valid layout segments are therefore
> redundant: those cannot exist until another layoutget completes.
> The other check for whether or not NFS_LAYOUT_RETURN is set, actually
> causes a hang, since we already know that we hold that flag.
>
> To fix, we therefore strip out all the functionality in pnfs_roc_drain()
> except the retrieval of the barrier state, and then rename the function
> accordingly.
>
> Reported-by: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Fixes: 5c4a79fb2b1c ("Don't prevent layoutgets when doing return-on-close")
> Signed-off-by: Trond Myklebust <trond.myklebust@xxxxxxxxxxxxxxx>
> ---
>  fs/nfs/nfs4proc.c | 12 ++++--------
>  fs/nfs/pnfs.c     | 24 +-----------------------
>  fs/nfs/pnfs.h     |  7 +++----
>  3 files changed, 8 insertions(+), 35 deletions(-)

Hi Christoph,

Can you please check if this patch fixes the hang you're seeing?

Cheers,
  Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux