[dm-devel] [PATCH] dm: remove unnecessary check when using dm_get_mdptr()

2023-01-01 Thread Hou Tao
From: Hou Tao __hash_remove() removes hash_cell with _hash_lock locked, so acquiring _hash_lock can guarantee no-NULL hc returned from dm_get_mdptr() must have not been removed and hc->md must still be md. __hash_remove() also acquires dm_hash_cells_mutex before setting mdptr as NULL, so in dm_c

Re: [dm-devel] [PATCH RFC 1/8] block: Introduce provisioning primitives

2023-01-01 Thread Sarthak Kukreti
On Fri, Sep 23, 2022 at 8:15 AM Mike Snitzer wrote: > > On Thu, Sep 15 2022 at 12:48P -0400, > Sarthak Kukreti wrote: > > > From: Sarthak Kukreti > > > > Introduce block request REQ_OP_PROVISION. The intent of this request > > is to request underlying storage to preallocate disk space for the gi

[dm-devel] [PATCH v2 5/7] ext4: Add support for FALLOC_FL_PROVISION

2023-01-01 Thread Sarthak Kukreti
Once ext4 is done mapping blocks for an fallocate() request, send out an FALLOC_FL_PROVISION request to the underlying layer to ensure that the space is provisioned for the newly allocated extent or indirect blocks. There is an expected performance degradation with fallocate() calls made with this

[dm-devel] [PATCH v2 1/7] block: Introduce provisioning primitives

2023-01-01 Thread Sarthak Kukreti
Introduce block request REQ_OP_PROVISION. The intent of this request is to request underlying storage to preallocate disk space for the given block range. Block device that support this capability will export a provision limit within their request queues. Signed-off-by: Sarthak Kukreti --- block

Re: [dm-devel] [PATCH RFC 4/8] fs: Introduce FALLOC_FL_PROVISION

2023-01-01 Thread Sarthak Kukreti
On Thu, Sep 22, 2022 at 11:29 AM Brian Foster wrote: > > On Thu, Sep 22, 2022 at 01:04:33AM -0700, Sarthak Kukreti wrote: > > On Wed, Sep 21, 2022 at 8:39 AM Brian Foster wrote: > > > > > > On Fri, Sep 16, 2022 at 02:02:31PM -0700, Sarthak Kukreti wrote: > > > > On Fri, Sep 16, 2022 at 4:56 AM Br

Re: [dm-devel] [PATCH RFC 0/8] Introduce provisioning primitives for thinly provisioned storage

2023-01-01 Thread Sarthak Kukreti
On Fri, Sep 23, 2022 at 7:08 AM Mike Snitzer wrote: > > On Fri, Sep 23 2022 at 4:51P -0400, > Christoph Hellwig wrote: > > > On Wed, Sep 21, 2022 at 07:48:50AM +1000, Daniil Lunev wrote: > > > > There is no such thing as WRITE UNAVAILABLE in NVMe. > > > Apologize, that is WRITE UNCORRECTABLE. Ch

Re: [dm-devel] [PATCH RFC 2/8] dm: Add support for block provisioning

2023-01-01 Thread Sarthak Kukreti
On Fri, Sep 23, 2022 at 7:23 AM Mike Snitzer wrote: > > On Thu, Sep 15 2022 at 12:48P -0400, > Sarthak Kukreti wrote: > > > From: Sarthak Kukreti > > > > Add support to dm devices for REQ_OP_PROVISION. The default mode > > is to pass through the request and dm-thin will utilize it to provision >

[dm-devel] [PATCH v2 4/7] loop: Add support for provision requests

2023-01-01 Thread Sarthak Kukreti
Add support for provision requests to loopback devices. Loop devices will configure provision support based on whether the underlying block device/file can support the provision request and upon receiving a provision bio, will map it to the backing device/storage. Signed-off-by: Sarthak Kukreti -

[dm-devel] [PATCH v2 6/7] ext4: Add mount option for provisioning blocks during allocations

2023-01-01 Thread Sarthak Kukreti
Add a mount option that sets the default provisioning mode for all files within the filesystem. Signed-off-by: Sarthak Kukreti --- fs/ext4/ext4.h| 1 + fs/ext4/extents.c | 7 +++ fs/ext4/super.c | 7 +++ 3 files changed, 15 insertions(+) diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.

Re: [dm-devel] [PATCH v3] virtio_blk: add VIRTIO_BLK_F_LIFETIME feature support

2023-01-01 Thread Alvaro Karsz
Hi Michael, Sorry, I had no time to create a new version. I'll do it today. Alvaro -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH v2 3/7] fs: Introduce FALLOC_FL_PROVISION

2023-01-01 Thread Sarthak Kukreti
FALLOC_FL_PROVISION is a new fallocate() allocation mode that sends a hint to (supported) thinly provisioned block devices to allocate space for the given range of sectors via REQ_OP_PROVISION. The man pages for both fallocate(2) and posix_fallocate(3) describe the default allocation mode as: ```

[dm-devel] [PATCH v2 7/7] ext4: Add a per-file provision override xattr

2023-01-01 Thread Sarthak Kukreti
Adds a per-file provision override that allows select files to override the per-mount setting for provisioning blocks on allocation. This acts as a mechanism to allow mounts using provision to replicate the current behavior for fallocate() and only preserve space at the filesystem level. Signed-o

Re: [dm-devel] [PATCH RFC 4/8] fs: Introduce FALLOC_FL_PROVISION

2023-01-01 Thread Sarthak Kukreti
On Fri, Sep 23, 2022 at 1:45 AM Christoph Hellwig wrote: > > On Tue, Sep 20, 2022 at 10:54:32PM -0700, Sarthak Kukreti wrote: > > [ mmc0blkp1 | ext4(1) | sparse file | loop | dm-thinp | dm-thin | ext4(2) ] > > > > would be predicated on the guarantees of fallocate() per allocation > > layer; if ex

[dm-devel] [PATCH v2 0/8] Introduce provisioning primitives for thinly provisioned storage

2023-01-01 Thread Sarthak Kukreti
Hi, This patch series adds a mechanism to pass through provision requests on stacked thinly provisioned storage devices/filesystems. The linux kernel provides several mechanisms to set up thinly provisioned block storage abstractions (eg. dm-thin, loop devices over sparse files), either directly

[dm-devel] [PATCH v2 2/7] dm: Add support for block provisioning

2023-01-01 Thread Sarthak Kukreti
Add support to dm devices for REQ_OP_PROVISION. The default mode is to pass through the request and dm-thin will utilize it to provision blocks. Signed-off-by: Sarthak Kukreti --- drivers/md/dm-crypt.c | 4 +- drivers/md/dm-linear.c| 1 + drivers/md/dm-snap.c | 7 +++