linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@kernel.org>
To: Anna Schumaker <anna.schumaker@oracle.com>
Cc: Trond Myklebust <trond.myklebust@hammerspace.com>,
	linux-nfs@vger.kernel.org, zlang@redhat.com
Subject: [PATCH v2 2/3] nfs/localio: remove alignment size checking in nfs_is_local_dio_possible
Date: Wed, 26 Nov 2025 01:01:26 -0500	[thread overview]
Message-ID: <20251126060127.67773-3-snitzer@kernel.org> (raw)
In-Reply-To: <20251126060127.67773-1-snitzer@kernel.org>

From: Mike Snitzer <snitzer@hammerspace.com>

This check to ensure dio_offset_align isn't larger than PAGE_SIZE is
no longer relevant (older iterations of NFS Direct was allocating
misaligned head and tail pages but no longer does, so this check isn't
needed).

Fixes: c817248fc831 ("nfs/localio: add proper O_DIRECT support for READ and WRITE")
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
---
 fs/nfs/localio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/nfs/localio.c b/fs/nfs/localio.c
index e30ea1c54c616..560caa2e4238f 100644
--- a/fs/nfs/localio.c
+++ b/fs/nfs/localio.c
@@ -339,8 +339,6 @@ nfs_is_local_dio_possible(struct nfs_local_kiocb *iocb, int rw,
 
 	if (unlikely(!nf_dio_mem_align || !nf_dio_offset_align))
 		return false;
-	if (unlikely(nf_dio_offset_align > PAGE_SIZE))
-		return false;
 	if (unlikely(len < nf_dio_offset_align))
 		return false;
 
-- 
2.44.0


  parent reply	other threads:[~2025-11-26  6:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-26  6:01 [for-v6.18 PATCH v2 0/3] nfs/localio: fix various new issues Mike Snitzer
2025-11-26  6:01 ` [PATCH v2 1/3] nfs/localio: fix regression due to out-of-order __put_cred Mike Snitzer
2025-11-26  6:01 ` Mike Snitzer [this message]
2025-11-26  6:01 ` [PATCH v2 3/3] nfs/localio: remove 61 byte hole from needless ____cacheline_aligned Mike Snitzer
2025-11-28 17:40 ` [for-v6.18 PATCH v2 0/3] nfs/localio: fix various new issues Zorro Lang

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=20251126060127.67773-3-snitzer@kernel.org \
    --to=snitzer@kernel.org \
    --cc=anna.schumaker@oracle.com \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@hammerspace.com \
    --cc=zlang@redhat.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;
as well as URLs for NNTP newsgroup(s).