Linux block layer
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Bart Van Assche <bvanassche@acm.org>
Cc: Nilay Vaish <nilayvaish@google.com>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org
Subject: Re: [PATCH] null_blk: use page_private() accessors
Date: Tue, 24 Nov 2026 20:54:16 -0800	[thread overview]
Message-ID: <awZp-Ka34pBMWIpH@infradead.org> (raw)
In-Reply-To: <5bc4f7fb-9ce7-4cd6-829c-c178ad884843@acm.org>

On Tue, Nov 24, 2026 at 10:52:34AM -0800, Bart Van Assche wrote:
> On 11/23/26 7:36 PM, Nilay Vaish wrote:
> > Use page_private() and set_page_private() instead, like the rest of the
> > kernel, so that the driver no longer depends on where struct page keeps
> > the field.
> 
> Has it been considered to store the page index in struct nullb_page
> instead of in page->private? That would remove the dependency of this
> driver on page->private entirely, which seems more future-proof given
> the memdesc work.

I don't even see why the index is needed at all.  At best it is to
work around the somewhat weird radix_tree_gang_lookup API.

So unless there is an urgent need to remove ->private ASAP to unblock
other word, I'd suggest to do this properly:

 1) convert the pages lookup from radix to an xarray, where the
    iteration returns you the index
 2) remove storing the index in the page entirely


      reply	other threads:[~2026-11-25  4:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  3:36 [PATCH] null_blk: use page_private() accessors Nilay Vaish
2026-11-24 18:52 ` Bart Van Assche
2026-11-25  4:54   ` Christoph Hellwig [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=awZp-Ka34pBMWIpH@infradead.org \
    --to=hch@infradead.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=linux-block@vger.kernel.org \
    --cc=nilayvaish@google.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