Hi Jens,
this series adds a ->free_disk method to struct block_device_operation so that
drivers can defer freeing their disk private data until the gendisk goes away
and don't need to play games with the validity of ->private_data.
This also converts three simple drivers over as example, but
Use set_disk_ro to propagate the read-only state to the block layer
instead of checking for it in ->open and leaking a reference in case
of a read-only device.
Signed-off-by: Christoph Hellwig
---
drivers/memstick/core/mspro_block.c | 10 --
1 file changed, 4 insertions(+), 6
Implement the ->free_disk method to free the msb_data structure only once
the last gendisk reference goes away instead of keeping a local refcount.
Signed-off-by: Christoph Hellwig
---
drivers/memstick/core/ms_block.c | 64
drivers/memstick/core/ms_block.h | 1
Add a method to notify the driver that the gendisk is about to be freed.
This allows drivers to tie the lifetime of their private data to that of
the gendisk and thus deal with device removal races without expensive
synchronization and boilerplate code.
A new flag is added so that ->free_disk is
Implement the ->free_disk method to free the msb_data structure only once
the last gendisk reference goes away instead of keeping a local
refcount.
Signed-off-by: Christoph Hellwig
---
drivers/memstick/core/mspro_block.c | 49 +
1 file changed, 7 insertions(+), 42
Implement the ->free_disk method to free the virtio_blk structure only
once the last gendisk reference goes away instead of keeping a local
refcount.
Signed-off-by: Christoph Hellwig
Reviewed-by: Stefan Hajnoczi
Acked-by: Michael S. Tsirkin
---
drivers/block/virtio_blk.c | 66
On 14.02.22 20:59, Kameron Lutes wrote:
> This new linux API will allow user space applications to directly
> control the size of the virtio-balloon. This is useful in
> situations where the guest must quickly respond to drastically
> increased memory pressure and cannot wait for the host to
On Tue, Feb 15, 2022 at 11:34:31AM +0800, Jason Wang wrote:
> On Mon, Feb 14, 2022 at 10:25 PM Michael S. Tsirkin wrote:
> >
> > On Mon, Feb 14, 2022 at 03:19:25PM +0800, Jason Wang wrote:
> > >
> > > 在 2022/2/3 下午3:27, Zhu Lingshan 写道:
> > > > On some platforms/devices, there may not be enough
Hi, Lei
Could you please review the V2 version?
On 2/11/22 4:41 PM, zhenwei pi wrote:
v1 -> v2:
- Fix 1 compiling warning reported by kernel test robot
- Put "__le32 akcipher_algo;" instead of "__le32 reserve;" field of
struct virtio_crypto_config directly without size change.
- Add
On Tue, Jan 11, 2022 at 8:23 AM Pankaj Gupta
wrote:
>
> Enable asynchronous flush for virtio pmem using work queue. Also,
> coalesce the flush requests when a flush is already in process.
> This functionality is copied from md/RAID code.
>
> When a flush is already in process, new flush requests
On Mon, Feb 14, 2022 at 4:14 PM Xuan Zhuo wrote:
>
> The purpose of this patch is to make vring packed support re-enable reset
> vq.
>
> Based on whether the incoming vq passed by vring_setup_virtqueue() is
> NULL or not, distinguish whether it is a normal create virtqueue or
> re-enable a reset
On Mon, Feb 14, 2022 at 4:14 PM Xuan Zhuo wrote:
>
> This patch implements virtio pci support for QUEUE RESET.
>
> Performing reset on a queue is divided into these steps:
>
> 1. reset_vq: reset one vq
> 2. recycle the buffer from vq by virtqueue_detach_unused_buf()
> 3. release the ring of the
On Mon, Feb 14, 2022 at 4:14 PM Xuan Zhuo wrote:
>
> Sets the default maximum ring num based on virtio_set_max_ring_num().
>
> The default maximum ring num is 1024.
Having a default value is pretty useful, I see 32K is used by default for IFCVF.
Rethink this, how about having a different
On Mon, Feb 14, 2022 at 4:14 PM Xuan Zhuo wrote:
>
> This patch implements the reset function of the rx, tx queues.
>
> Based on this function, it is possible to modify the ring num of the
> queue. And quickly recycle the buffer in the queue.
>
> In the process of the queue disable, in theory, as
On Mon, Feb 14, 2022 at 4:15 PM Xuan Zhuo wrote:
>
> Added helper virtio_set_max_ring_num() to set the upper limit of ring
> num when creating a virtqueue.
>
> Can be used to limit ring num before find_vqs() call. Or change ring num
> when re-enable reset queue.
Do we have a chance that RX and
On Tue, Jan 11, 2022 at 8:21 AM Pankaj Gupta
wrote:
>
> Return from "pmem_submit_bio" when asynchronous flush is
> still in progress in other context.
>
> Signed-off-by: Pankaj Gupta
> ---
> drivers/nvdimm/pmem.c| 15 ---
> drivers/nvdimm/region_devs.c | 4 +++-
> 2 files
From: Rob Clark
The UABI was already defined for pointer to 64b value, and all the
userspace users of this ioctl that I could find are already using a
uint64_t (but zeroing it out to work around kernel only copying 32b).
Unfortunately this ioctl doesn't have a length field, so out of paranoia
I
On Tue, Feb 15, 2022 at 5:15 PM Rob Clark wrote:
> From: Rob Clark
>
> The UABI was already defined for pointer to 64b value, and all the
> userspace users of this ioctl that I could find are already using a
> uint64_t (but zeroing it out to work around kernel only copying 32b).
> Unfortunately
On Mon, Feb 14, 2022 at 4:14 PM Xuan Zhuo wrote:
>
> Added vring_release_virtqueue() to release the ring of the vq.
>
> In this process, vq is removed from the vdev->vqs queue. And the memory
> of the ring is released
>
> Signed-off-by: Xuan Zhuo
> ---
> drivers/virtio/virtio_ring.c | 18
On Mon, Feb 14, 2022 at 4:15 PM Xuan Zhuo wrote:
>
> Support set_ringparam based on virtio queue reset.
>
> The rx,tx_pending required to be passed must be power of 2.
>
> Signed-off-by: Xuan Zhuo
> ---
> drivers/net/virtio_net.c | 50
> 1 file changed,
On Wed, 16 Feb 2022 12:14:39 +0800, Jason Wang wrote:
> On Mon, Feb 14, 2022 at 4:15 PM Xuan Zhuo wrote:
> >
> > Support set_ringparam based on virtio queue reset.
> >
> > The rx,tx_pending required to be passed must be power of 2.
> >
> > Signed-off-by: Xuan Zhuo
> > ---
> >
On Wed, 16 Feb 2022 12:14:31 +0800, Jason Wang wrote:
> On Mon, Feb 14, 2022 at 4:14 PM Xuan Zhuo wrote:
> >
> > Sets the default maximum ring num based on virtio_set_max_ring_num().
> >
> > The default maximum ring num is 1024.
>
> Having a default value is pretty useful, I see 32K is used by
On Wed, 16 Feb 2022 12:14:04 +0800, Jason Wang wrote:
> On Mon, Feb 14, 2022 at 4:15 PM Xuan Zhuo wrote:
> >
> > Added helper virtio_set_max_ring_num() to set the upper limit of ring
> > num when creating a virtqueue.
> >
> > Can be used to limit ring num before find_vqs() call. Or change ring
23 matches
Mail list logo