[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [PATCH 1/2] block:hdev: support BLKSECDISCARD
From: |
Qi, Yadong |
Subject: |
RE: [PATCH 1/2] block:hdev: support BLKSECDISCARD |
Date: |
Tue, 16 Nov 2021 02:03:15 +0000 |
> > Add a new option "secdiscard" for block drive. Parse it and record it
> > in bs->open_flags as bit(BDRV_O_SECDISCARD).
> >
> > Add a new BDRV_REQ_SECDISCARD bit for secure discard request from
> > virtual device.
> >
> > For host_device backend: implement by ioctl(BLKSECDISCARD) on real
> > host block device.
> > For other backend, no implementation.
> >
> > E.g.:
> > qemu-system-x86_64 \
> > ... \
> > -drive
> file=/dev/mmcblk0p2,if=none,format=raw,discard=on,secdiscard=on,id=sd0 \
> > -device virtio-blk-pci,drive=sd0,id=sd0_vblk \
> > ...
>
> I'm curious why there is explicit control over this feature (-drive
> secdiscard=on|off). For example, is there a reason why users would want to
> disable secdiscard on a drive that supports it? I guess there is no way to
> emulate
> it correctly so secdiscard=on on a drive that doesn't support it produces an
> error?
Yes. AFAIK, there is no way to emulate a "secure" discard. But it seems also
hard to
detect whether a host drive support secdiscard unless it really perform a real
secdiscard. So I choose to add an option for user to enable it for virtual
block.
There is an assumption that user knows whether host support secdiscard.
Best Regard
Yadong
- [PATCH 0/2] support BLKSECDISCARD, yadong . qi, 2021/11/14
- [PATCH 1/2] block:hdev: support BLKSECDISCARD, yadong . qi, 2021/11/14
- Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD, Kevin Wolf, 2021/11/15
- Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD, Stefan Hajnoczi, 2021/11/15
- RE: [PATCH 1/2] block:hdev: support BLKSECDISCARD,
Qi, Yadong <=
- Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD, Stefan Hajnoczi, 2021/11/16
- Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD, Christoph Hellwig, 2021/11/17
- Re: [PATCH 1/2] block:hdev: support BLKSECDISCARD, Stefan Hajnoczi, 2021/11/17
- RE: [PATCH 1/2] block:hdev: support BLKSECDISCARD, Qi, Yadong, 2021/11/17
[PATCH 2/2] virtio-blk: support BLKSECDISCARD, yadong . qi, 2021/11/14