[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] block/nvme: Implement fake truncate() coroutine
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH] block/nvme: Implement fake truncate() coroutine |
Date: |
Thu, 10 Dec 2020 16:43:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 |
On 12/10/20 4:36 PM, Max Reitz wrote:
> On 10.12.20 13:52, Philippe Mathieu-Daudé wrote:
>> NVMe drive can not be shrunk.
>
> *cannot
>
>> Since commit c80d8b06cfa we can use the @exact parameter (set
>> to false) to return success if the block device is larger than
>> the requested offset (even if we can not be shrunk).
>>
>> Use this parameter to implement the NVMe truncate() coroutine,
>> similarly how it is done for the iscsi and file-posix drivers
>> (see commit 82325ae5f2f "Evaluate @exact in protocol drivers").
>>
>> Reported-by: Xueqiang Wei <xuwei@redhat.com>
>> Suggested-by: Max Reitz <mreitz@redhat.com>
>> Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
>> block/nvme.c | 24 ++++++++++++++++++++++++
>> 1 file changed, 24 insertions(+)
> Thanks! (Fixed the typo and) applied to my block branch:
>
> https://git.xanclic.moe/XanClic/qemu/commits/branch/block
>
Thanks Max!