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] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMjtvLkHQ8sZ/CPS@casper.infradead.org>
Date:   Tue, 15 Jun 2021 19:13:16 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Christoph Hellwig <hch@....de>
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Jan Kara <jack@...e.cz>, Al Viro <viro@...iv.linux.org.uk>,
        linux-mm@...ck.org, linux-fsdevel@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 3/6] iomap: Use __set_page_dirty_nobuffers

On Tue, Jun 15, 2021 at 07:34:53PM +0200, Christoph Hellwig wrote:
> On Tue, Jun 15, 2021 at 06:32:37PM +0100, Matthew Wilcox wrote:
> > On Tue, Jun 15, 2021 at 07:19:59PM +0200, Greg Kroah-Hartman wrote:
> > > On Tue, Jun 15, 2021 at 05:23:39PM +0100, Matthew Wilcox (Oracle) wrote:
> > > Using __ functions in structures in different modules feels odd to me.
> > > Why not just have iomap_set_page_dirty be a #define to this function now
> > > if you want to do this?
> > > 
> > > Or take the __ off of the function name?
> > > 
> > > Anyway, logic here is fine, but feels odd.
> > 
> > heh, that was how I did it the first time.  Then I thought that it was
> > better to follow Christoph's patch:
> > 
> >  static const struct address_space_operations adfs_aops = {
> > +       .set_page_dirty = __set_page_dirty_buffers,
> > (etc)
> 
> Eventually everything around set_page_dirty should be changed to operate
> on folios, and that will be a good time to come up with a sane
> naming scheme without introducing extra churn.

The way it currently looks in my tree ...

set_page_dirty(page) is a thin wrapper that calls folio_mark_dirty(folio).
folio_mark_dirty() calls a_ops->dirty_folio(mapping, folio) (which
	returns bool).
__set_page_dirty_nobuffers() becomes filemap_dirty_folio()
__set_page_dirty_buffers() becomes block_dirty_folio()
__set_page_dirty_no_writeback() becomes dirty_folio_no_writeback()

Now I look at it, maybe that last should be nowb_dirty_folio().

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ