md/md-bitmap: support discard for bitmap ops
authorYu Kuai <yukuai3@huawei.com>
Fri, 29 Aug 2025 08:04:18 +0000 (16:04 +0800)
committerYu Kuai <yukuai3@huawei.com>
Sat, 6 Sep 2025 09:18:19 +0000 (17:18 +0800)
commitac9dad8faaa7b2a7c7c6de0017f2d7d54525d33c
tree2f9b401b423a47a13942a8dd2769ff75d8c1e332
parent7797da149d4622bbe803eaee6eaf22a7f62f44ab
md/md-bitmap: support discard for bitmap ops

Use two new methods {start, end}_discard in bitmap_ops and a new field 'rw'
in struct md_io_clone to handle discard IO, prepare to support new md
bitmap.

Since all bitmap functions to hanlde write IO are the same, also add
typedef to make code cleaner.

Link: https://lore.kernel.org/linux-raid/20250829080426.1441678-4-yukuai1@huaweicloud.com
Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Xiao Ni <xni@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Li Nan <linan122@huawei.com>
drivers/md/md-bitmap.c
drivers/md/md-bitmap.h
drivers/md/md.c
drivers/md/md.h