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: <20200902155426.GY14765@casper.infradead.org>
Date:   Wed, 2 Sep 2020 16:54:26 +0100
From:   Matthew Wilcox <willy@...radead.org>
To:     David Howells <dhowells@...hat.com>
Cc:     linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH 3/6] mm: Push readahead_control down into
 force_page_cache_readahead() [ver #2]

On Wed, Sep 02, 2020 at 04:44:38PM +0100, David Howells wrote:
> +++ b/mm/fadvise.c
> @@ -104,7 +104,10 @@ int generic_fadvise(struct file *file, loff_t offset, loff_t len, int advice)
>  		if (!nrpages)
>  			nrpages = ~0UL;
>  
> -		force_page_cache_readahead(mapping, file, start_index, nrpages);
> +		{
> +			DEFINE_READAHEAD(rac, file, mapping, start_index);
> +			force_page_cache_readahead(&rac, nrpages);
> +		}
>  		break;

This is kind of awkward.  How about this:

static void force_page_cache_readahead(struct address_space *mapping,
		struct file *file, pgoff_t index, unsigned long nr_to_read)
{
	DEFINE_READAHEAD(rac, file, mapping, index);
	force_page_cache_ra(&rac, nr_to_read);
}

in mm/internal.h for now (and it can migrate if it needs to be somewhere else)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ