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: <20200703114437.GF25523@casper.infradead.org>
Date:   Fri, 3 Jul 2020 12:44:37 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     Andreas Gruenbacher <agruenba@...hat.com>
Cc:     Linus Torvalds <torvalds@...ux-foundation.org>,
        Dave Chinner <david@...morbit.com>,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC v2 2/2] gfs2: Rework read and page fault locking

On Fri, Jul 03, 2020 at 12:38:01PM +0100, Matthew Wilcox wrote:
> > @@ -598,16 +562,9 @@ static void gfs2_readahead(struct readahead_control *rac)
> >  {
> >  	struct inode *inode = rac->mapping->host;
> >  	struct gfs2_inode *ip = GFS2_I(inode);
> > -	struct gfs2_holder gh;
> >  
> > -	gfs2_holder_init(ip->i_gl, LM_ST_SHARED, 0, &gh);
> > -	if (gfs2_glock_nq(&gh))
> > -		goto out_uninit;
> >  	if (!gfs2_is_stuffed(ip))
> >  		mpage_readahead(rac, gfs2_block_map);
> 
> I think you probably want to make this:
> 
> 	if (i_blocksize(page->mapping->host) == PAGE_SIZE &&
> 	    !page_has_buffers(page))
> 		error = iomap_readahead(rac, &gfs2_iomap_ops);
> 	else if (!gfs2_is_stuffed(ip))
> 		error = mpage_readahead(rac, gfs2_block_map);
> 
> ... but I understand not wanting to make that change at this point
> in the release cycle.

That was stupid.  I meant to write out:

	if (i_blocksize(rac->mapping->host) == PAGE_SIZE)
		error = iomap_readahead(rac, &gfs2_iomap_ops);
	else if (!gfs2_is_stuffed(ip))
		error = mpage_readahead(rac, gfs2_block_map);

Since the pages are freshly allocated, they can't have buffers, and
the mapping comes out of the readahead_control, not from the page.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ