Re: [RFC PATCH 1/1] nbd: replace kill_bdev() with __invalidate_device()

2017-03-23 Thread Ming Lin
On Thu, Mar 23, 2017 at 10:51 AM, Josef Bacik wrote: > Yeah I think this is ok, I’ll throw it on my queue for fixes for this cycle. > Thanks, Great. Thanks. > > Josef

Re: [Nbd] [RFC PATCH 1/1] nbd: replace kill_bdev() with __invalidate_device()

2017-03-22 Thread Ming Lin
On Mon, Mar 20, 2017 at 3:58 PM, Ming Lin wrote: > From: Ratna Manoj Bolla > > When a filesystem is mounted on a nbd device and on a disconnect, because > of kill_bdev(), and resetting bdev size to zero, buffer_head mappings are > getting destroyed under mounted filesystem. > &

[RFC PATCH 1/1] nbd: replace kill_bdev() with __invalidate_device()

2017-03-20 Thread Ming Lin
From: Ratna Manoj Bolla When a filesystem is mounted on a nbd device and on a disconnect, because of kill_bdev(), and resetting bdev size to zero, buffer_head mappings are getting destroyed under mounted filesystem. After a bdev size reset(i.e bdev->bd_inode->i_size = 0) on a disconnect, followe

[RFC PATCH 0/1] nbd: fix crash when unmaping nbd device with fs still mounted

2017-03-20 Thread Ming Lin
Hi all, I run into a BUG_ON(!buffer_mapped(bh)) crash with below script. $ rbd-nbd map mypool/myimg $ mkfs.ext4 /dev/nbd0 $ mount /dev/nbd0 /mnt/ $ rbd-nbd unmap /dev/nbd0 $ umount /mnt [ 1248.870131] kernel BUG at /home/mlin/linux/fs/buffer.c:3103! [ 1248.871214] invalid opcode: [#1]

Re: [PATCH 4/5] nvmet-rdma: add a NVMe over Fabrics RDMA target driver

2016-06-09 Thread Ming Lin
On Thu, Jun 9, 2016 at 2:42 PM, Steve Wise wrote: > Should the above error path actually goto a block that frees the rsps? Like > this? > > diff --git a/drivers/nvme/target/rdma.c b/drivers/nvme/target/rdma.c > index c184ee5..8aaa36f 100644 > --- a/drivers/nvme/target/rdma.c > +++ b/drivers/nvme

Re: [PATCH 1/8] blk-mq: add blk_mq_alloc_request_hctx

2016-06-07 Thread Ming Lin
On Tue, 2016-06-07 at 22:49 -0600, Jens Axboe wrote: > On 06/06/2016 03:21 PM, Christoph Hellwig wrote: > > From: Ming Lin > > > > For some protocols like NVMe over Fabrics we need to be able to > > send > > initialization commands to a specific queue. > &

Re: [PATCH 1/8] blk-mq: add blk_mq_alloc_request_hctx

2016-06-07 Thread Ming Lin
On Tue, Jun 7, 2016 at 8:27 AM, Ming Lin wrote: > On Tue, Jun 7, 2016 at 7:57 AM, Keith Busch wrote: >> On Mon, Jun 06, 2016 at 11:21:52PM +0200, Christoph Hellwig wrote: >>> +struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw, >>> +

Re: NVMe over Fabrics target implementation

2016-06-07 Thread Ming Lin
On Tue, Jun 7, 2016 at 2:02 PM, Andy Grover wrote: > On 06/06/2016 11:23 PM, Nicholas A. Bellinger wrote: >> >> Hi HCH & Co, >> >> On Mon, 2016-06-06 at 23:22 +0200, Christoph Hellwig wrote: >>> >>> This patch set adds a generic NVMe over Fabrics target. The >>> implementation conforms to the NVMe

Re: [PATCH 1/8] blk-mq: add blk_mq_alloc_request_hctx

2016-06-07 Thread Ming Lin
On Tue, Jun 7, 2016 at 7:57 AM, Keith Busch wrote: > On Mon, Jun 06, 2016 at 11:21:52PM +0200, Christoph Hellwig wrote: >> +struct request *blk_mq_alloc_request_hctx(struct request_queue *q, int rw, >> + unsigned int flags, unsigned int hctx_idx) >> +{ >> + struct blk_mq_hw_ctx *hc

[PATCH] blk-mq: clear q->mq_ops if init fail

2016-05-25 Thread Ming Lin
From: Ming Lin blk_mq_init_queue() calls blk_mq_init_allocated_queue(), but q->mq_ops was not cleared when blk_mq_init_allocated_queue() fails. Then blk_cleanup_queue() calls blk_mq_free_queue() which will crash because: - q->all_q_node is not added to all_q_list yet - q->tag_set is NU

Re: [PATCH v2] lib: make sg_pool tristate instead of bool

2016-04-23 Thread Ming Lin
pped my audit looking for modular code that is essentially > orphaned (i.e. module_exit, and .remove fcns in non-modular drivers.) > > In the following discussion, Ming Lin indicated that the original > intention was to have it tristate, so here we convert it accordingly. > > Al

Re: [PATCH] lib: make sg_pool explicitly non-modular

2016-04-20 Thread Ming Lin
On Wed, 2016-04-20 at 23:02 -0400, Paul Gortmaker wrote: >  > > > > So the .config will have CONFIG_SG_POOL=m > > That is impossible currently, since as per above, the variable is > bool > and not tristate.  Did you mean to make it tristate? I didn't notice that. Yes, it should be tristate.

Re: [PATCH] lib: make sg_pool explicitly non-modular

2016-04-20 Thread Ming Lin
one might want to consider moving it to subsys_initcall if it is to > be ready ahead of SCSI drivers wanting this and using device_initcall. > > Cc: Christoph Hellwig > Cc: Ming Lin > Cc: Sagi Grimberg > Cc: Martin K. Petersen > Signed-off-by: Paul Gortmaker > --- > lib/sg_po

Re: [PATCH v3 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-04-11 Thread Ming Lin
On Mon, Apr 11, 2016 at 2:34 PM, Martin K. Petersen wrote: >>>>>> "Ming" == Ming Lin writes: > > Ming> Are we ready to merge it? > > We're still missing an ack from Sagi. Thought we already had a ack from Bart. OK, let's get one more from Sagi.

Re: [PATCH v3 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-04-10 Thread Ming Lin
On Tue, Apr 5, 2016 at 7:55 AM, Tejun Heo wrote: > On Mon, Apr 04, 2016 at 02:48:10PM -0700, Ming Lin wrote: >> From: Ming Lin >> >> Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount >> we fit into a single scatterlist chunk. >> >&g

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-04-07 Thread Ming Lin
On Thu, Apr 7, 2016 at 9:43 AM, Ming Lin wrote: > On Thu, Apr 7, 2016 at 7:56 AM, Bart Van Assche > wrote: >> On 03/15/16 15:39, Ming Lin wrote: >>> >>> +static void sg_mempoll_free(struct scatterlist *sgl, unsigned int nents) >> >> >> Please cha

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-04-07 Thread Ming Lin
On Thu, Apr 7, 2016 at 7:56 AM, Bart Van Assche wrote: > On 03/15/16 15:39, Ming Lin wrote: >> >> +static void sg_mempoll_free(struct scatterlist *sgl, unsigned int nents) > > > Please change mempoll into mempool. Good catch. Thanks Bart!

[PATCH v3 0/5] mempool based chained scatterlist alloc/free api

2016-04-04 Thread Ming Lin
From: Ming Lin The fist 4 patches make the SG related definitions/structs/functions in SCSI code generic and the last patch move it to lib/sg_pool.c. v3: - Resend for Tejun to review. No code change since v2. - Add review/ack tags v2: - do modification in scsi code first then move to lib

[PATCH v3 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-04-04 Thread Ming Lin
From: Ming Lin Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount we fit into a single scatterlist chunk. Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS. Will move these 2 generic definitions to scatterlist.h later. Reviewed-by: Christoph Hellwig Acked-by: Bart Van

[PATCH v3 2/5] scsi: replace "mq" with "first_chunk" in SG functions

2016-04-04 Thread Ming Lin
From: Ming Lin Parameter "bool mq" is block driver specific. Change it to "first_chunk" to make it more generic. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deleti

[PATCH v3 1/5] scsi: replace "scsi_data_buffer" with "sg_table" in SG functions

2016-04-04 Thread Ming Lin
From: Ming Lin Replace parameter "struct scsi_data_buffer" with "struct sg_table" in SG alloc/free functions to make them generic. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 41 +++-- 1 file ch

[PATCH v3 3/5] scsi: rename SG related struct and functions

2016-04-04 Thread Ming Lin
From: Ming Lin Rename SCSI specific struct and functions to more genenic names. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 52 - 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers

[PATCH v3 5/5] lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c

2016-04-04 Thread Ming Lin
From: Ming Lin Now it's ready to move the mempool based SG chained allocator code from SCSI driver to lib/sg_pool.c, which will be compiled only based on a Kconfig symbol CONFIG_SG_POOL. SCSI selects CONFIG_SG_POOL. Reviewed-by: Christoph Hellwig Signed-off-by: Ming Lin --- drivers

Re: [PATCH v2 5/5] lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c

2016-04-04 Thread Ming Lin
On Mon, Apr 4, 2016 at 1:17 PM, Christoph Hellwig wrote: > On Mon, Apr 04, 2016 at 01:15:45PM -0700, Ming Lin wrote: >> cleanup_sdb: >> for (i = 0; i < SG_MEMPOOL_NR; i++) { >> struct sg_pool *sgp = sg_pools + i; >>

Re: [PATCH v2 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-04-04 Thread Ming Lin
On Tue, Mar 22, 2016 at 3:03 PM, Ming Lin wrote: > From: Ming Lin > > Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount > we fit into a single scatterlist chunk. > > Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS. > > Will move these

Re: [PATCH v2 5/5] lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c

2016-04-04 Thread Ming Lin
t; > url: > https://github.com/0day-ci/linux/commits/Ming-Lin/mempool-based-chained-scatterlist-alloc-free-api/20160323-060710 > base: https://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi.git for-next > > > coccinelle warnings: (new ones prefixed by >>) > >&g

Re: [PATCH v2 0/5] mempool based chained scatterlist alloc/free api

2016-04-03 Thread Ming Lin
On Mon, Mar 28, 2016 at 7:48 AM, Ming Lin wrote: > On Thu, Mar 24, 2016 at 8:46 AM, James Bottomley > wrote: >> On Thu, 2016-03-24 at 08:09 -0700, Ming Lin wrote: >>> On Wed, Mar 23, 2016 at 12:40 AM, Christoph Hellwig >>> wrote: >>> > On Tue, Mar 22

Re: [PATCH v2 0/5] mempool based chained scatterlist alloc/free api

2016-03-28 Thread Ming Lin
On Thu, Mar 24, 2016 at 8:46 AM, James Bottomley wrote: > On Thu, 2016-03-24 at 08:09 -0700, Ming Lin wrote: >> On Wed, Mar 23, 2016 at 12:40 AM, Christoph Hellwig >> wrote: >> > On Tue, Mar 22, 2016 at 03:03:11PM -0700, Ming Lin wrote: >> > > From: Ming L

Re: [PATCH v2 0/5] mempool based chained scatterlist alloc/free api

2016-03-24 Thread Ming Lin
On Wed, Mar 23, 2016 at 12:40 AM, Christoph Hellwig wrote: > On Tue, Mar 22, 2016 at 03:03:11PM -0700, Ming Lin wrote: >> From: Ming Lin >> >> The fist 4 patches make the SG related definitions/structs/functions >> in SCSI code generic and the last patch move it to l

[PATCH v2 1/5] scsi: replace "scsi_data_buffer" with "sg_table" in SG functions

2016-03-22 Thread Ming Lin
From: Ming Lin Replace parameter "struct scsi_data_buffer" with "struct sg_table" in SG alloc/free functions to make them generic. Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 41 +++-- 1 file changed, 23 insertions(+), 18 dele

[PATCH v2 0/5] mempool based chained scatterlist alloc/free api

2016-03-22 Thread Ming Lin
From: Ming Lin The fist 4 patches make the SG related definitions/structs/functions in SCSI code generic and the last patch move it to lib/sg_pool.c. I still keep the macro "SG_MEMPOOL_NR" since it's used in 3 places. v2: - do modification in scsi code first then move t

[PATCH v2 5/5] lib: scatterlist: move SG pool code from SCSI driver to lib/sg_pool.c

2016-03-22 Thread Ming Lin
From: Ming Lin Now it's ready to move the mempool based SG chained allocator code from SCSI driver to lib/sg_pool.c, which will be compiled only based on a Kconfig symbol CONFIG_SG_POOL. SCSI selects CONFIG_SG_POOL. Signed-off-by: Ming Lin --- drivers/scsi/Kconfig| 1 + dr

[PATCH v2 3/5] scsi: rename SG related struct and functions

2016-03-22 Thread Ming Lin
From: Ming Lin Rename SCSI specific struct and functions to more genenic names. Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 52 - 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi

[PATCH v2 4/5] scsi: rename SCSI_MAX_{SG, SG_CHAIN}_SEGMENTS

2016-03-22 Thread Ming Lin
From: Ming Lin Rename SCSI_MAX_SG_SEGMENTS to SG_CHUNK_SIZE, which means the amount we fit into a single scatterlist chunk. Rename SCSI_MAX_SG_CHAIN_SEGMENTS to SG_MAX_SEGMENTS. Will move these 2 generic definitions to scatterlist.h later. Signed-off-by: Ming Lin --- drivers/ata

[PATCH v2 2/5] scsi: replace "mq" with "first_chunk" in SG functions

2016-03-22 Thread Ming Lin
From: Ming Lin Parameter "bool mq" is block driver specific. Change it to "first_chunk" to make it more generic. Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/scsi/

Re: [PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-03-20 Thread Ming Lin
On Wed, 2016-03-16 at 09:23 +0100, Christoph Hellwig wrote: > >  > We can defintively kill this one. We want to support different size of pools. How can we kill this one? Or did you mean we just create a single pool with size SG_CHUNK_SIZE? > > > +static __init int sg_mempool_init(void) > > +{

Re: [PATCH RFC 0/2] mempool based chained scatterlist alloc/free api api

2016-03-15 Thread Ming Lin
On Tue, 2016-03-15 at 16:12 -0700, James Bottomley wrote: > On Tue, 2016-03-15 at 15:39 -0700, Ming Lin wrote: > > From: Ming Lin > > > > Hi list, > > > > This moves the mempool based chained scatterlist alloc/free code > > from > > scsi_lib.c to lib

[PATCH RFC 0/2] mempool based chained scatterlist alloc/free api api

2016-03-15 Thread Ming Lin
From: Ming Lin Hi list, This moves the mempool based chained scatterlist alloc/free code from scsi_lib.c to lib/scatterlist.c. So other drivers(for example, the under development NVMe over fabric drivers) can also use it. Ming Lin (2): scatterlist: add mempool based chained SG alloc/free

[PATCH RFC 2/2] scsi: use the new chained SG api

2016-03-15 Thread Ming Lin
From: Ming Lin This removes the old code and uses the new chained SG alloc/free api. Signed-off-by: Ming Lin --- drivers/scsi/scsi_lib.c | 129 +++- 1 file changed, 7 insertions(+), 122 deletions(-) diff --git a/drivers/scsi/scsi_lib.c b/drivers

[PATCH RFC 1/2] scatterlist: add mempool based chained SG alloc/free api

2016-03-15 Thread Ming Lin
From: Ming Lin This copied code from scsi_lib.c to scatterlist.c and modified it a bit. Signed-off-by: Ming Lin --- include/linux/scatterlist.h | 12 lib/scatterlist.c | 156 2 files changed, 168 insertions(+) diff --git a/include

Re: e827091cb1 "block: merge: get the 1st and last bvec via helpers" broken

2016-03-12 Thread Ming Lin
On Fri, Mar 11, 2016 at 11:43 PM, Kent Overstreet wrote: > I don't know exactly how it's broken, but with that patch segment counting is > broken - I'm seeing blk_rq_map_sg() overrun the end of the sgtable. > > I suggest reverting it for 4.5... + Ming Lei

RE: 4.4-final: 28 bioset threads on small notebook

2016-02-21 Thread Ming Lin-SSI
>-Original Message- >From: Kent Overstreet [mailto:kent.overstr...@gmail.com] > >On Sat, Feb 20, 2016 at 09:55:19PM +0100, Pavel Machek wrote: >> Hi! >> >> > > > You're directing this concern to the wrong person. >> > > > >> > > > I already told you DM is _not_ contributing any extra "biose

Re: block: re-add discard_granularity and alignment checks

2015-10-27 Thread Ming Lin
On Thu, Oct 22, 2015 at 10:03 AM, Mike Snitzer wrote: > On Thu, Oct 22 2015 at 12:59pm -0400, > Ming Lin wrote: > >> From: Ming Lin >> >> In commit b49a087("block: remove split code in >> blkdev_issue_{discard,write_same}"), discard_granularity an

[PATCH] block: re-add discard_granularity and alignment checks

2015-10-22 Thread Ming Lin
From: Ming Lin In commit b49a087("block: remove split code in blkdev_issue_{discard,write_same}"), discard_granularity and alignment checks were removed. Ideally, with bio late splitting, the upper layers shouldn't need to depend on device's limits. Christoph reported a d

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 14:18 -0400, Mike Snitzer wrote: > On Wed, Oct 21 2015 at 1:33pm -0400, > Ming Lin wrote: > > > On Wed, 2015-10-21 at 12:19 -0400, Mike Snitzer wrote: > > > On Wed, Oct 21 2015 at 12:02pm -0400, > > > Mike Snitzer wrote: > > > &g

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 12:19 -0400, Mike Snitzer wrote: > On Wed, Oct 21 2015 at 12:02pm -0400, > Mike Snitzer wrote: > > > On Wed, Oct 14 2015 at 9:27am -0400, > > Christoph Hellwig wrote: > > > > > On Tue, Oct 13, 2015 at 10:44:11AM -0700, Ming Lin wrote:

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 11:33 -0400, Mike Snitzer wrote: > On Wed, Oct 21 2015 at 11:01am -0400, > Ming Lin wrote: > > > On Wed, 2015-10-21 at 09:39 -0400, Jeff Moyer wrote: > > > Christoph Hellwig writes: > > > > > > > Jens, Ming: > > > &

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-21 Thread Ming Lin
On Wed, 2015-10-21 at 09:39 -0400, Jeff Moyer wrote: > Christoph Hellwig writes: > > > Jens, Ming: > > > > are you fine with the one liner change to get back to the old I/O > > pattern? While it looks like the cards fault I'd like to avoid this > > annoying regression. > > I'm not Jens or Ming,

Re: [PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-10-13 Thread Ming Lin
On Tue, Oct 13, 2015 at 4:50 AM, Christoph Hellwig wrote: > On Wed, Aug 12, 2015 at 12:07:15AM -0700, Ming Lin wrote: >> From: Ming Lin >> >> The split code in blkdev_issue_{discard,write_same} can go away >> now that any driver that cares does the split. We have to ma

Re: 32-bit bio regression with 4.3 [was: Re: cgroup/loop Bad page state oops in Linux v4.2-rc3-136-g45b4b782e848]

2015-09-12 Thread Ming Lin
On Sat, Sep 12, 2015 at 12:34 AM, Ming Lin wrote: > On Fri, 2015-09-11 at 21:43 -0700, Ming Lin wrote: >> On Fri, Sep 11, 2015 at 2:43 PM, Mike Snitzer wrote: >> > Ming, Jens, others: >> > >> > Please see this BZ comment that speaks to a 4.3 regression due to

Re: 32-bit bio regression with 4.3 [was: Re: cgroup/loop Bad page state oops in Linux v4.2-rc3-136-g45b4b782e848]

2015-09-12 Thread Ming Lin
On Fri, 2015-09-11 at 21:43 -0700, Ming Lin wrote: > On Fri, Sep 11, 2015 at 2:43 PM, Mike Snitzer wrote: > > Ming, Jens, others: > > > > Please see this BZ comment that speaks to a 4.3 regression due to the > > late bio splitting changes: > > https://bugzilla.r

Re: 32-bit bio regression with 4.3 [was: Re: cgroup/loop Bad page state oops in Linux v4.2-rc3-136-g45b4b782e848]

2015-09-11 Thread Ming Lin
t;build > the bios as large as possible and worry about splitting later". > > Regardless, this regression needs to be reported to Ming Lin > , Jens Axboe and the others involved in > maintaining the late bio splitting changes in block core. I'm looking at it now. --

Re: [GIT PULL] SG changes for 4.3

2015-09-02 Thread Ming Lin
On Wed, Sep 2, 2015 at 3:50 PM, Jens Axboe wrote: > On 09/02/2015 04:41 PM, Jens Axboe wrote: >> >> On 09/02/2015 04:34 PM, Linus Torvalds wrote: >>> >>> Jens, >>> >>> On Wed, Sep 2, 2015 at 9:58 AM, Jens Axboe wrote: This pull request contains a set of scatter-gather related chang

Re: [PATCH v6 00/11] simplify block layer based on immutable biovecs

2015-08-13 Thread Ming Lin
On Thu, 2015-08-13 at 11:07 -0600, Jens Axboe wrote: > On 08/13/2015 11:03 AM, Ming Lin wrote: > > On Thu, 2015-08-13 at 10:51 -0600, Jens Axboe wrote: > >> On 08/12/2015 01:07 AM, Ming Lin wrote: > >>> Hi Jens, > >>> > >>> Neil/Mike/Martin ha

Re: [PATCH v6 00/11] simplify block layer based on immutable biovecs

2015-08-13 Thread Ming Lin
On Thu, 2015-08-13 at 10:51 -0600, Jens Axboe wrote: > On 08/12/2015 01:07 AM, Ming Lin wrote: > > Hi Jens, > > > > Neil/Mike/Martin have acked/reviewed PATCH 1. > > Now it's ready. Could you please apply this series? > > > > https://git.kernel.org/cgit/

[PATCH v6 00/11] simplify block layer based on immutable biovecs

2015-08-12 Thread Ming Lin
n() calls md/raid5: get rid of bio_fits_rdev() block: kill merge_bvec_fn() completely fs: use helper bio_add_page() instead of open coding on bi_io_vec block: remove bio_get_nr_vecs() Ming Lin (2): block: remove split code in blkdev_issue_{discard,write_same}

[PATCH v6 06/11] md/raid5: split bio for chunk_aligned_read

2015-08-12 Thread Ming Lin
From: Ming Lin If a read request fits entirely in a chunk, it will be passed directly to the underlying device (providing it hasn't failed of course). If it doesn't fit, the slightly less efficient path that uses the stripe_cache is used. Requests that get to the stripe cache

[PATCH v6 05/11] block: remove split code in blkdev_issue_{discard,write_same}

2015-08-12 Thread Ming Lin
From: Ming Lin The split code in blkdev_issue_{discard,write_same} can go away now that any driver that cares does the split. We have to make sure bio size doesn't overflow. For discard, we set max discard sectors to (1<<31)>>9 to ensure it doesn't overflow bi_size and

[PATCH v6 03/11] bcache: remove driver private bio splitting code

2015-08-12 Thread Ming Lin
more description in commit message] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 101 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c | 16 +++ drive

[PATCH v6 07/11] md/raid5: get rid of bio_fits_rdev()

2015-08-12 Thread Ming Lin
] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- drivers/md/raid5.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index d572639..7ce3252 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4787,25

[PATCH v6 09/11] fs: use helper bio_add_page() instead of open coding on bi_io_vec

2015-08-12 Thread Ming Lin
-fsde...@vger.kernel.org Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- fs/buffer.c | 7 ++- fs/jfs/jfs_logmgr.c | 14 -- mm/page_io.c| 8 +++- 3 files changed, 9 inser

[PATCH v6 04/11] btrfs: remove bio splitting and merge_bvec_fn() calls

2015-08-12 Thread Ming Lin
Cc: Chris Mason Cc: Josef Bacik Cc: linux-bt...@vger.kernel.org Signed-off-by: Kent Overstreet Signed-off-by: Chris Mason [dpark: add more description in commit message] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- fs/btrfs/volumes.c |

[PATCH v6 10/11] block: remove bio_get_nr_vecs()

2015-08-12 Thread Ming Lin
From: Kent Overstreet We can always fill up the bio now, no need to estimate the possible size based on queue parameters. Acked-by: Steven Whitehouse Signed-off-by: Kent Overstreet [hch: rebased and wrote a changelog] Signed-off-by: Christoph Hellwig Signed-off-by: Ming Lin --- block/bio.c

[PATCH v6 11/11] Documentation: update notes in biovecs about arbitrarily sized bios

2015-08-12 Thread Ming Lin
-by: Dongsu Park Signed-off-by: Ming Lin --- Documentation/block/biovecs.txt | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/block/biovecs.txt b/Documentation/block/biovecs.txt index 74a32ad..2568958 100644 --- a/Documentation/block/biovecs.txt +++ b

[PATCH v6 02/11] block: simplify bio_add_page()

2015-08-12 Thread Ming Lin
once upon a cloned bio.] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- block/bio.c | 135 +--- 1 file changed, 55 insertions(+), 80 deletions(-) diff --git a/block/bio.c b/block/bio.c index d6e5ba3..c8bfa61 100644 --- a/block/bio.

[PATCH v6 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-12 Thread Ming Lin
c: Minchan Kim Cc: Nitin Gupta Cc: Oleg Drokin Cc: Andreas Dilger Acked-by: NeilBrown (for the 'md/md.c' bits) Acked-by: Mike Snitzer Reviewed-by: Martin K. Petersen Signed-off-by: Kent Overstreet [dpark: skip more mq-based drivers, resolve merge conflicts, etc.] Signed-off-by: D

[PATCH v6 08/11] block: kill merge_bvec_fn() completely

2015-08-12 Thread Ming Lin
rown (for the 'md' bits) Acked-by: Mike Snitzer Signed-off-by: Kent Overstreet [dpark: also remove ->merge_bvec_fn() in dm-thin as well as dm-era-target, and resolve merge conflicts] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- block/blk-merge.c |

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Ming Lin
On Tue, 2015-08-11 at 20:24 -0400, Martin K. Petersen wrote: > >>>>> "Ming" == Ming Lin writes: > > Ming> Do you still agree we cap discard to 2G as an interim solution? > > I can live with the 2G cap for 4.3 but would like to see it fixed > prope

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-11 Thread Ming Lin
On Tue, 2015-08-11 at 14:05 -0400, Martin K. Petersen wrote: > > "Martin" == Martin K Petersen writes: > > Martin> I agree except I really don't want to lop off anything unless > Martin> the device locks up if we send it partial blocks. There was an > Martin> array that had problems a while b

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, Aug 10, 2015 at 11:13 AM, Mike Snitzer wrote: > On Mon, Aug 10 2015 at 12:14pm -0400, > Ming Lin wrote: > >> On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: >> > >> > Aside from that, I'm in favor of seeing this late bio splitting patchset &g

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 12:22 -0400, Martin K. Petersen wrote: > > "Mike" == Mike Snitzer writes: > > Mike> Shouldn't we also be using MAX_BIO_SECTORS in > Mike> blkdev_issue_write_same (instead of UINT_MAX >> 9)? > > The granularity of WRITE SAME is always 1 logical block and there is no > re

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 09:14 -0700, Ming Lin wrote: > On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: > > On Sun, Aug 09 2015 at 3:18am -0400, > > Ming Lin wrote: > > > > > On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > > > > On S

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-10 Thread Ming Lin
On Mon, 2015-08-10 at 11:02 -0400, Mike Snitzer wrote: > On Sun, Aug 09 2015 at 3:18am -0400, > Ming Lin wrote: > > > On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > > > On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: > > > &g

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-09 Thread Ming Lin
On Sun, 2015-08-09 at 00:01 -0700, Christoph Hellwig wrote: > On Sat, Aug 08, 2015 at 11:55:47PM -0700, Ming Lin wrote: > > Will change it to MAX_BIO_SECTORS. > > May I add your ACK? > > Yes, please go ahead. Thanks. I'll send a new version of the series once device-map

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Ming Lin
On Sat, 2015-08-08 at 23:41 -0700, Christoph Hellwig wrote: > On Sat, Aug 08, 2015 at 10:59:50PM -0700, Ming Lin wrote: > > +/* > > + * Ensure that max discard sectors doesn't overflow bi_size and hopefully > > + * it is of the proper granularity as long as the granula

Re: [dm-devel] [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-08 Thread Ming Lin
#x27;s a reason I turned discard_zeroes_data off for UNMAP! > > Wrt. the range size I don't have a problem with capping at the 32-bit > bi_size limit. We probably don't want to send commands much bigger than > that anyway. How about below? commit b8ca440bd77653d4d2bac90b7fd159

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Ming Lin
On Fri, Aug 7, 2015 at 5:30 PM, Kent Overstreet wrote: > On Fri, Aug 07, 2015 at 04:40:06PM -0700, Ming Lin wrote: >> >> On Fri, 2015-08-07 at 09:30 +0200, Christoph Hellwig wrote: >> > I'm for solution 3: >> > >> > - keep blk_bio_{discard,write_s

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-07 Thread Ming Lin
ctors) [8388607, 8388607] ---> same problem 2. Ensure bi_size not overflow and max discard size is of proper granularity It works. [start_sector, end_sector] [0, 8388607] [0, 8388479] [8388480, 8388607] So how about below patch? commit 1ca2ad977255efb3c339f4ca16fb798ed5ec54f7 Author:

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-04 Thread Ming Lin
On Tue, 2015-08-04 at 13:36 +0200, Christoph Hellwig wrote: > On Sun, Aug 02, 2015 at 10:58:22PM -0700, Ming Lin wrote: > > I think the important thing is the late splitting for regular bio. > > For discard/write_same bio, how about just don't do late splitting? > >

Re: [lkp] [block] 3b4809b8718: 70.0% vmstat.system.cs

2015-08-04 Thread Ming Lin
On Tue, Aug 4, 2015 at 3:44 AM, kernel test robot wrote: > FYI, we noticed the below changes on > > git://git.kernel.org/pub/scm/linux/kernel/git/mlin/linux.git block-generic-req > commit 3b4809b871881433e502d6fe70ae556bcfc9b10d ("block: remove split code in > blkdev_issue_discard") This is the

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-08-02 Thread Ming Lin
On Sat, 2015-08-01 at 12:33 -0400, Mike Snitzer wrote: > On Sat, Aug 01 2015 at 2:58am -0400, > Ming Lin wrote: > > > On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > > > > > > OK, once setup, to run the 2 tests in question directly you'd do >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > On Fri, Jul 31 2015 at 5:19pm -0400, > Ming Lin wrote: > > > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > > > On Mon, Jul 06 2015 at 3:44P -0400, > > > Ming Lin wrote: > > > >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, Jul 31, 2015 at 3:02 PM, Ming Lin wrote: > On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: >> On Fri, Jul 31 2015 at 5:19pm -0400, >> Ming Lin wrote: >> >> > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: >> > > On Mon, Jul 06 20

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, 2015-07-31 at 17:38 -0400, Mike Snitzer wrote: > On Fri, Jul 31 2015 at 5:19pm -0400, > Ming Lin wrote: > > > On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > > > On Mon, Jul 06 2015 at 3:44P -0400, > > > Ming Lin wrote: > > > >

Re: [PATCH v5 01/11] block: make generic_make_request handle arbitrarily sized bios

2015-07-31 Thread Ming Lin
On Fri, Jul 31, 2015 at 12:23 PM, Mike Snitzer wrote: > On Mon, Jul 06 2015 at 3:44P -0400, > Ming Lin wrote: > >> From: Kent Overstreet >> >> The way the block layer is currently written, it goes to great lengths >> to avoid having to split bios; upper

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-27 Thread Ming Lin
On Mon, Jul 27, 2015 at 3:11 PM, Ming Lin wrote: > It's more interesting if we look at how many bios are allocated for each > application IO request. > > e.g. 10+2 RAID6 with 128K chunk. > > Assume we only consider device max_segments limitation. > > # cat /sys/block

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-27 Thread Ming Lin
On Mon, 2015-07-27 at 13:50 -0400, Mike Snitzer wrote: > On Thu, Jul 23 2015 at 2:21pm -0400, > Ming Lin wrote: > > > On Mon, 2015-07-13 at 11:35 -0400, Mike Snitzer wrote: > > > On Mon, Jul 13 2015 at 1:12am -0400, > > > Ming Lin wrote: > > > &g

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-23 Thread Ming Lin
On Mon, 2015-07-13 at 11:35 -0400, Mike Snitzer wrote: > On Mon, Jul 13 2015 at 1:12am -0400, > Ming Lin wrote: > > > On Mon, 2015-07-06 at 00:11 -0700, m...@kernel.org wrote: > > > Hi Mike, > > > > > > On Wed, 2015-06-10 at 17:46 -0400, Mike Snitze

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-16 Thread Ming Lin
On Mon, 2015-07-13 at 11:35 -0400, Mike Snitzer wrote: > I will do additional review to answer 1 and 2 above. And Jeff Moyer > told me he'd test the patchset on one of his testbeds. Hi Jeff, FYI, here is a fix for patch 1. Or you can pull from my tree. https://git.kernel.org/cgit/linux/kernel/gi

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-14 Thread Ming Lin
On Mon, 2015-07-13 at 11:35 -0400, Mike Snitzer wrote: > On Mon, Jul 13 2015 at 1:12am -0400, > Ming Lin wrote: > > > On Mon, 2015-07-06 at 00:11 -0700, m...@kernel.org wrote: > > > Hi Mike, > > > > > > On Wed, 2015-06-10 at 17:46 -0400, Mike Snitze

Re: [lkp] [block] 86ecb9456ac:

2015-07-14 Thread Ming Lin
On Tue, Jul 14, 2015 at 6:26 AM, Huang Ying wrote: > FYI, we noticed the below changes on > > git://git.kernel.org/pub/scm/linux/kernel/git/mlin/linux.git block-generic-req > commit 86ecb9456ac74ba3996d05ca1b09a7756a31bfd7 ("block: make > generic_make_request handle arbitrarily sized bios") > > W

Re: [PATCH v5 00/11] simplify block layer based on immutable biovecs

2015-07-12 Thread Ming Lin
[3] https://lkml.org/lkml/2014/2/26/618 > > Dongsu Park (1): > Documentation: update notes in biovecs about arbitrarily sized bios > > Kent Overstreet (8): > block: make generic_make_request handle arbitrarily sized bios > block: simplify bio_add_page() >

Re: [PATCH] vhost-blk: Add vhost-blk support v6

2015-07-10 Thread Ming Lin
On Sat, Dec 1, 2012 at 5:33 PM, Asias He wrote: > vhost-blk is an in-kernel virito-blk device accelerator. > > Due to lack of proper in-kernel AIO interface, this version converts > guest's I/O request to bio and use submit_bio() to submit I/O directly. > So this version any supports raw block dev

Re: [PATCH v5 10/11] block: remove bio_get_nr_vecs()

2015-07-06 Thread Ming Lin
On Mon, Jul 6, 2015 at 3:58 AM, Steven Whitehouse wrote: > > Hi, > > > On 06/07/15 08:44, Ming Lin wrote: >> >> From: Kent Overstreet >> >> We can always fill up the bio now, no need to estimate the possible >> size based on queue parameters. >

[PATCH v5 06/11] md/raid5: split bio for chunk_aligned_read

2015-07-06 Thread Ming Lin
From: Ming Lin If a read request fits entirely in a chunk, it will be passed directly to the underlying device (providing it hasn't failed of course). If it doesn't fit, the slightly less efficient path that uses the stripe_cache is used. Requests that get to the stripe cache

[PATCH v5 05/11] block: remove split code in blkdev_issue_discard

2015-07-06 Thread Ming Lin
From: Ming Lin The split code in blkdev_issue_discard() can go away now that any driver that cares does the split. Signed-off-by: Ming Lin --- block/blk-lib.c | 73 +++-- 1 file changed, 14 insertions(+), 59 deletions(-) diff --git a/block

[PATCH v5 03/11] bcache: remove driver private bio splitting code

2015-07-06 Thread Ming Lin
more description in commit message] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- drivers/md/bcache/bcache.h| 18 drivers/md/bcache/io.c| 100 +- drivers/md/bcache/journal.c | 4 +- drivers/md/bcache/request.c | 16 +++ drive

[PATCH v5 11/11] Documentation: update notes in biovecs about arbitrarily sized bios

2015-07-06 Thread Ming Lin
-by: Dongsu Park Signed-off-by: Ming Lin --- Documentation/block/biovecs.txt | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Documentation/block/biovecs.txt b/Documentation/block/biovecs.txt index 74a32ad..2568958 100644 --- a/Documentation/block/biovecs.txt +++ b

[PATCH v5 09/11] fs: use helper bio_add_page() instead of open coding on bi_io_vec

2015-07-06 Thread Ming Lin
-fsde...@vger.kernel.org Signed-off-by: Kent Overstreet [dpark: add more description in commit message] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- fs/buffer.c | 7 ++- fs/jfs/jfs_logmgr.c | 14 -- mm/page_io.c| 8 +++- 3 files changed, 9 inser

[PATCH v5 07/11] md/raid5: get rid of bio_fits_rdev()

2015-07-06 Thread Ming Lin
] Signed-off-by: Dongsu Park Signed-off-by: Ming Lin --- drivers/md/raid5.c | 23 +-- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index 8377e72..8bdf81a 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -4780,25

  1   2   3   >