[Devel] [PATCH] cbt: Update CBT size from check_disk_size_change()

Kirill Tkhai ktkhai at virtuozzo.com
Tue Jan 12 17:07:53 MSK 2021


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 at virtuozzo.com>
---
 fs/block_dev.c |    1 +
 1 file changed, 1 insertion(+)

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);
 	}
 }




More information about the Devel mailing list