[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200108150612.GD10975@lst.de>
Date: Wed, 8 Jan 2020 16:06:12 +0100
From: Christoph Hellwig <hch@....de>
To: "Martin K. Petersen" <martin.petersen@...cle.com>
Cc: Balbir Singh <sblbir@...zon.com>, linux-kernel@...r.kernel.org,
linux-block@...r.kernel.org, linux-nvme@...ts.infradead.org,
axboe@...nel.dk, ssomesh@...zon.com, jejb@...ux.ibm.com,
hch@....de, mst@...hat.com, Chaitanya.Kulkarni@....com
Subject: Re: [resend v1 5/5] drivers/scsi/sd.c: Convert to use
disk_set_capacity
On Mon, Jan 06, 2020 at 10:48:30PM -0500, Martin K. Petersen wrote:
>
> Balbir,
>
> > diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> > index 5afb0046b12a..1a3be30b6b78 100644
> > --- a/drivers/scsi/sd.c
> > +++ b/drivers/scsi/sd.c
> > @@ -3184,7 +3184,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
> >
> > sdkp->first_scan = 0;
> >
> > - set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
> > + disk_set_capacity(disk, logical_to_sectors(sdp, sdkp->capacity));
> > sd_config_write_same(sdkp);
> > kfree(buffer);
>
> We already emit an SDEV_EVT_CAPACITY_CHANGE_REPORTED event if device
> capacity changes. However, this event does not automatically cause
> revalidation.
Who is looking at these sdev specific events? (And who is looking
at the virtio/xenblk ones?) It makes a lot of sense to have one event
supported by all devices. But don't ask me which one would be the best..
Powered by blists - more mailing lists