Skip to content

Commit 02f03c4

Browse files
committed
Revert "Revert "ext4: make __ext4_get_inode_loc plug""
This reverts commit 72dbcf7. Instead of waiting forever for entropy that may just not happen, we now try to actively generate entropy when required, and are thus hopefully avoiding the problem that caused the nice ext4 IO pattern fix to be reverted. So revert the revert. Cc: Ahmed S. Darwish <[email protected]> Cc: Ted Ts'o <[email protected]> Cc: Willy Tarreau <[email protected]> Cc: Alexander E. Patrakov <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
1 parent 50ee752 commit 02f03c4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/ext4/inode.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4586,6 +4586,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
45864586
struct buffer_head *bh;
45874587
struct super_block *sb = inode->i_sb;
45884588
ext4_fsblk_t block;
4589+
struct blk_plug plug;
45894590
int inodes_per_block, inode_offset;
45904591

45914592
iloc->bh = NULL;
@@ -4674,6 +4675,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
46744675
* If we need to do any I/O, try to pre-readahead extra
46754676
* blocks from the inode table.
46764677
*/
4678+
blk_start_plug(&plug);
46774679
if (EXT4_SB(sb)->s_inode_readahead_blks) {
46784680
ext4_fsblk_t b, end, table;
46794681
unsigned num;
@@ -4704,6 +4706,7 @@ static int __ext4_get_inode_loc(struct inode *inode,
47044706
get_bh(bh);
47054707
bh->b_end_io = end_buffer_read_sync;
47064708
submit_bh(REQ_OP_READ, REQ_META | REQ_PRIO, bh);
4709+
blk_finish_plug(&plug);
47074710
wait_on_buffer(bh);
47084711
if (!buffer_uptodate(bh)) {
47094712
EXT4_ERROR_INODE_BLOCK(inode, block,

0 commit comments

Comments
 (0)