From: "Zi Yan" <ziy@nvidia.com>
To: "Matthew Wilcox" <willy@infradead.org>,
"Tal Zussman" <tz2294@columbia.edu>
Cc: "Ilya Dryomov" <idryomov@gmail.com>,
"Alex Markuze" <amarkuze@redhat.com>,
"Viacheslav Dubeyko" <slava@dubeyko.com>,
"Jan Kara" <jack@suse.cz>,
"Andrew Morton" <akpm@linux-foundation.org>,
"David Hildenbrand" <david@kernel.org>,
"Lorenzo Stoakes" <ljs@kernel.org>,
"Liam R. Howlett" <liam@infradead.org>,
"Vlastimil Babka" <vbabka@kernel.org>,
"Mike Rapoport" <rppt@kernel.org>,
"Suren Baghdasaryan" <surenb@google.com>,
"Michal Hocko" <mhocko@suse.com>, <ceph-devel@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <linux-fsdevel@vger.kernel.org>,
<linux-mm@kvack.org>
Subject: Re: [PATCH 1/4] ceph: add ceph_folio_snap_context()
Date: Sun, 02 Aug 2026 18:44:07 -0400 [thread overview]
Message-ID: <DKETLELGS8KI.1B0MCAPS99CXH@nvidia.com> (raw)
In-Reply-To: <am-8AaWEHm7I9b7N@casper.infradead.org>
On Sun Aug 2, 2026 at 5:52 PM EDT, Matthew Wilcox wrote:
> On Sun, Aug 02, 2026 at 12:50:02PM -0400, Tal Zussman wrote:
>> +static inline struct ceph_snap_context *ceph_folio_snap_context(struct folio *folio)
>> +{
>> + if (folio_test_private(folio))
>> + return (void *)folio->private;
>> + return NULL;
>> +}
>
> Filesystem folios _ought_to have folio->private as NULL when PG_private
> is unset and PG_private set when folio->private is non-NULL. Now, ceph
> could be doing something Bad (I believe hugetlbfs does not honour this
> for various reasons), but it looks like it's using
> folio_attach_private() / folio_detach_private() appropriately.
>
> So I think we should just do:
>
> static inline
> struct ceph_snap_context *ceph_folio_snap_context(const struct folio *folio)
> {
> return folio->private;
> }
Yes, please. So I do not need to handle another exceptional user when I
am trying to remove PG_private[1].
[1] https://lore.kernel.org/all/20260731-remove-pg_private-v1-0-142c97ba3562@nvidia.com/
>
> (folio->private is already void *, so it doesn't need to be cast).
> Splitting the definition where I did puts the unimmportant information
> (static inline) on the previous line, so somebody grepping for
> ceph_folio_snap_context gets the return type, while not breaking 80
> columns.
--
Best Regards,
Yan, Zi
next prev parent reply other threads:[~2026-08-02 22:44 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-02 16:50 [PATCH 0/4] mm, ceph: remove wait_on_page_writeback() Tal Zussman
2026-08-02 16:50 ` [PATCH 1/4] ceph: add ceph_folio_snap_context() Tal Zussman
2026-08-02 21:52 ` Matthew Wilcox
2026-08-02 22:44 ` Zi Yan [this message]
2026-08-03 10:17 ` Tal Zussman
2026-08-02 16:50 ` [PATCH 2/4] ceph: convert ceph_wait_until_current_writes_complete() to folios Tal Zussman
2026-08-02 23:22 ` Matthew Wilcox
2026-08-02 16:50 ` [PATCH 3/4] mm: remove wait_on_page_writeback() Tal Zussman
2026-08-02 23:23 ` Matthew Wilcox
2026-08-03 12:34 ` David Hildenbrand (Arm)
2026-08-02 16:50 ` [PATCH 4/4] ceph: remove page_snap_context() Tal Zussman
2026-08-03 2:06 ` Matthew Wilcox
2026-08-03 11:03 ` Tal Zussman
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=DKETLELGS8KI.1B0MCAPS99CXH@nvidia.com \
--to=ziy@nvidia.com \
--cc=akpm@linux-foundation.org \
--cc=amarkuze@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=david@kernel.org \
--cc=idryomov@gmail.com \
--cc=jack@suse.cz \
--cc=liam@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@suse.com \
--cc=rppt@kernel.org \
--cc=slava@dubeyko.com \
--cc=surenb@google.com \
--cc=tz2294@columbia.edu \
--cc=vbabka@kernel.org \
--cc=willy@infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.