qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] block/nvme: Implement fake truncate() coroutine


From: Max Reitz
Subject: Re: [PATCH] block/nvme: Implement fake truncate() coroutine
Date: Thu, 10 Dec 2020 16:36:49 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]