Message ID | 20250106100645.850445-7-hch@lst.de (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [01/10] block: fix docs for freezing of queue limits updates | expand |
On 1/6/25 7:06 PM, Christoph Hellwig wrote: > So far cache_type_store didn't freeze the queue, fix that by using the > queue_limits_commit_update_frozen helper. > > Signed-off-by: Christoph Hellwig <hch@lst.de> This should be squashed in patch 2, no ? > --- > drivers/block/virtio_blk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 0a987f195630..bbaa26b523b8 100644 > --- a/drivers/block/virtio_blk.c > +++ b/drivers/block/virtio_blk.c > @@ -1105,7 +1105,7 @@ cache_type_store(struct device *dev, struct device_attribute *attr, > lim.features |= BLK_FEAT_WRITE_CACHE; > else > lim.features &= ~BLK_FEAT_WRITE_CACHE; > - i = queue_limits_commit_update(disk->queue, &lim); > + i = queue_limits_commit_update_frozen(disk->queue, &lim); > if (i) > return i; > return count;
On Mon, Jan 06, 2025 at 07:56:19PM +0900, Damien Le Moal wrote: > On 1/6/25 7:06 PM, Christoph Hellwig wrote: > > So far cache_type_store didn't freeze the queue, fix that by using the > > queue_limits_commit_update_frozen helper. > > > > Signed-off-by: Christoph Hellwig <hch@lst.de> > > This should be squashed in patch 2, no ? patch 2 is supposed to just be a mechanical conversion, and each behavior change should be in it's own patch.
On 1/6/25 19:59, Christoph Hellwig wrote: > On Mon, Jan 06, 2025 at 07:56:19PM +0900, Damien Le Moal wrote: >> On 1/6/25 7:06 PM, Christoph Hellwig wrote: >>> So far cache_type_store didn't freeze the queue, fix that by using the >>> queue_limits_commit_update_frozen helper. >>> >>> Signed-off-by: Christoph Hellwig <hch@lst.de> >> >> This should be squashed in patch 2, no ? > > patch 2 is supposed to just be a mechanical conversion, and each > behavior change should be in it's own patch. Sounds good to me, but let's be consistent then: do not remove the freeze/unfreeze from virtio_blk in patch 2 and do it here in this patch. Otherwise, patch 2 *does* change the behavior of virtio_blk, introducing a bug (missing freeze around commit update).
On Mon, Jan 06, 2025 at 10:09:16PM +0900, Damien Le Moal wrote: > Sounds good to me, but let's be consistent then: do not remove the > freeze/unfreeze from virtio_blk in patch 2 and do it here in this patch. > Otherwise, patch 2 *does* change the behavior of virtio_blk, introducing a bug > (missing freeze around commit update). Yeah, I'll fix it up. As mentioned in the cover letter I just brushed this up just enough to be presentable for now.
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 0a987f195630..bbaa26b523b8 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -1105,7 +1105,7 @@ cache_type_store(struct device *dev, struct device_attribute *attr, lim.features |= BLK_FEAT_WRITE_CACHE; else lim.features &= ~BLK_FEAT_WRITE_CACHE; - i = queue_limits_commit_update(disk->queue, &lim); + i = queue_limits_commit_update_frozen(disk->queue, &lim); if (i) return i; return count;
So far cache_type_store didn't freeze the queue, fix that by using the queue_limits_commit_update_frozen helper. Signed-off-by: Christoph Hellwig <hch@lst.de> --- drivers/block/virtio_blk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)