On Mon, Jul 12, 2021 at 12:34:23PM +0100, Christoph Hellwig wrote: > On Sun, Jul 11, 2021 at 04:09:26PM +0100, Matthew Wilcox (Oracle) wrote: > > It is currently possible for an I/O request that specifies IOCB_NOWAIT > > to sleep waiting for I/O to complete in order to allocate pages for > > readahead. In order to fix that, we need the caller to be able to > > specify the GFP flags to use for memory allocation in the rest of the > > readahead path. > > The file systems also need to respect it for their bio or private > data allocation. And be able to cope with failure, which they currently > don't have to for sleeping bio allocations. Yes, they should. This patch doesn't make that problem worse than it is today, and gets the desired GFP flags down to the file systems, which is needed for the full fix.