From: trondmy@kernel.org
To: linux-nfs@vger.kernel.org
Subject: [PATCH v2 4/4] NFSv4.1: Simplify layout return in pnfs_layout_process()
Date: Mon, 19 Apr 2021 10:47:59 -0400 [thread overview]
Message-ID: <20210419144759.41900-4-trondmy@kernel.org> (raw)
In-Reply-To: <20210419144759.41900-3-trondmy@kernel.org>
From: Trond Myklebust <trond.myklebust@hammerspace.com>
If the server hands us a layout that does not match the one we currently
hold, then have pnfs_mark_matching_lsegs_return() just ditch the old
layout if NFS_LSEG_LAYOUTRETURN is not set.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
---
fs/nfs/pnfs.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index f726f8b12b7e..03e0b34c4a64 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -2410,9 +2410,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
.iomode = IOMODE_ANY,
.length = NFS4_MAX_UINT64,
};
- pnfs_set_plh_return_info(lo, IOMODE_ANY, 0);
- pnfs_mark_matching_lsegs_return(lo, &lo->plh_return_segs,
- &range, 0);
+ pnfs_mark_matching_lsegs_return(lo, &free_me, &range, 0);
goto out_forget;
} else {
/* We have a completely new layout */
--
2.31.1
prev parent 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 ` [PATCH v2 3/4] NFSv4: Don't discard segments marked for return in _pnfs_return_layout() trondmy
2021-04-19 14:47 ` trondmy [this message]
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:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210419144759.41900-4-trondmy@kernel.org \
--to=trondmy@kernel.org \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* 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).