From: Matthew Wilcox <willy@infradead.org>
To: Chao Yu <chao@kernel.org>
Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org,
linux-f2fs-devel@lists.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH v2] f2fs: get rid of buffer_head use
Date: Fri, 7 Jun 2024 17:02:06 +0100 [thread overview]
Message-ID: <ZmMu_tnbqZtGJCsE@casper.infradead.org> (raw)
In-Reply-To: <e56b6166-1bb4-411a-a701-51bf452d2369@kernel.org>
On Fri, Jun 07, 2024 at 10:10:52PM +0800, Chao Yu wrote:
> On 2024/6/7 21:33, Matthew Wilcox wrote:
> > On Fri, Jun 07, 2024 at 06:18:29PM +0800, Chao Yu wrote:
> > > @@ -1990,6 +1989,12 @@ static inline struct f2fs_super_block *F2FS_RAW_SUPER(struct f2fs_sb_info *sbi)
> > > return (struct f2fs_super_block *)(sbi->raw_super);
> > > }
> > > +static inline struct f2fs_super_block *F2FS_SUPER_BLOCK(struct folio *folio)
> > > +{
> > > + return (struct f2fs_super_block *)(page_address(folio_page(folio, 0)) +
> > > + F2FS_SUPER_OFFSET);
> > > +}
> >
> > This assumes that the superblock is in the first page of the folio.
> > That's not necessarily guaranteed; let's say you have a 64KiB folio
> > that covers the start of the bdev.
>
> Oh, I missed to add large folio support in this version.
>
> For the case: page size is 4KiB, and folio size is 64KiB,
> read_mapping_folio(mapping, 0, NULL) and read_mapping_folio(mapping,
> 1, NULL) will return the same #0 folio, right?
That's right. If you want to pass a page into F2FS_SUPER_BLOCK, that
would be fine. Assuming you're not trying to support fs blocksize !=
PAGE_SIZE.
_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
prev parent reply other threads:[~2024-06-07 16:02 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-07 10:18 [f2fs-dev] [PATCH v2] f2fs: get rid of buffer_head use Chao Yu
2024-06-07 13:33 ` Matthew Wilcox
2024-06-07 14:10 ` Chao Yu
2024-06-07 16:02 ` Matthew Wilcox [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=ZmMu_tnbqZtGJCsE@casper.infradead.org \
--to=willy@infradead.org \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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 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).