[RHEL7,COMMIT] cbt: Update CBT size from check_disk_size_change()

Submitted by Vasily Averin on Jan. 13, 2021, 10:25 a.m.

Details

Message ID 202101131025.10DAP7g5009443@vz7build.vvs.sw.ru
State New
Series "cbt: Update CBT size from check_disk_size_change()"
Headers show

Commit Message

Vasily Averin Jan. 13, 2021, 10:25 a.m.
The commit is pushed to "branch-rh7-3.10.0-1160.11.1.vz7.172.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-1160.11.1.vz7.172.9
------>
commit 042072dc38993013438cc8803e61a7d87501449e
Author: Kirill Tkhai <ktkhai@virtuozzo.com>
Date:   Wed Jan 13 13:25:07 2021 +0300

    cbt: Update CBT size from check_disk_size_change()
    
    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 85e2a0e..e6b8c94 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);
 	}
 }