search for: vdev_mutex

Displaying 13 results from an estimated 13 matches for "vdev_mutex".

2020 Apr 30
3
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...o the vd_index_ida index can be removed in all cases. Fixes: 48e4043d4529523cbc7fa8dd745bd8e2c45ce1d3 ("virtio: add virtio disk geometry feature") Reported-by: Lance Digby <ldigby at redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com> --- v4: * Clarify vdev_mutex usage [Stefano and Michael] drivers/block/virtio_blk.c | 86 ++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 8 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 93468b7c6701..9d21bf0f155e 100644 --- a/drivers/block/virtio_blk.c +++ b...
2020 Apr 30
3
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...o the vd_index_ida index can be removed in all cases. Fixes: 48e4043d4529523cbc7fa8dd745bd8e2c45ce1d3 ("virtio: add virtio disk geometry feature") Reported-by: Lance Digby <ldigby at redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com> --- v4: * Clarify vdev_mutex usage [Stefano and Michael] drivers/block/virtio_blk.c | 86 ++++++++++++++++++++++++++++++++++---- 1 file changed, 78 insertions(+), 8 deletions(-) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 93468b7c6701..9d21bf0f155e 100644 --- a/drivers/block/virtio_blk.c +++ b...
2020 Apr 29
2
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
...ing this mutex in blk-mq and + * virtqueue code paths because virtblk_remove() stops them before vdev + * is freed. + * + * Everything else must hold this mutex when accessing vdev and must + * handle the case where vdev is NULL after virtblk_remove() has been + * called. + */ + struct mutex vdev_mutex; struct virtio_device *vdev; /* The disk structure for the kernel. */ @@ -44,6 +54,13 @@ struct virtio_blk { /* Process context for config space updates */ struct work_struct config_work; + /* + * Tracks references from block_device_operations open/release and + * virtio_driver probe/...
2020 Apr 29
2
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
...ing this mutex in blk-mq and + * virtqueue code paths because virtblk_remove() stops them before vdev + * is freed. + * + * Everything else must hold this mutex when accessing vdev and must + * handle the case where vdev is NULL after virtblk_remove() has been + * called. + */ + struct mutex vdev_mutex; struct virtio_device *vdev; /* The disk structure for the kernel. */ @@ -44,6 +54,13 @@ struct virtio_blk { /* Process context for config space updates */ struct work_struct config_work; + /* + * Tracks references from block_device_operations open/release and + * virtio_driver probe/...
2020 Apr 30
0
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
...irtqueue code paths because virtblk_remove() stops them before vdev > + * is freed. > + * > + * Everything else must hold this mutex when accessing vdev and must > + * handle the case where vdev is NULL after virtblk_remove() has been > + * called. > + */ > + struct mutex vdev_mutex; The patch LGTM, I'm just worried about cache_type_store() and cache_type_show() because IIUC they aren't in blk-mq and virtqueue code paths, but they use vdev. Do we have to take the mutex there too? Thanks, Stefano > struct virtio_device *vdev; > > /* The disk structure...
2020 May 14
0
[PATCH AUTOSEL 5.6 32/62] virtio-blk: handle block_device_operations callbacks after hot unplug
...s mutex must be held by anything that may run after + * virtblk_remove() sets vblk->vdev to NULL. + * + * blk-mq, virtqueue processing, and sysfs attribute code paths are + * shut down before vblk->vdev is set to NULL and therefore do not need + * to hold this mutex. + */ + struct mutex vdev_mutex; struct virtio_device *vdev; /* The disk structure for the kernel. */ @@ -43,6 +52,13 @@ struct virtio_blk { /* Process context for config space updates */ struct work_struct config_work; + /* + * Tracks references from block_device_operations open/release and + * virtio_driver probe/...
2020 May 14
0
[PATCH AUTOSEL 4.19 22/31] virtio-blk: handle block_device_operations callbacks after hot unplug
...s mutex must be held by anything that may run after + * virtblk_remove() sets vblk->vdev to NULL. + * + * blk-mq, virtqueue processing, and sysfs attribute code paths are + * shut down before vblk->vdev is set to NULL and therefore do not need + * to hold this mutex. + */ + struct mutex vdev_mutex; struct virtio_device *vdev; /* The disk structure for the kernel. */ @@ -42,6 +51,13 @@ struct virtio_blk { /* Process context for config space updates */ struct work_struct config_work; + /* + * Tracks references from block_device_operations open/release and + * virtio_driver probe/...
2020 May 14
0
[PATCH AUTOSEL 4.14 31/39] virtio-blk: handle block_device_operations callbacks after hot unplug
...s mutex must be held by anything that may run after + * virtblk_remove() sets vblk->vdev to NULL. + * + * blk-mq, virtqueue processing, and sysfs attribute code paths are + * shut down before vblk->vdev is set to NULL and therefore do not need + * to hold this mutex. + */ + struct mutex vdev_mutex; struct virtio_device *vdev; /* The disk structure for the kernel. */ @@ -42,6 +51,13 @@ struct virtio_blk { /* Process context for config space updates */ struct work_struct config_work; + /* + * Tracks references from block_device_operations open/release and + * virtio_driver probe/...
2020 May 14
0
[PATCH AUTOSEL 5.4 29/49] virtio-blk: handle block_device_operations callbacks after hot unplug
...s mutex must be held by anything that may run after + * virtblk_remove() sets vblk->vdev to NULL. + * + * blk-mq, virtqueue processing, and sysfs attribute code paths are + * shut down before vblk->vdev is set to NULL and therefore do not need + * to hold this mutex. + */ + struct mutex vdev_mutex; struct virtio_device *vdev; /* The disk structure for the kernel. */ @@ -44,6 +53,13 @@ struct virtio_blk { /* Process context for config space updates */ struct work_struct config_work; + /* + * Tracks references from block_device_operations open/release and + * virtio_driver probe/...
2020 May 04
0
[PATCH v4] virtio-blk: handle block_device_operations callbacks after hot unplug
...uot;virtio: add virtio disk geometry feature") Should be Fixes: 48e4043d4529 ("virtio: add virtio disk geometry feature") > Reported-by: Lance Digby <ldigby at redhat.com> > Signed-off-by: Stefan Hajnoczi <stefanha at redhat.com> > --- > v4: > * Clarify vdev_mutex usage [Stefano and Michael] > > drivers/block/virtio_blk.c | 86 ++++++++++++++++++++++++++++++++++---- > 1 file changed, 78 insertions(+), 8 deletions(-) > > diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c > index 93468b7c6701..9d21bf0f155e 100644 > ---...
2020 Apr 30
2
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
..._remove() stops them before vdev > > + * is freed. > > + * > > + * Everything else must hold this mutex when accessing vdev and must > > + * handle the case where vdev is NULL after virtblk_remove() has been > > + * called. > > + */ > > + struct mutex vdev_mutex; > > The patch LGTM, I'm just worried about cache_type_store() and > cache_type_show() because IIUC they aren't in blk-mq and virtqueue code > paths, but they use vdev. > > Do we have to take the mutex there too? No, because del_gendisk() in virtblk_remove() deletes the...
2020 Apr 30
2
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
..._remove() stops them before vdev > > + * is freed. > > + * > > + * Everything else must hold this mutex when accessing vdev and must > > + * handle the case where vdev is NULL after virtblk_remove() has been > > + * called. > > + */ > > + struct mutex vdev_mutex; > > The patch LGTM, I'm just worried about cache_type_store() and > cache_type_show() because IIUC they aren't in blk-mq and virtqueue code > paths, but they use vdev. > > Do we have to take the mutex there too? No, because del_gendisk() in virtblk_remove() deletes the...
2020 Apr 30
0
[PATCH v3] virtio-blk: handle block_device_operations callbacks after hot unplug
...t; > > + * is freed. > > > + * > > > + * Everything else must hold this mutex when accessing vdev and must > > > + * handle the case where vdev is NULL after virtblk_remove() has been > > > + * called. > > > + */ > > > + struct mutex vdev_mutex; > > > > The patch LGTM, I'm just worried about cache_type_store() and > > cache_type_show() because IIUC they aren't in blk-mq and virtqueue code > > paths, but they use vdev. > > > > Do we have to take the mutex there too? > > No, because del_g...