Btrfs: loop waiting on writeback
lock_extent_buffer_for_io needs to loop around and make sure the writeback bits are not set. Signed-off-by: Chris Mason <chris.mason@oracle.com>
This commit is contained in:
Родитель
cfed81a04e
Коммит
a098d8e8ee
|
@ -3010,12 +3010,12 @@ static int lock_extent_buffer_for_io(struct extent_buffer *eb,
|
||||||
flush_write_bio(epd);
|
flush_write_bio(epd);
|
||||||
flush = 1;
|
flush = 1;
|
||||||
}
|
}
|
||||||
|
while (1) {
|
||||||
wait_on_extent_buffer_writeback(eb);
|
wait_on_extent_buffer_writeback(eb);
|
||||||
btrfs_tree_lock(eb);
|
btrfs_tree_lock(eb);
|
||||||
if (test_bit(EXTENT_BUFFER_WRITEBACK, &eb->bflags)) {
|
if (!test_bit(EXTENT_BUFFER_WRITEBACK, &eb->bflags))
|
||||||
printk(KERN_ERR "Um, ok?\n");
|
break;
|
||||||
btrfs_tree_unlock(eb);
|
btrfs_tree_unlock(eb);
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче