rbd: revalidate_disk upon rbd resize
Subsystems (2)
PATCH 1/1 rbd: revalidate_disk upon rbd resize
If rbd disk is open and rbd resize is done, new size is not visible by filesystem.
Like is done in virtio-blk and dm driver, revalidate_disk() permits to update the bd_inode size.
--- drivers/block/rbd.c | 1 + 1 file changed, 1 insertion(+)
drivers/block/rbd.c +1 -0
@@ -1883,6 +1883,7 @@ static int rbd_dev_refresh(struct rbd_device *rbd_dev, u64 *hver)else ret =rbd_dev_v2_refresh (rbd_dev, hver);mutex_unlock (&ctl_mutex); +revalidate_disk (rbd_dev->disk);return ret; }
Signature · 1 line
1.7.10.4
Hello,
I have juste move revalidate_disk() in rbd_dev_refresh() outside the mutex. It seems ok for me.
Quoted 6 lines · Laurent Barbe
If rbd disk is open and rbd resize is done, new size is not visible by filesystem.
Like is done in virtio-blk and dm driver,revalidate_disk()permits to update thebd_inodesize.Signed-off-by Laurent Barbe <[email protected]>
This one looks good (too). And this time I've tested it just to be sure I get no lockdep warnings. Unless I see any strangeness in my sanity testing (which I don't expect) I'll commit this to the testing branch later today. Thanks a lot.
Quoted 17 lines
--- drivers/block/rbd.c | 1 + 1 file changed, 1 insertion(+)drivers/block/rbd.c +1
-0@@ -1883,6 +1883,7 @@ static int rbd_dev_refresh(struct rbd_device *rbd_dev, u64 *hver)else ret =rbd_dev_v2_refresh (rbd_dev, hver);mutex_unlock (&ctl_mutex); +revalidate_disk (rbd_dev->disk);return ret; }
Quoted 8 lines · Alex Elder
Quoted 6 lines · Laurent Barbe
If rbd disk is open and rbd resize is done, new size is not visible by filesystem.
Like is done in virtio-blk and dm driver,revalidate_disk()permits to update thebd_inodesize.Signed-off-by Laurent Barbe <[email protected]>
Quoted 7 lines
This one looks good (too). And this time I've tested it just to be sure I get no lockdep warnings. Unless I see any strangeness in my sanity testing (which I don't expect) I'll commit this to the testing branch later today. Thanks a lot.
Reviewed-by Alex Elder <[email protected]>
I have committed this to the "testing" branch of the ceph-client git repository.
-Alex
. . .
Quoted 15 lines · Alex Elder
Quoted 14 lines · Alex Elder
Quoted 6 lines · Laurent Barbe
If rbd disk is open and rbd resize is done, new size is not visible by filesystem.
Like is done in virtio-blk and dm driver,revalidate_disk()permits to update thebd_inodesize.Signed-off-by Laurent Barbe <[email protected]>This one looks good (too). And this time I've tested it just to be sure I get no lockdep warnings. Unless I see any strangeness in my sanity testing (which I don't expect) I'll commit this to the testing branch later today. Thanks a lot.
Quoted 4 lines
Quoted 1 line
Reviewed-by Alex Elder <[email protected]>I have committed this to the "testing" branch of the ceph-client git repository.
Is this the one that had the lockdep issue?
sage
Quoted 16 lines · Sage Weil
Quoted 15 lines · Alex Elder
Quoted 14 lines · Alex Elder
Quoted 6 lines · Laurent Barbe
If rbd disk is open and rbd resize is done, new size is not visible by filesystem.
Like is done in virtio-blk and dm driver,revalidate_disk()permits to update thebd_inodesize.Signed-off-by Laurent Barbe <[email protected]>This one looks good (too). And this time I've tested it just to be sure I get no lockdep warnings. Unless I see any strangeness in my sanity testing (which I don't expect) I'll commit this to the testing branch later today. Thanks a lot.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Reviewed-by Alex Elder <[email protected]>I have committed this to the "testing" branch of the ceph-client git repository.
Is this the one that had the lockdep issue?
It did, but moving where it got called (intorbd_dev_refresh(), outside the control mutex)
resolved that.
-Alex