[dm-devel] [PATCH 5/9] md: raid10 nowait support

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Bail and status to EAGAIN if raid10 is going to wait for: + barriers + reshape operation + Too many queued requests Signed-off-by: Goldwyn Rodrigues --- drivers/md/raid10.c | 62 - 1 file changed, 47 insertions(+),

[dm-devel] [PATCH 8/9] dm: Add nowait support to dm-delay

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues I/O should bail out if any value for delay is set. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm-delay.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/md/dm-delay.c b/drivers/md/dm-delay.c index ae3158795d26..97da97c3c039 100644 --- a/drivers/md/d

[dm-devel] [PATCH 3/9] md: raid1 nowait support

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues The RAID1 driver would bail with EAGAIN in case of: + I/O has to wait for a barrier + array is frozen + Area is suspended + There are too many pending I/O that it will be queued. To facilitate error for wait barriers, wait_barrier() is returning bool. True in case if

[dm-devel] [PATCH 2/9] md: Add nowait support to md

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Set queue flags to QUEUE_FLAG_NOWAIT to indicate REQ_NOWAIT will be handled. If an I/O on the md will be delayed, it would bail by calling bio_wouldblock_error(). The conditions when this could happen are: + MD is suspended + There is a change pending on the SB, and cu

[dm-devel] [PATCH 9/9] dm-mpath: Add nowait support

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If there are no queues, bail if REQ_NOWAIT is set instead of queueing up I/O. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm-mpath.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index 0e8ab5bb3575..c6572a9967

[dm-devel] [PATCH 6/9] dm: add nowait support

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Add support for bio based dm devices, which exclusively sets a make_request_fn(). Request based devices are supported by default. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/md/dm.c b/drivers/md/dm.

[dm-devel] [PATCH 4/9] md: raid5 nowait support

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Return EAGAIN in case RAID5 would block because of waiting due to: + Reshaping + Suspension + Stripe Expansion Signed-off-by: Goldwyn Rodrigues --- drivers/md/raid5.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/md/raid5.c b/drive

[dm-devel] [PATCH 1/9] QUEUE_FLAG_NOWAIT to indicate device supports nowait

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues Nowait is a feature of direct AIO, where users can request to return immediately if the I/O is going to block. This translates to REQ_NOWAIT in bio.bi_opf flags. While request based devices don't wait, stacked devices such as md/dm will. In order to explicitly mark stacke

[dm-devel] [PATCH 0/9] Nowait feature for stacked block devices

2017-07-26 Thread Goldwyn Rodrigues
This is a continuation of the nowait support which was incorporated a while back. We introduced REQ_NOWAIT which would return immediately if the call would block at the block layer. Request based-devices do not wait. However, bio based devices (the ones which exclusively call make_request_fn) need

[dm-devel] [PATCH 7/9] dm: Add nowait support to raid1

2017-07-26 Thread Goldwyn Rodrigues
From: Goldwyn Rodrigues If the I/O would block because the devices are syncing, bail. Signed-off-by: Goldwyn Rodrigues --- drivers/md/dm-raid1.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/md/dm-raid1.c b/drivers/md/dm-raid1.c index a4fbd911d566..446ac581627f 100644 --- a/

Re: [dm-devel] [PATCH][V2] dm, dax: Make sure dm_dax_flush() is called if device supports it

2017-07-26 Thread Mike Snitzer
On Wed, Jul 26 2017 at 9:35am -0400, Vivek Goyal wrote: > Right now, dm_dax_flush() is not being called and I think it is not being > called becuase DAXDEV_WRITE_CACHE is not set on dm dax device. > > If underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on > dm dax device. This

[dm-devel] [PATCH][V2] dm, dax: Make sure dm_dax_flush() is called if device supports it

2017-07-26 Thread Vivek Goyal
Right now, dm_dax_flush() is not being called and I think it is not being called becuase DAXDEV_WRITE_CACHE is not set on dm dax device. If underlying dax device supports write cache, set DAXDEV_WRITE_CACHE on dm dax device. This will get dm_dax_flush() being called. Acked-by: Dan Williams Signe

[dm-devel] [PATCH V2] dm-zoned: Use GFP_NOIO in I/O path

2017-07-26 Thread Damien Le Moal
Use GFP_NOIO for all memory allocations in the I/O path. Other memory allocations in the initialization path can keep using GFP_KERNEL. Problem reported by Mikulas Patocka . While at it, also fix the call to blkdev_issue_zeroout() in dm-zoned-reclaim.c so that the last argument specifies 0 (for u