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

2020-12-10 Thread Philippe Mathieu-Daudé
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

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

2020-12-10 Thread Max Reitz
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 imple

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

2020-12-10 Thread Philippe Mathieu-Daudé
NVMe drive can not be shrunk. 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 f