+ ext4-readpages-should-submit-io-as-read-ahead.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: ext4: readpages() should submit IO as read-ahead
has been added to the -mm tree.  Its filename is
     ext4-readpages-should-submit-io-as-read-ahead.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/ext4-readpages-should-submit-io-as-read-ahead.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/ext4-readpages-should-submit-io-as-read-ahead.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Jens Axboe <axboe@xxxxxxxxx>
Subject: ext4: readpages() should submit IO as read-ahead

a_ops->readpages() is only ever used for read-ahead.  Ensure that we pass
this information down to the block layer.

Link: http://lkml.kernel.org/r/20180621010725.17813-5-axboe@xxxxxxxxx
Signed-off-by: Jens Axboe <axboe@xxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
Cc: Chris Mason <clm@xxxxxx>
Cc: Christoph Hellwig <hch@xxxxxx>
Cc: Theodore Ts'o <tytso@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---


diff -puN fs/ext4/ext4.h~ext4-readpages-should-submit-io-as-read-ahead fs/ext4/ext4.h
--- a/fs/ext4/ext4.h~ext4-readpages-should-submit-io-as-read-ahead
+++ a/fs/ext4/ext4.h
@@ -3065,7 +3065,7 @@ static inline void ext4_set_de_type(stru
 /* readpages.c */
 extern int ext4_mpage_readpages(struct address_space *mapping,
 				struct list_head *pages, struct page *page,
-				unsigned nr_pages);
+				unsigned nr_pages, bool is_readahead);
 
 /* symlink.c */
 extern const struct inode_operations ext4_encrypted_symlink_inode_operations;
diff -puN fs/ext4/inode.c~ext4-readpages-should-submit-io-as-read-ahead fs/ext4/inode.c
--- a/fs/ext4/inode.c~ext4-readpages-should-submit-io-as-read-ahead
+++ a/fs/ext4/inode.c
@@ -3327,7 +3327,8 @@ static int ext4_readpage(struct file *fi
 		ret = ext4_readpage_inline(inode, page);
 
 	if (ret == -EAGAIN)
-		return ext4_mpage_readpages(page->mapping, NULL, page, 1);
+		return ext4_mpage_readpages(page->mapping, NULL, page, 1,
+						false);
 
 	return ret;
 }
@@ -3342,7 +3343,7 @@ ext4_readpages(struct file *file, struct
 	if (ext4_has_inline_data(inode))
 		return 0;
 
-	return ext4_mpage_readpages(mapping, pages, NULL, nr_pages);
+	return ext4_mpage_readpages(mapping, pages, NULL, nr_pages, true);
 }
 
 static void ext4_invalidatepage(struct page *page, unsigned int offset,
diff -puN fs/ext4/readpage.c~ext4-readpages-should-submit-io-as-read-ahead fs/ext4/readpage.c
--- a/fs/ext4/readpage.c~ext4-readpages-should-submit-io-as-read-ahead
+++ a/fs/ext4/readpage.c
@@ -98,7 +98,7 @@ static void mpage_end_io(struct bio *bio
 
 int ext4_mpage_readpages(struct address_space *mapping,
 			 struct list_head *pages, struct page *page,
-			 unsigned nr_pages)
+			 unsigned nr_pages, bool is_readahead)
 {
 	struct bio *bio = NULL;
 	sector_t last_block_in_bio = 0;
@@ -259,7 +259,8 @@ int ext4_mpage_readpages(struct address_
 			bio->bi_iter.bi_sector = blocks[0] << (blkbits - 9);
 			bio->bi_end_io = mpage_end_io;
 			bio->bi_private = ctx;
-			bio_set_op_attrs(bio, REQ_OP_READ, 0);
+			bio_set_op_attrs(bio, REQ_OP_READ,
+						is_readahead ? REQ_RAHEAD : 0);
 		}
 
 		length = first_hole << blkbits;
_

Patches currently in -mm which might be from axboe@xxxxxxxxx are

mpage-add-argument-structure-for-do_mpage_readpage.patch
mpage-mpage_readpages-should-submit-io-as-read-ahead.patch
btrfs-readpages-should-submit-io-as-read-ahead.patch
ext4-readpages-should-submit-io-as-read-ahead.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux