archive mirror
 help / color / mirror / Atom feed
Subject: [PATCH v2 3/4] NFSv4: Don't discard segments marked for return in _pnfs_return_layout()
Date: Mon, 19 Apr 2021 10:47:58 -0400	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

From: Trond Myklebust <>

If the pNFS layout segment is marked with the NFS_LSEG_LAYOUTRETURN
flag, then the assumption is that it has some reporting requirement
to perform through a layoutreturn (e.g. flexfiles layout stats or error

Fixes: 6d597e175012 ("pnfs: only tear down lsegs that precede seqid in LAYOUTRETURN args")
Signed-off-by: Trond Myklebust <>
 fs/nfs/pnfs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index 33574f47601f..f726f8b12b7e 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1344,7 +1344,7 @@ _pnfs_return_layout(struct inode *ino)
 	valid_layout = pnfs_layout_is_valid(lo);
 	pnfs_clear_layoutcommit(ino, &tmp_list);
-	pnfs_mark_matching_lsegs_invalid(lo, &tmp_list, NULL, 0);
+	pnfs_mark_matching_lsegs_return(lo, &tmp_list, NULL, 0);
 	if (NFS_SERVER(ino)->pnfs_curr_ld->return_range) {
 		struct pnfs_layout_range range = {

  reply	other threads:[~2021-04-19 14:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-19 14:47 [PATCH v2 1/4] NFSv4.x: Don't return NFS4ERR_NOMATCHING_LAYOUT if we're unmounting trondmy
2021-04-19 14:47 ` [PATCH v2 2/4] NFS: Don't discard pNFS layout segments that are marked for return trondmy
2021-04-19 14:47   ` trondmy [this message]
2021-04-19 14:47     ` [PATCH v2 4/4] NFSv4.1: Simplify layout return in pnfs_layout_process() trondmy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).