Re: [PATCH 1/2] block: add bio_iov_iter_get_pages()

2016-10-31 Thread Ming Lei
On Tue, Nov 1, 2016 at 1:59 AM, Christoph Hellwig wrote: > From: Kent Overstreet > > This is a helper that pins down a range from an iov_iter and adds it to > a bio without requiring a separate memory allocation for the page array. > It will be used for

Re: [PATCH 4/7] lightnvm: drop reserve and release LUN callbacks

2016-10-31 Thread Matias Bjørling
On 10/31/2016 09:22 PM, Jens Axboe wrote: > On 10/31/2016 07:08 AM, Matias Bjørling wrote: >> On 10/27/2016 08:01 PM, Javier González wrote: >>> From: Javier González >>> >>> On target initialization, targets use callbacks to the media manager to >>> configure the LUNs they

Re: [PATCH 28/60] block: introduce QUEUE_FLAG_SPLIT_MP

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:39 PM, Christoph Hellwig wrote: > On Sat, Oct 29, 2016 at 04:08:27PM +0800, Ming Lei wrote: >> Some drivers(such as dm) should be capable of dealing with multipage >> bvec, but the incoming bio may be too big, such as, a new singlepage bvec >> bio

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Tue, Nov 1, 2016 at 6:46 AM, Ming Lei wrote: > On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o wrote: >> On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: >>> This patches introduce bio_for_each_segment_all_rd() and >>>

Re: [PATCH 2/2] block: fast-path for small and simple direct I/O requests

2016-10-31 Thread Omar Sandoval
On Mon, Oct 31, 2016 at 11:59:25AM -0600, Christoph Hellwig wrote: > This patch adds a small and simple fast patch for small direct I/O > requests on block devices that don't use AIO. Between the neat > bio_iov_iter_get_pages helper that avoids allocating a page array > for get_user_pages and the

Re: [PATCH 19/60] fs/buffer: comment on direct access to bvec table

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:35 PM, Christoph Hellwig wrote: > > I think we'll just need a version zero_fill_bio with a length argument > and let that handle all the bvec access. I have vague memories that > Kent posted one a while ago, Ccing him. I will try to find

Re: [PATCH 16/60] block: pktcdvd: comment on direct access to bvec table

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:33 PM, Christoph Hellwig wrote: > Please pick up my "pktcdvd: don't scribble over the bvec array" > patch instead of the pktcdvd patches in this series. OK. Thanks, Ming Lei -- To unsubscribe from this list: send the line "unsubscribe linux-block"

Re: [PATCH 09/60] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:29 PM, Christoph Hellwig wrote: > On Sat, Oct 29, 2016 at 04:08:08PM +0800, Ming Lei wrote: >> Avoid to access .bi_vcnt directly, because it may be not what >> the driver expected any more after supporting multipage bvec. >> >> Signed-off-by: Ming

Re: [PATCH 04/60] block: floppy: use bio_add_page()

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:26 PM, Christoph Hellwig wrote: > Why not keep the bio_add_page in the same spot as direct assignments > were before? I just want to put adding page after setting bi_bdev. Thanks, Ming Lei -- To unsubscribe from this list: send the line

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 11:11 PM, Christoph Hellwig wrote: > On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: >> What is _rd and _wt supposed to stand for? > > I think it's read and write, but I think the naming is highly > unfortunate. I started dabbling around

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Ming Lei
On Mon, Oct 31, 2016 at 9:59 PM, Theodore Ts'o wrote: > On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: >> This patches introduce bio_for_each_segment_all_rd() and >> bio_for_each_segment_all_wt(). >> >> bio_for_each_segment_all_rd() is for replacing >>

RE: [PATCH 3/3] smartpqi: switch to pci_alloc_irq_vectors

2016-10-31 Thread Don Brace
> -Original Message- > From: Don Brace > Sent: Monday, October 17, 2016 8:45 AM > To: 'Johannes Thumshirn'; Christoph Hellwig > Cc: martin.peter...@oracle.com; ax...@kernel.dk; linux- > s...@vger.kernel.org; linux-block@vger.kernel.org > Subject: RE: [PATCH 3/3] smartpqi: switch to

[RFC PATCH 0/6] Sed Opal

2016-10-31 Thread Scott Bauer
This Patch series implements a large portion of the Opal protocol for self encrypting devices. The driver has the capability of storing a locking range's password, either directly in the driver, or in the Kernel's key managment. The password can then be replayed during a resume from previous

[RFC PATCH 1/6] Include: Add definitions for sed

2016-10-31 Thread Scott Bauer
This patch adds the definitions and structures for the SED Opal code. Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli --- include/linux/sed-opal.h | 58 + include/linux/sed.h | 91

[RFC PATCH 3/6] lib: Add Sed to Kconfig and Makefile

2016-10-31 Thread Scott Bauer
Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli --- lib/Kconfig | 12 lib/Makefile | 7 +++ 2 files changed, 19 insertions(+) diff --git a/lib/Kconfig b/lib/Kconfig index 260a80e..47c39ac 100644 ---

[RFC PATCH 6/6] block: ioctl: Wire up Sed to block ioctls

2016-10-31 Thread Scott Bauer
Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli --- block/compat_ioctl.c | 14 block/ioctl.c| 200 ++- 2 files changed, 213 insertions(+), 1 deletion(-) diff --git

[RFC PATCH 4/6] include: Add sec_ops to block device operations

2016-10-31 Thread Scott Bauer
Signed-off-by: Scott Bauer Signed-off-by: Rafael Antognolli --- include/linux/blkdev.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index c47c358..6fceff1 100644 ---

Re: [PATCHv3 15/41] filemap: handle huge pages in do_generic_file_read()

2016-10-31 Thread Kirill A. Shutemov
[ My mail system got broken and original reply didn't get to through. Resent. ] On Thu, Oct 13, 2016 at 11:33:13AM +0200, Jan Kara wrote: > On Thu 15-09-16 14:54:57, Kirill A. Shutemov wrote: > > Most of work happans on head page. Only when we need to do copy data to > > userspace we find

Re: [PATCH 26/60] btrfs: set NO_MP for request queues behind BTRFS

2016-10-31 Thread Christoph Hellwig
On Mon, Oct 31, 2016 at 11:58:29AM -0600, Chris Mason wrote: > Yeah, I'd rather make us less special. The direct access was a short term > fix to adjust to the new bio interfaces, we should clean it up. I've got patches for a few areas in progress, I'll send them your way once I've finished

Re: [PATCH 26/60] btrfs: set NO_MP for request queues behind BTRFS

2016-10-31 Thread Chris Mason
On Mon, Oct 31, 2016 at 08:36:44AM -0700, Christoph Hellwig wrote: On Sat, Oct 29, 2016 at 04:08:25PM +0800, Ming Lei wrote: There are lots of direct access to .bi_vcnt & .bi_io_vec of bio, and it isn't ready to support multipage bvecs for BTRFS, so set NO_MP for these request queues. For one

[PATCH 2/2] block: fast-path for small and simple direct I/O requests

2016-10-31 Thread Christoph Hellwig
This patch adds a small and simple fast patch for small direct I/O requests on block devices that don't use AIO. Between the neat bio_iov_iter_get_pages helper that avoids allocating a page array for get_user_pages and the on-stack bio and biovec this avoid memory allocations and atomic

block device direct I/O fast path

2016-10-31 Thread Christoph Hellwig
Hi Jens, this small series adds a fasth path to the block device direct I/O code. It uses new magic created by Kent to avoid allocating an array for the pages, and as part of that allows small, non-aio direct I/O requests to be done without memory allocations or atomic ops and with a minimal

Re: REQ_OP for zeroing, was Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-31 Thread Mikulas Patocka
On Fri, 28 Oct 2016, Christoph Hellwig wrote: > [adding Chaitanya to Cc] > > On Fri, Oct 28, 2016 at 07:43:41AM -0400, Mikulas Patocka wrote: > > We could detect if the REQ_OP_WRITE_SAME command contains all zeroes and > > if it does, turn it into "Write Zeroes" or TRIM command (if the device

Re: [dm-devel] [PATCH 1/4] brd: handle misaligned discard

2016-10-31 Thread Mikulas Patocka
On Fri, 28 Oct 2016, Bart Van Assche wrote: > On 10/28/2016 04:39 AM, Mikulas Patocka wrote: > > On Wed, 26 Oct 2016, Bart Van Assche wrote: > > > On 10/26/2016 02:46 PM, Mikulas Patocka wrote: > > > > I think the proper thing would be to move "discard_zeroes_data" flag > > > > into > > > > the

Re: [PATCHv3 17/41] filemap: handle huge pages in filemap_fdatawait_range()

2016-10-31 Thread Jan Kara
On Mon 24-10-16 14:36:25, Kirill A. Shutemov wrote: > On Thu, Oct 13, 2016 at 03:18:02PM +0200, Jan Kara wrote: > > On Thu 13-10-16 15:08:44, Kirill A. Shutemov wrote: > > > On Thu, Oct 13, 2016 at 11:44:41AM +0200, Jan Kara wrote: > > > > On Thu 15-09-16 14:54:59, Kirill A. Shutemov wrote: > > >

Re: [PATCH 46/60] block: deal with dirtying pages for multipage bvec

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:45PM +0800, Ming Lei wrote: > In bio_check_pages_dirty(), bvec->bv_page is used as flag > for marking if the page has been dirtied & released, and if > no, it will be dirtied in deferred workqueue. > > With multipage bvec, we can't do that any more, so change > the

Re: [PATCH 28/60] block: introduce QUEUE_FLAG_SPLIT_MP

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:27PM +0800, Ming Lei wrote: > Some drivers(such as dm) should be capable of dealing with multipage > bvec, but the incoming bio may be too big, such as, a new singlepage bvec > bio can't be cloned from the bio, or can't be allocated to singlepage > bvec with same

Re: [PATCH 26/60] btrfs: set NO_MP for request queues behind BTRFS

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:25PM +0800, Ming Lei wrote: > There are lots of direct access to .bi_vcnt & .bi_io_vec > of bio, and it isn't ready to support multipage bvecs > for BTRFS, so set NO_MP for these request queues. For one bio is an I/O submitter, it has absolutely no business changing

Re: [PATCH 16/60] block: pktcdvd: comment on direct access to bvec table

2016-10-31 Thread Christoph Hellwig
Please pick up my "pktcdvd: don't scribble over the bvec array" patch instead of the pktcdvd patches in this series. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at

Re: [PATCH 15/60] block: loop: comment on direct access to bvec table

2016-10-31 Thread Christoph Hellwig
Btw, the lib/iov_iter.c code that iterates over bvec currently expects single-page segments. Is the loop code fine with that? Even if it is I think we'd be much better off if it becomes multipage segment aware. -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body

Re: [PATCH 12/60] fs: logfs: use bio_add_page() in do_erase()

2016-10-31 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 13/60] fs: logfs: remove unnecesary check

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:12PM +0800, Ming Lei wrote: > The check on bio->bi_vcnt doesn't make sense in erase_end_io(). Agreed, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to

Re: [PATCH 11/60] fs: logfs: use bio_add_page() in __bdev_writeseg()

2016-10-31 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig -- To unsubscribe from this list: send the line "unsubscribe linux-block" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH 09/60] dm: dm.c: replace 'bio->bi_vcnt == 1' with !bio_multiple_segments

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:08PM +0800, Ming Lei wrote: > Avoid to access .bi_vcnt directly, because it may be not what > the driver expected any more after supporting multipage bvec. > > Signed-off-by: Ming Lei It would be really nice to have a comment in the code why

Re: [PATCH 05/60] target: avoid to access .bi_vcnt directly

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:04PM +0800, Ming Lei wrote: > When the bio is full, bio_add_pc_page() will return zero, > so use this way to handle full bio. > > Also replace access to .bi_vcnt for pr_debug() with bio_segments(). > > Signed-off-by: Ming Lei Looks fine,

Re: [PATCH 03/60] block: drbd: remove impossible failure handling

2016-10-31 Thread Christoph Hellwig
On Sat, Oct 29, 2016 at 04:08:02PM +0800, Ming Lei wrote: > For a non-cloned bio, bio_add_page() only returns failure when > the io vec table is full, but in that case, bio->bi_vcnt can't > be zero at all. > > So remove the impossible failure handling. > > Acked-by: Lars Ellenberg

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Christoph Hellwig
On Mon, Oct 31, 2016 at 09:59:43AM -0400, Theodore Ts'o wrote: > What is _rd and _wt supposed to stand for? I think it's read and write, but I think the naming is highly unfortunate. I started dabbling around with the patches a bit, and to keep my sanity a started reaming it to _pages and _bvec

Re: [PATCH v5 14/14] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-31 Thread Bart Van Assche
On Mon, 2016-10-31 at 09:53 -0400, Laurence Oberman wrote: > Applied all 14 patches, also corrected the part of the xen-blkfront.c > blkif_recover patch in patchv5-5/14. > > diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen- > blkfront.c > index 9908597..60fff99 100644 > ---

Re: [PATCH v5 14/14] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-31 Thread Bart Van Assche
On 10/31/2016 06:53 AM, Laurence Oberman wrote: Ran multiple read/write buffered and directio tests via RDMA/SRP and mlx5 (100Gbit) with max_sectors_kb set to 1024, 2048, 4096 and 8196 Ran multiple read/write buffered and directio tests via RDMA/SRP and mlx4 (56Gbit) with max_sectors_kb set

Re: [PATCH 45/60] block: bio: introduce bio_for_each_segment_all_rd() and its write pair

2016-10-31 Thread Theodore Ts'o
On Sat, Oct 29, 2016 at 04:08:44PM +0800, Ming Lei wrote: > This patches introduce bio_for_each_segment_all_rd() and > bio_for_each_segment_all_wt(). > > bio_for_each_segment_all_rd() is for replacing > bio_for_each_segment_all() in case the bvec from bio->bi_io_vec > is accessed as readonly. >

Re: [PATCH v5 14/14] nvme: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-31 Thread Laurence Oberman
- Original Message - > From: "Bart Van Assche" > To: "Jens Axboe" > Cc: "Christoph Hellwig" , "James Bottomley" > , "Martin K. Petersen" > , "Mike Snitzer" ,

Re: [PATCH 4/7] lightnvm: drop reserve and release LUN callbacks

2016-10-31 Thread Matias Bjørling
On 10/27/2016 08:01 PM, Javier González wrote: > From: Javier González > > On target initialization, targets use callbacks to the media manager to > configure the LUNs they use. In order to simplify the flow, drop this > callbacks and manage everything internally on the media