linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iomap: Do not use GFP_NORETRY to allocate BIOs
@ 2020-03-23 13:12 Matthew Wilcox
  2020-03-23 13:20 ` Christoph Hellwig
  2020-03-23 15:38 ` Darrick J. Wong
  0 siblings, 2 replies; 8+ messages in thread
From: Matthew Wilcox @ 2020-03-23 13:12 UTC (permalink / raw)
  To: Christoph Hellwig, Darrick J. Wong, linux-xfs, linux-fsdevel
  Cc: Matthew Wilcox (Oracle)

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>

If we use GFP_NORETRY, we have to be able to handle failures, and it's
tricky to handle failure here.  Other implementations of ->readpages
do not attempt to handle BIO allocation failures, so this is no worse.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 fs/iomap/buffered-io.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c
index 417115bfaf6b..2336642d7390 100644
--- a/fs/iomap/buffered-io.c
+++ b/fs/iomap/buffered-io.c
@@ -307,8 +307,6 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, loff_t length, void *data,
 		if (ctx->bio)
 			submit_bio(ctx->bio);
 
-		if (ctx->is_readahead) /* same as readahead_gfp_mask */
-			gfp |= __GFP_NORETRY | __GFP_NOWARN;
 		ctx->bio = bio_alloc(gfp, min(BIO_MAX_PAGES, nr_vecs));
 		ctx->bio->bi_opf = REQ_OP_READ;
 		if (ctx->is_readahead)
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-03-31  9:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-23 13:12 [PATCH] iomap: Do not use GFP_NORETRY to allocate BIOs Matthew Wilcox
2020-03-23 13:20 ` Christoph Hellwig
2020-03-23 13:40   ` Matthew Wilcox
2020-03-23 13:55     ` Christoph Hellwig
2020-03-23 15:10       ` Matthew Wilcox
2020-03-23 16:51         ` Christoph Hellwig
2020-03-31  9:21           ` Christoph Hellwig
2020-03-23 15:38 ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).