cbt: Update CBT size from check_disk_size_change()

Submitted by Kirill Tkhai on Jan. 12, 2021, 2:07 p.m.

Details

Message ID 161046046793.158713.2310503527114485044.stgit@localhost.localdomain
State New
Series "cbt: Update CBT size from check_disk_size_change()"
Headers show

Commit Message

Kirill Tkhai Jan. 12, 2021, 2:07 p.m.
Here is customer node, where is CBT size is different
to ploop size. Searching against kernel code shows,
this is the only place we skip CBT size update after
bd_inode size change.

https://jira.sw.ru/browse/PSBM-123819
Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
---
 fs/block_dev.c |    1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 85e2a0e19f29..e6b8c94390db 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1083,6 +1083,7 @@  void check_disk_size_change(struct gendisk *disk, struct block_device *bdev)
 		       "%s: detected capacity change from %lld to %lld\n",
 		       name, bdev_size, disk_size);
 		i_size_write(bdev->bd_inode, disk_size);
+		blk_cbt_update_size(bdev);
 		flush_disk(bdev, false);
 	}
 }