From: Sergey Bashirov <sergeybashirov@gmail.com>
To: Chuck Lever <chuck.lever@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
Jeff Layton <jlayton@kernel.org>, NeilBrown <neil@brown.name>,
Olga Kornievskaia <okorniev@redhat.com>,
Dai Ngo <Dai.Ngo@oracle.com>, Tom Talpey <tom@talpey.com>
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
Konstantin Evtushenko <koevtushenko@yandex.com>,
Sergey Bashirov <sergeybashirov@gmail.com>,
Christoph Hellwig <hch@lst.de>
Subject: [PATCH v2 1/3] NFSD: Minor cleanup in layoutcommit processing
Date: Tue, 15 Jul 2025 18:32:18 +0300 [thread overview]
Message-ID: <20250715153319.37428-2-sergeybashirov@gmail.com> (raw)
In-Reply-To: <20250715153319.37428-1-sergeybashirov@gmail.com>
Remove dprintk in nfsd4_layoutcommit. These are not needed
in day to day usage, and the information is also available
in Wireshark when capturing NFS traffic.
Signed-off-by: Sergey Bashirov <sergeybashirov@gmail.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
---
fs/nfsd/nfs4proc.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c
index 85ee486ce0caa..656b2e7d88407 100644
--- a/fs/nfsd/nfs4proc.c
+++ b/fs/nfsd/nfs4proc.c
@@ -2492,18 +2492,12 @@ nfsd4_layoutcommit(struct svc_rqst *rqstp,
inode = d_inode(current_fh->fh_dentry);
nfserr = nfserr_inval;
- if (new_size <= seg->offset) {
- dprintk("pnfsd: last write before layout segment\n");
+ if (new_size <= seg->offset)
goto out;
- }
- if (new_size > seg->offset + seg->length) {
- dprintk("pnfsd: last write beyond layout segment\n");
+ if (new_size > seg->offset + seg->length)
goto out;
- }
- if (!lcp->lc_newoffset && new_size > i_size_read(inode)) {
- dprintk("pnfsd: layoutcommit beyond EOF\n");
+ if (!lcp->lc_newoffset && new_size > i_size_read(inode))
goto out;
- }
nfserr = nfsd4_preprocess_layout_stateid(rqstp, cstate, &lcp->lc_sid,
false, lcp->lc_layout_type,
--
2.43.0
next prev parent reply other threads:[~2025-07-15 15:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-15 15:32 [PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit Sergey Bashirov
2025-07-15 15:32 ` Sergey Bashirov [this message]
2025-07-15 15:32 ` [PATCH v2 2/3] " Sergey Bashirov
2025-07-16 11:16 ` Christoph Hellwig
2025-07-15 15:32 ` [PATCH v2 3/3] NFSD: Minor cleanup in layoutcommit decoding Sergey Bashirov
2025-07-16 11:16 ` Christoph Hellwig
2025-07-15 16:11 ` [PATCH v2 0/3] NFSD: Fix last write offset handling in layoutcommit Chuck Lever
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=20250715153319.37428-2-sergeybashirov@gmail.com \
--to=sergeybashirov@gmail.com \
--cc=Dai.Ngo@oracle.com \
--cc=chuck.lever@oracle.com \
--cc=hch@infradead.org \
--cc=hch@lst.de \
--cc=jlayton@kernel.org \
--cc=koevtushenko@yandex.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neil@brown.name \
--cc=okorniev@redhat.com \
--cc=tom@talpey.com \
/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