lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZmMu_tnbqZtGJCsE@casper.infradead.org>
Date: Fri, 7 Jun 2024 17:02:06 +0100
From: Matthew Wilcox <willy@...radead.org>
To: Chao Yu <chao@...nel.org>
Cc: jaegeuk@...nel.org, linux-f2fs-devel@...ts.sourceforge.net,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] f2fs: get rid of buffer_head use

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.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ