Commit b03755ad authored by zhangjs's avatar zhangjs Committed by Theodore Ts'o
Browse files

ext4: make __ext4_get_inode_loc plug

Add a blk_plug to prevent the inode table readahead from being
submitted as small I/O requests.
Signed-off-by: default avatarzhangjs <>
Signed-off-by: default avatarTheodore Ts'o <>
Reviewed-by: default avatarJan Kara <>
parent c60990b3
......@@ -4570,6 +4570,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
struct buffer_head *bh;
struct super_block *sb = inode->i_sb;
ext4_fsblk_t block;
struct blk_plug plug;
int inodes_per_block, inode_offset;
iloc->bh = NULL;
......@@ -4658,6 +4659,7 @@ make_io:
* If we need to do any I/O, try to pre-readahead extra
* blocks from the inode table.
if (EXT4_SB(sb)->s_inode_readahead_blks) {
ext4_fsblk_t b, end, table;
unsigned num;
......@@ -4688,6 +4690,7 @@ make_io:
bh->b_end_io = end_buffer_read_sync;
submit_bh(REQ_OP_READ, REQ_META | REQ_PRIO, bh);
if (!buffer_uptodate(bh)) {
EXT4_ERROR_INODE_BLOCK(inode, block,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment