Linux PCI subsystem development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Pranjal Shrivastava" <praan@google.com>
Cc: linux-rdma@vger.kernel.org, linux-pci@vger.kernel.org,
	"Jeff Layton" <jlayton@kernel.org>,
	"Anna Schumaker" <anna@kernel.org>,
	"Chuck Lever" <cel@kernel.org>
Subject: Re: [RFC PATCH v1 8/8] nfs: allow P2PDMA pages for O_DIRECT on RDMA mounts
Date: Tue, 06 Oct 2026 23:42:03 +0000	[thread overview]
Message-ID: <sashiko-outbox-162518@kernel.org> (raw)
In-Reply-To: <20261006233248.705086-9-praan@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] nfs: build failure when CONFIG_NFS_V4 is disabled due to missing pnfs_enabled_sb() stub
--

commit e7be3531eda417e46246d357bf5c813741ed9450
Author: Pranjal Shrivastava <praan@google.com>

nfs: allow P2PDMA pages for O_DIRECT on RDMA mounts

This commit passes ITER_ALLOW_P2PDMA when extracting O_DIRECT pages on mounts
that use the RDMA transport and not pNFS. The RDMA transport moves such pages
only by DMA, and fails the RPC with -EREMOTEIO if the device cannot reach them.

> diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c
> index a3c6e8f4ea06a..dbeb4f8274e3a 100644
> --- a/fs/nfs/direct.c
> +++ b/fs/nfs/direct.c
> @@ -157,14 +157,22 @@ static ssize_t nfs_direct_extract_pages(struct nfs_direct_req *dreq,
[ ... ]
>  	unsigned int npages, i;
>  	size_t pgbase;
>  
> -	result = iov_iter_extract_pages(iter, &pagevec, size, ~0U, 0, &pgbase);
> +	/* Allow P2PDMA pages only on RDMA mounts that do not use pNFS */
> +	if (server->nfs_client->cl_proto == XPRT_TRANSPORT_RDMA &&
> +	    !pnfs_enabled_sb(server))
> +		flags = ITER_ALLOW_P2PDMA;

[Severity: Low]
Will this cause a build failure when CONFIG_NFS_V4 is disabled?

The file fs/nfs/direct.c is compiled unconditionally for all NFS versions via
CONFIG_NFS_FS. However, pnfs_enabled_sb() is defined in fs/nfs/pnfs.h
exclusively inside an #if IS_ENABLED(CONFIG_NFS_V4) block:

fs/nfs/pnfs.h:pnfs_enabled_sb() {
	return nfss->pnfs_curr_ld != NULL;
}

Since there is no fallback provided in the #else block for configurations
without NFSv4, it seems any kernel configuration with CONFIG_NFS_FS=y
and CONFIG_NFS_V4=n might fail to build with an implicit function declaration.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261006233248.705086-1-praan@google.com?part=8

  reply	other threads:[~2026-10-06 23:42 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 23:32 [RFC PATCH v1 0/8] nfs: PCI P2PDMA for O_DIRECT over RDMA Pranjal Shrivastava
2026-10-06 23:32 ` [RFC PATCH v1 1/8] sunrpc: introduce XDRBUF_P2PDMA flag Pranjal Shrivastava
2026-10-06 23:41   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 2/8] sunrpc: fail only the RPC a transport refuses Pranjal Shrivastava
2026-10-06 23:41   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 3/8] xprtrdma: move P2PDMA payloads only via chunks Pranjal Shrivastava
2026-10-06 23:47   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 4/8] xprtrdma: return -EREMOTEIO on P2PDMA map failure Pranjal Shrivastava
2026-10-06 23:42   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 5/8] nfs: tag READ/WRITE RPCs carrying P2PDMA pages Pranjal Shrivastava
2026-10-06 23:45   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 6/8] nfs: refuse P2PDMA pages with krb5i and krb5p Pranjal Shrivastava
2026-10-06 23:46   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 7/8] nfs: allow LOCALIO for P2PDMA pages only as aligned direct I/O Pranjal Shrivastava
2026-10-06 23:51   ` sashiko-bot
2026-10-06 23:32 ` [RFC PATCH v1 8/8] nfs: allow P2PDMA pages for O_DIRECT on RDMA mounts Pranjal Shrivastava
2026-10-06 23:42   ` sashiko-bot [this message]
2026-10-07 21:20 ` [RFC PATCH v1 0/8] nfs: PCI P2PDMA for O_DIRECT over RDMA 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=sashiko-outbox-162518@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=anna@kernel.org \
    --cc=cel@kernel.org \
    --cc=jlayton@kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=praan@google.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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