Re: [dm-devel] [PATCH 01/18] mm: add a kunmap_local_dirty helper

2021-06-17 Thread Herbert Xu
On Thu, Jun 17, 2021 at 08:01:57PM -0700, Ira Weiny wrote: > > > + flush_kernel_dcache_page(__page); \ > > Is this required on 32bit systems? Why is kunmap_flush_on_unmap() not > sufficient on 64bit systems? The normal kunmap_local() path does that. > > I'm sorry but I

Re: [dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-17 Thread Ming Lei
On Thu, Jun 17, 2021 at 06:35:49PM +0800, Ming Lei wrote: > Support bio(REQ_POLLED) polling in the following approach: > > 1) only support io polling on normal READ/WRITE, and other abnormal IOs > still fallback on IRQ mode, so the target io is exactly inside the dm > io. > > 2) hold one refcnt

[dm-devel] [RFC PATCH V2 3/3] dm: support bio polling

2021-06-17 Thread Ming Lei
Support bio(REQ_POLLED) polling in the following approach: 1) only support io polling on normal READ/WRITE, and other abnormal IOs still fallback on IRQ mode, so the target io is exactly inside the dm io. 2) hold one refcnt on io->io_count after submitting this dm bio with REQ_POLLED 3) support

[dm-devel] [RFC PATCH V2 2/3] block: add ->poll_bio to block_device_operations

2021-06-17 Thread Ming Lei
Prepare for supporting IO polling for bio based driver. Add ->poll_bio callback so that bio driver can provide their own logic for polling bio. Signed-off-by: Ming Lei --- block/blk-core.c | 18 +- block/genhd.c | 3 +++ include/linux/blkdev.h | 2 ++ 3 files

[dm-devel] [RFC PATCH V2 1/3] block: add helper of blk_queue_poll

2021-06-17 Thread Ming Lei
There has been 3 users, and will be more, so add one such helper. Reviewed-by: Chaitanya Kulkarni Reviewed-by: Jeffle Xu Reviewed-by: Hannes Reinecke Signed-off-by: Ming Lei --- block/blk-core.c | 5 ++--- block/blk-sysfs.c| 4 ++-- drivers/nvme/host/core.c | 2 +-

[dm-devel] [RFC PATCH V2 0/3] block/dm: support bio polling

2021-06-17 Thread Ming Lei
Hello Guys, Based on Christoph's bio based polling model[1], implement DM bio polling with one very simple approach. Patch 1 adds helper of blk_queue_poll(). Patch 2 adds .bio_poll() callback to block_device_operations, so bio driver can implement its own logic for io polling. Patch 3

[dm-devel] [PATCH] dm btree remove: assign new_root only when removal succeeds

2021-06-17 Thread Hou Tao
remove_raw() in dm_btree_remove() may fail due to IO read error (e.g. read the content of origin block fails during shadowing), and the value of shadow_spine::root is uninitialized, but the uninitialized value is still assign to new_root in the end of dm_btree_remove(). For dm-thin, the value of

Re: [dm-devel] [PATCH v4 03/10] fs: Introduce ->corrupted_range() for superblock

2021-06-17 Thread ruansy.f...@fujitsu.com
> -Original Message- > From: Dan Williams > Subject: Re: [PATCH v4 03/10] fs: Introduce ->corrupted_range() for superblock > > [ drop old linux-nvd...@lists.01.org, add nvd...@lists.linux.dev ] > > On Thu, Jun 3, 2021 at 6:19 PM Shiyang Ruan wrote: > > > > Memory failure occurs in

Re: [dm-devel] [PATCH v4 03/10] fs: Introduce ->corrupted_range() for superblock

2021-06-17 Thread Dan Williams
On Wed, Jun 16, 2021 at 11:51 PM ruansy.f...@fujitsu.com wrote: > > > -Original Message- > > From: Dan Williams > > Subject: Re: [PATCH v4 03/10] fs: Introduce ->corrupted_range() for > > superblock > > > > [ drop old linux-nvd...@lists.01.org, add nvd...@lists.linux.dev ] > > > > On