qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] hw/block/nvme: add block utilization tracking


From: Keith Busch
Subject: Re: [PATCH] hw/block/nvme: add block utilization tracking
Date: Tue, 13 Oct 2020 14:06:36 -0700

On Tue, Oct 13, 2020 at 09:08:46PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen <k.jensen@samsung.com>
> 
> This adds support for reporting the Deallocated or Unwritten Logical
> Block error (DULBE). This requires tracking the allocated/deallocated
> status of all logical blocks.
> 
> Introduce a bitmap that does this. The bitmap is always intialized to
> all ones (aka, all blocks are allocated) on boot up. Blocks can then be
> specifically deallocated using Write Zeroes. This ensures that we can
> always guarantee zeroes to be returned from deallocated blocks.
> 
> When the device gains support for persistent state, the intention is to
> remove the "allocated by default" behavior.

I think this is a rather odd feature for this device to support. The
implementation is slow can end up allocating quite a bit of memory. If
we were going to support it here, wouldn't it make more sense to tie it
to the filesystem's ability to support fallocate hole punch for the
backing namespace, and check if the range is allocated with SEEK_HOLE?
Then you don't even need to track persistent state, and we're actually
getting the genuine capability.



reply via email to

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