On Wed, Nov 11, 2020 at 10:55 AM Ilya Dryomov <[email protected]> wrote: > > On Wed, Nov 11, 2020 at 9:27 AM Christoph Hellwig <[email protected]> wrote: > > > > Use set_capacity_and_notify to set the size of both the disk and block > > device. This also gets the uevent notifications for the resize for free. > > > > Signed-off-by: Christoph Hellwig <[email protected]> > > Acked-by: Jack Wang <[email protected]> > > --- > > drivers/block/rbd.c | 3 +-- > > 1 file changed, 1 insertion(+), 2 deletions(-) > > > > diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c > > index f84128abade319..b7a194ffda55b4 100644 > > --- a/drivers/block/rbd.c > > +++ b/drivers/block/rbd.c > > @@ -4920,8 +4920,7 @@ static void rbd_dev_update_size(struct rbd_device > > *rbd_dev) > > !test_bit(RBD_DEV_FLAG_REMOVING, &rbd_dev->flags)) { > > size = (sector_t)rbd_dev->mapping.size / SECTOR_SIZE; > > dout("setting size to %llu sectors", (unsigned long > > long)size); > > - set_capacity(rbd_dev->disk, size); > > - revalidate_disk_size(rbd_dev->disk, true); > > + set_capacity_and_notify(rbd_dev->disk, size); > > } > > } > > > > -- > > 2.28.0 > > > > Hi Christoph, > > The Acked-by is wrong here. I acked this patch (17/24, rbd), and Jack > acked the next one (18/24, rnbd). right. :) > > Thanks, > > Ilya
- Re: [PATCH 01/24] block: remove the call to __inval... Hannes Reinecke
- [PATCH 08/24] nbd: move the task_recv check into nbd_siz... Christoph Hellwig
- [PATCH 06/24] block: add a return value to set_capacity_... Christoph Hellwig
- Re: [PATCH 06/24] block: add a return value to set_... Hannes Reinecke
- [PATCH 09/24] nbd: refactor size updates Christoph Hellwig
- [PATCH 24/24] block: unexport revalidate_disk_size Christoph Hellwig
- [PATCH 20/24] dm-raid: use set_capacity_and_notify Christoph Hellwig
- [PATCH 23/24] virtio-blk: remove a spurious call to reva... Christoph Hellwig
- [PATCH 17/24] rbd: use set_capacity_and_notify Christoph Hellwig
- Re: [PATCH 17/24] rbd: use set_capacity_and_notify Ilya Dryomov
- Re: [PATCH 17/24] rbd: use set_capacity_and_not... Jinpu Wang
- [PATCH 21/24] md: use set_capacity_and_notify Christoph Hellwig
- [PATCH 11/24] nbd: use set_capacity_and_notify Christoph Hellwig
- [PATCH 13/24] dm: use set_capacity_and_notify Christoph Hellwig
- Re: [PATCH 13/24] dm: use set_capacity_and_notify Hannes Reinecke
- [PATCH 10/24] nbd: validate the block size in nbd_set_si... Christoph Hellwig
- [PATCH 15/24] nvme: use set_capacity_and_notify in nvme_... Christoph Hellwig
- Re: [PATCH 15/24] nvme: use set_capacity_and_notify... Hannes Reinecke
- [PATCH 18/24] rnbd: use set_capacity_and_notify Christoph Hellwig
- [PATCH 16/24] drbd: use set_capacity_and_notify Christoph Hellwig
- [PATCH 12/24] aoe: don't call set_capacity from irq cont... Christoph Hellwig
