Re: [PATCH v3] dm: don't allow ioctls to targets that don't map to whole devices

2017-02-03 Thread Johannes Thumshirn
after I got some rest. Forgotten git add? git commit --amend without git add is such a classic mistake on my side as well :-/ Anyways, Reviewed-by: Johannes Thumshirn <jthumsh...@kernel.org> -- Johannes Thumshirn Storage jthumsh...@s

Re: [PATCH v3] dm: don't allow ioctls to targets that don't map to whole devices

2017-02-05 Thread Johannes Thumshirn
On 02/03/2017 10:41 PM, Bart Van Assche wrote: On Fri, 2017-02-03 at 19:17 +0100, Johannes Thumshirn wrote: Forgotten git add? git commit --amend without git add is such a classic mistake on my side as well :-/ Are you familiar with the -a option of git commit? Just run git commit -a --amend

Re: [PATCH] dm: don't allow ioctls to targets that don't map to whole devices

2017-02-03 Thread Johannes Thumshirn
lst.de> Note: this should go into the block tree, as that's where scsi_verify_blk_ioctl becomes optional. --- Rest looks OK to me, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 1/5] blk-throttle: Move three assignments for the variable "ret" in tg_set_max()

2017-01-23 Thread Johannes Thumshirn
mp;& strcmp(p, "max"))) { > + ret = -EINVAL; > goto out_finish; > + } Sorry, I don't like this patch. We know the next error if we encounter one will be EINVAL until we change it. You

Re: [PATCH 3/5] blk-throttle: Adjust two function calls together with a variable assignment

2017-01-23 Thread Johannes Thumshirn
signment in if condition > > Thus fix the affected source code places. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> if Jens wants doesn't mind. -- Johannes Thumshirn

Re: [PATCH 1/5] blk-throttle: Move three assignments for the variable "ret" in tg_set_max()

2017-01-23 Thread Johannes Thumshirn
> Thanks for your constructive feedback. > > > > Your patch doesn't introduce a functual change and doesn't improve > > readability, > > so I don't really see a point for it. > > We have got different preferences for the placement of error

Re: [PATCH 12/16] scsi: remove __scsi_alloc_queue

2017-01-24 Thread Johannes Thumshirn
On Mon, Jan 23, 2017 at 04:29:17PM +0100, Christoph Hellwig wrote: > Instead do an internal export of __scsi_init_queue for the transport > classes that export BSG nodes. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Looks good, Reviewed-by: Johannes Thumshir

Re: [PATCH 09/16] scsi: remove gfp_flags member in scsi_host_cmd_pool

2017-01-24 Thread Johannes Thumshirn
_DMA flag to > kmem_cache_alloc. Drop all the infrastructure for doing so. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH] mmc: core: make block layer non-optional

2017-02-15 Thread Johannes Thumshirn
s is onlt only ^ > teoretical and it makes no sense to have the block layer interface ^ theoretical > as optional. > > Signed-off-by: Linus Walleij <linus.wall...@linaro.org> > --- Byte, Johannes -- Johannes Thumshirn

Re: [PATCH V3 2/2] Move stack parameters for sed_ioctl to prevent oversized stack with CONFIG_KASAN

2017-02-09 Thread Johannes Thumshirn
urn opal_erase_locking_range(dev, ); > + ioctl_ptr = kzalloc(cmd_size, GFP_KERNEL); > + if (!ioctl_ptr) > + return -ENOMEM; > + if (copy_from_user(ioctl_ptr, arg, cmd_size)) { > + ret = -EFAULT; > + goto out; &

Re: [PATCH 13/17] md: raid1: use bio_segments_all()

2017-02-16 Thread Johannes Thumshirn
On 02/16/2017 02:32 PM, Ming Lei wrote: > On Thu, Feb 16, 2017 at 8:35 PM, Johannes Thumshirn <jthumsh...@suse.de> > wrote: >> On 02/16/2017 12:45 PM, Ming Lei wrote: >>> @@ -998,7 +998,8 @@ static void alloc_behind_pages(struct bio *bio, struct >>> r

Re: [PATCH 02/17] block: introduce bio_remove_last_page()

2017-02-16 Thread Johannes Thumshirn
On 02/16/2017 02:59 PM, Ming Lei wrote: > On Thu, Feb 16, 2017 at 9:40 PM, Johannes Thumshirn <jthumsh...@suse.de> > wrote: >> On 02/16/2017 02:30 PM, Ming Lei wrote: >>> On Thu, Feb 16, 2017 at 8:08 PM, Johannes Thumshirn <jthumsh...@suse.de> >>> wr

Re: [PATCH 02/17] block: introduce bio_remove_last_page()

2017-02-16 Thread Johannes Thumshirn
On 02/16/2017 02:30 PM, Ming Lei wrote: > On Thu, Feb 16, 2017 at 8:08 PM, Johannes Thumshirn <jthumsh...@suse.de> > wrote: >> On 02/16/2017 12:45 PM, Ming Lei wrote: >>> MD need this helper to remove the last added page, so introduce >>> it. >>> >&

Re: [PATCH 13/17] md: raid1: use bio_segments_all()

2017-02-16 Thread Johannes Thumshirn
> + unsigned vcnt = bio_segments_all(bio); > + struct bio_vec *bvecs = kzalloc(vcnt * sizeof(struct bio_vec), > GFP_NOIO); Maybe use kcalloc() instead of kzalloc() with a multiplication. Byte, Johannes -- Johannes Thumshirn

Re: [PATCH 02/17] block: introduce bio_remove_last_page()

2017-02-16 Thread Johannes Thumshirn
to .bi_vcnt.' Here you introduce a new direct access to it (plus the duplicated WARN_ON_ONCE()). Maybe use the helper directly here (I admit I haven't gone through the whole series yet, so I can't see if the change is made later). Byte, Johannes -- Johannes Thumshirn

Re: [PATCH 2/2] block/sed-opal: allocate struct opal_dev dynamically

2017-02-17 Thread Johannes Thumshirn
ken is returned */ > - OPAL_DTA_TOKENID_INVALID = 0X0 Nit, here's a capital 'X' that slipped in -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard,

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-19 Thread Johannes Thumshirn
implemented adaptive > moderation in SW before having HW support for it. It can be done by > maintaining stats and having a periodic work that looks at it and > changes the moderation parameters. > > Does anyone think that this is something we should consider? Yes we've been discuss

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-18 Thread Johannes Thumshirn
rs can poll more than their given budget? So what you say is you saw a consomed == 1 [1] most of the time? [1] from http://git.infradead.org/nvme.git/commitdiff/eed5a9d925c59e43980047059fde29e3aa0b7836 -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-20 Thread Johannes Thumshirn
e sent 10 requests out, now poll for the 10 completions after the 1st IRQ". So basically what NVMe already did with calling __nvme_process_cq() after submission. Maybe we should even disable IRQs when submitting and re-enable after submitting so the submission patch doesn't get preempted by a

Re: [PATCH] block_dev: remove DAX leftovers

2016-09-14 Thread Johannes Thumshirn
> dax_do_io and some uneeded i_flags manipulations introduced in commit > bbab37 ("block: Add support for DAX reads/writes to block devices"). > > Remove those leftovers. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Reviewed-b

Re: [PATCH 1/9] blk-mq: Introduce blk_mq_queue_stopped()

2016-09-27 Thread Johannes Thumshirn
are contexts of a blk-mq queue have been stopped. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Jens Axboe <ax...@fb.com> > Cc: Christoph Hellwig <h...@lst.de> > --- Looks good, Reviewed-by: Johannes Thumshirn

Re: [PATCH 6/9] block: Rename mq_freeze_wq and mq_freeze_depth

2016-09-27 Thread Johannes Thumshirn
gt; > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Ja

Re: [PATCH 5/9] block: Extend blk_freeze_queue_start() to the non-blk-mq path

2016-09-27 Thread Johannes Thumshirn
On Mon, Sep 26, 2016 at 11:27:49AM -0700, Bart Van Assche wrote: > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage

Re: [PATCH 2/9] dm: Fix a race condition related to stopping and starting queues

2016-09-27 Thread Johannes Thumshirn
andisk.com> > Cc: Mike Snitzer <snit...@redhat.com> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX G

Re: [PATCH 4/9] block: Move blk_freeze_queue() and blk_unfreeze_queue() code

2016-09-27 Thread Johannes Thumshirn
pth = atomic_inc_return(>mq_freeze_depth); > > + if (freeze_depth == 1) { > > + percpu_ref_kill(>q_usage_counter); > > + blk_mq_run_hw_queues(q, false); > > + } > > +} > > + > As you dropped the 'mq_' prefix, maybe you should rename the co

Re: [PATCH 4/7] pci/msi: Propagate irq affinity description through the MSI code

2016-11-08 Thread Johannes Thumshirn
t; > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithar

Re: [PATCH 7/7] blk-mq: add a first_vec argument to blk_mq_pci_map_queues

2016-11-08 Thread Johannes Thumshirn
m> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Gra

Re: [PATCH 1/3] blk-mq: export blk_mq_map_queues

2016-10-17 Thread Johannes Thumshirn
*q); > int blk_mq_reinit_tagset(struct blk_mq_tag_set *set); > > +int blk_mq_map_queues(struct blk_mq_tag_set *set); > void blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set, int > nr_hw_queues); > > /* > -- > 2.1.4 See comment on patch 2, otherwise Reviewed

[PATCH v4 13/15] block: add bsg_job_put() and bsg_job_get()

2016-11-17 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transpo

[PATCH v4 11/15] scsi: fc: use bsg_softirq_done

2016-11-17 Thread Johannes Thumshirn
bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so ditch the fc specific one. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transpo

[PATCH v4 15/15] block: unexport bsg_softirq_done() again

2016-11-17 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 3 +-- include/lin

[PATCH v4 08/15] block: add reference counting for struct bsg_job

2016-11-17 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 7 +-- inclu

[PATCH v4 10/15] scsi: fc: Use bsg_destroy_job

2016-11-17 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. As bsg_destroy_job() comes from bsg-lib we need to select it in Kconfig once CONFOG_SCSI_FC_ATTRS is active. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...

Re: [PATCH 07/12] dm: Use BLK_MQ_S_STOPPED instead of QUEUE_FLAG_STOPPED in blk-mq code

2016-10-27 Thread Johannes Thumshirn
> Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 09/12] SRP transport: Move queuecommand() wait code to SCSI core

2016-10-27 Thread Johannes Thumshirn
ass...@sandisk.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX Gm

Re: [PATCH 10/12] SRP transport, scsi-mq: Wait for .queue_rq() if necessary

2016-10-27 Thread Johannes Thumshirn
> Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr.

Re: [PATCH 06/12] blk-mq: Add a kick_requeue_list argument to blk_mq_requeue_request()

2016-10-27 Thread Johannes Thumshirn
by Christoph Hellwig. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request()

2016-10-27 Thread Johannes Thumshirn
that function instead of looking it up a > second time. These changes avoid that code has to be duplicated > in the next patch. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thums

Re: [PATCH 01/12] blk-mq: Do not invoke .queue_rq() for a stopped queue

2016-10-27 Thread Johannes Thumshirn
ed-by: Ming Lei <tom.leim...@gmail.com> > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH 04/12] blk-mq: Move more code into blk_mq_direct_issue_request()

2016-10-27 Thread Johannes Thumshirn
that function instead of looking it up a > second time. These changes avoid that code has to be duplicated > in the next patch. > > Signed-off-by: Bart Van Assche <bart.vanass...@sandisk.com> > Cc: Christoph Hellwig <h...@lst.de> Looks good, Reviewed-by: Johannes Thums

Re: [PATCH 1/4] block: add scalable completion tracking of requests

2016-11-01 Thread Johannes Thumshirn
mpleted[2]; > + struct blk_rq_stat stat[2]; Can you add an enum or define for the directions? Just 0 and 1 aren't very intuitive. Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 68

Re: [PATCH 5/8] block: add code to track actual device queue depth

2016-11-02 Thread Johannes Thumshirn
t; > > Do we really need this wrapper? > > Not necessarily, just seems like a nicer API than manually setting the > field. Not a big deal to me, though. A lot of block code uses this kind of setters so I _think_ it complies with the overall style. But I have no strong opinion

[PATCH 35/44] block: add reference counting for struct bsg_job

2016-10-11 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7 inse

[PATCH 44/44] block: unexport bsg_softirq_done() again

2016-10-11 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 3 +-- include/linux/bsg-lib.h | 1 - 2 files changed, 1 insertion

[PATCH 42/44] block: add bsg_job_put() and bsg_job_get()

2016-10-11 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 2 +- include/linux/bsg-lib.h | 3 ++- 3

[PATCH 37/44] block: export bsg_destroy_job

2016-10-11 Thread Johannes Thumshirn
Export bsg_destroy_job so we can use it from clients of bsg-lib. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 3 ++- include/linux/bsg-lib.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/block/bsg-lib.c b/block/bsg-lib.c

[PATCH v3 16/16] block: unexport bsg_softirq_done() again

2016-10-13 Thread Johannes Thumshirn
Unexport bsg_softirq_done() again, we don't need it outside of bsg-lib.c anymore now that scsi_transport_fc is a pure bsg-lib client. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 3 +-- include/lin

[PATCH v3 11/16] scsi: fc: Use bsg_destroy_job

2016-10-13 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. As bsg_destroy_job() comes from bsg-lib we need to select it in Kconfig once CONFOG_SCSI_FC_ATTRS is active. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...

[PATCH v3 14/16] block: add bsg_job_put() and bsg_job_get()

2016-10-13 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transpo

[PATCH v3 09/16] block: add reference counting for struct bsg_job

2016-10-13 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Reviewed-by: Hannes Reinecke <h...@suse.com> --- block/bsg-lib.c | 7 +-- inclu

[PATCH v2 09/16] block: add reference counting for struct bsg_job

2016-10-12 Thread Johannes Thumshirn
Add reference counting to 'struct bsg_job' so we can implement a reuqest timeout handler for bsg_jobs, which is needed for Fibre Channel. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 7 +-- include/linux/bsg-lib.h | 2 ++ 2 files changed, 7 inse

[PATCH v2 11/16] scsi: fc: Use bsg_destroy_job

2016-10-12 Thread Johannes Thumshirn
fc_destroy_bsgjob() and bsg_destroy_job() are now 1:1 copies, so use the later. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 20 ++-- include/linux/bsg-lib.h | 1 + 3

[PATCH v2 14/16] block: add bsg_job_put() and bsg_job_get()

2016-10-12 Thread Johannes Thumshirn
Add bsg_job_put() and bsg_job_get() so don't need to export bsg_destroy_job() any more. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 17 ++--- drivers/scsi/scsi_transport_fc.c | 4 ++-- include/linux/bsg-lib.h | 3

[PATCH v2 12/16] scsi: fc: use bsg_softirq_done

2016-10-12 Thread Johannes Thumshirn
bsg_softirq_done() and fc_bsg_softirq_done() are copies of each other, so ditch the fc specific one. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> --- block/bsg-lib.c | 3 ++- drivers/scsi/scsi_transport_fc.c | 16 ++-- include/linux/bsg-lib.h

Re: [PATCH] softirq: Display IRQ_POLL for irq-poll statistics

2016-10-11 Thread Johannes Thumshirn
On Mon, Oct 10, 2016 at 03:10:51PM +0300, Sagi Grimberg wrote: > This library was moved to the generic area and was > renamed to irq-poll. Hence, update proc/softirqs output accordingly. > > Signed-off-by: Sagi Grimberg <s...@grimberg.me> > --- Looks good, Reviewed-b

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-06 Thread Johannes Thumshirn
On Tue, Dec 06, 2016 at 10:43:57AM +0100, Dmitry Vyukov wrote: > On Tue, Dec 6, 2016 at 10:32 AM, Johannes Thumshirn <jthumsh...@suse.de> > wrote: > > On Mon, Dec 05, 2016 at 07:03:39PM +, Al Viro wrote: > >> On Mon, Dec 05, 2016 at 04:17:53PM +0100, Johannes

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-11 Thread Johannes Thumshirn
I'll do some prototyping and tests tomorrow so we have some more ground for discussion. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nür

Re: [PATCH 03/10] block: move rq_ioc() to blk.h

2017-01-12 Thread Johannes Thumshirn
On Wed, Jan 11, 2017 at 02:39:56PM -0700, Jens Axboe wrote: > We want to use it outside of blk-core.c. > > Signed-off-by: Jens Axboe <ax...@fb.com> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH 01/10] block: move existing elevator ops to union

2017-01-12 Thread Johannes Thumshirn
On Wed, Jan 11, 2017 at 02:39:54PM -0700, Jens Axboe wrote: > Prep patch for adding MQ ops as well, since doing anon unions with > named initializers doesn't work on older compilers. > > Signed-off-by: Jens Axboe <ax...@fb.com> > --- Looks good, Reviewed-by: Johann

Re: [PATCH 02/10] blk-mq: make mq_ops a const pointer

2017-01-12 Thread Johannes Thumshirn
On Wed, Jan 11, 2017 at 02:39:55PM -0700, Jens Axboe wrote: > We never change it, make that clear. > > Signed-off-by: Jens Axboe <ax...@fb.com> > Reviewed-by: Bart Van Assche <bart.vanass...@sandisk.com> > --- Looks good, Reviewed-by: Johannes Thumshirn <jth

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-12 Thread Johannes Thumshirn
qemu or with real H/W as well? > > Note that I ran randrw because I was backed with null_blk, testing > with a real nvme device, you should either run randread or write, and > if you do a write, you can't run it multi-threaded (well you can, but > you'll g

Re: [PATCH 07/10] blk-mq: abstract out helpers for allocating/freeing tag maps

2017-01-13 Thread Johannes Thumshirn
gt; > if (!set->mq_map) > > > > Not that it matters to me, but this change probably isn't needed? > > Huh oops no, I'll move that back where it belongs. Maybe even: + ret = -ENOMEM; set->tags = kzalloc_node(nr_cpu_ids * sizeof(struct blk_mq_tags *),

Re: [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-13 Thread Johannes Thumshirn
On Wed, Jan 11, 2017 at 08:13:02AM -0700, Jens Axboe wrote: > On 01/11/2017 08:07 AM, Jens Axboe wrote: > > On 01/11/2017 06:43 AM, Johannes Thumshirn wrote: > >> Hi all, > >> > >> I'd like to attend LSF/MM and would like to discuss polling for block > >&

Re: [PATCH 14/15] block/bsg: move queue creation into bsg_setup_queue

2017-01-11 Thread Johannes Thumshirn
On Tue, Jan 10, 2017 at 04:06:19PM +0100, Christoph Hellwig wrote: > Simply the boilerplate code needed for bsg nodes a bit. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- that reminds me of posting my SAS bsg-lib patch... Anyways looks good, Reviewed-by: Johannes

Re: [LFS/MM TOPIC][LFS/MM ATTEND]: - Storage Stack and Driver Testing methodology.

2017-01-11 Thread Johannes Thumshirn
n? > 6. Whether QEMU can be used to emulate some of the H/W functionality to > create a test  >   platform? (Optional subsystem specific) Well, something I was thinking about but didn't find enough time to actually implement is making a xfstestes like test suite written using sg3_utils for

Re: [Lsf-pc] [LSF/MM TOPIC][LSF/MM ATTEND] NAPI polling for block drivers

2017-01-12 Thread Johannes Thumshirn
>Did you do testing only in qemu or with real H/W as well? > > I tried once. IIRC, I saw the same phenomenons... JFTR I tried my AHCI irq_poll patch on the Qemu emulation and the read throughput dropped from ~1GB/s to ~350MB/s. But this can be related to Qemu's I/O wired

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-03 Thread Johannes Thumshirn
r_len in the SG driver. I did a lot of debugging (actually I spend the whole last work week soley on this) but I can't find where it does the actual use-after-free, so if you have anything to share I'd be glad. Byte, Johannes -- Johannes Thumshirn

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-03 Thread Johannes Thumshirn
On Sat, Dec 03, 2016 at 04:22:39PM +0100, Dmitry Vyukov wrote: > On Sat, Dec 3, 2016 at 11:38 AM, Johannes Thumshirn <jthumsh...@suse.de> > wrote: > > On Fri, Dec 02, 2016 at 05:50:39PM +0100, Dmitry Vyukov wrote: > >> On Fri, Nov 25, 2016 at 8:08 PM, Dmitry Vyukov

Re: scsi: use-after-free in bio_copy_from_iter

2016-12-06 Thread Johannes Thumshirn
On Mon, Dec 05, 2016 at 07:03:39PM +, Al Viro wrote: > On Mon, Dec 05, 2016 at 04:17:53PM +0100, Johannes Thumshirn wrote: > > 633 hp = >header; > > [...] > > 646 hp->dxferp = (char __user *)buf + cmd_size; > > > So the memor

Re: [PATCH 3/7] block: use appropriate queue running functions

2016-12-05 Thread Johannes Thumshirn
queue(struct request_queue *q) > if (unlikely(blk_queue_stopped(q))) > return; > > - __blk_run_queue_uncond(q); I don't quite get the WARN_ON_ONCE() is it for debug purposes? And similarly blk_use_mq_path() + the other occurences below as well? -- Johannes Thu

Re: [PATCH 1/7] block: use legacy path for flush requests for MQ with a scheduler

2016-12-05 Thread Johannes Thumshirn
k-mq and an elevator set we go into blk_old_get_request, > > hich will simply allocate new requests. How does this not break > > every existing driver? > > Since Johannes found that confusion, maybe I should explain how it all > works. To clarify the naming, how about sth. lik

Re: [PATCH 01/28] ibtrs: add header shared between ibtrs_client and ibtrs_server

2017-03-24 Thread Johannes Thumshirn
n't move the first 8 padding bytes! It's a workaround for a kernel bug. > + * See IBNBD-610 for details What about resolving the kernel bug instead of making workarounds? > + * > + * DO NOT CHANGE! > + */ > +struct ibtrs_msg_hdr { > + u8 __padding1;

Re: [RFC PATCH 00/28] INFINIBAND NETWORK BLOCK DEVICE (IBNBD)

2017-03-24 Thread Johannes Thumshirn
ronment? From what I see in your presentation and cover letter, it provides all you need and is in fact a standard Linux and Windows already have implemented. Thanks, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [RFC PATCH 00/28] INFINIBAND NETWORK BLOCK DEVICE (IBNBD)

2017-03-24 Thread Johannes Thumshirn
n. > - As I listed in features, IBNBD has it's own features > > We're planning to look more into NVMeOF, but it's not a replacement for IBNBD. Ok thanks for the clarification. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH v3 2/4] block: add a read barrier in blk_queue_enter()

2017-03-27 Thread Johannes Thumshirn
.com> > Signed-off-by: Ming Lei <tom.leim...@gmail.com> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH,

Re: [PATCH v3 3/4] block: rename blk_mq_freeze_queue_start()

2017-03-27 Thread Johannes Thumshirn
ewed-by: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Hannes Reinecke <h...@suse.com> > Signed-off-by: Ming Lei <tom.leim...@gmail.com> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH v3 4/4] block: block new I/O just after queue is set as dying

2017-03-27 Thread Johannes Thumshirn
> Signed-off-by: Ming Lei <tom.leim...@gmail.com> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr.

Re: [PATCH v3 1/4] blk-mq: comment on races related with timeout handler

2017-03-27 Thread Johannes Thumshirn
> explicit enough, so add comments on them. > > Cc: Bart Van Assche <bart.vanass...@sandisk.com> > Reviewed-by: Hannes Reinecke <h...@suse.com> > Signed-off-by: Ming Lei <tom.leim...@gmail.com> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> --

Re: [PATCH 01/28] ibtrs: add header shared between ibtrs_client and ibtrs_server

2017-03-24 Thread Johannes Thumshirn
ov_iter.c [...] > > What about resolving the kernel bug instead of making workarounds? > I tried to send a patch upsteam, but was rejected by Sean. > http://www.spinics.net/lists/linux-rdma/msg22381.html > I don't see a NACK in this thread. >From http://www.spinics.net/lists/

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Johannes Thumshirn
er next week. Yay! But please keep the dependencies small. It'll suck when we'd have to pull in a gazillion megabytes for perl/pyhthon/whatever. Thanks, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+

Re: [PATCH 0/6] RFC add blkdev tests v2

2017-04-06 Thread Johannes Thumshirn
be I misphrased it a bit. No more additional dependencies. Currently xfstest is "small" engough to be run in an initrd and that's good for qemu -kernel .. -initrd .. style test runs. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@sus

Re: [PATCH 02/25] block: remove the blk_execute_rq return value

2017-04-06 Thread Johannes Thumshirn
> > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Max

Re: [PATCH 03/25] nvme-fc: fix status code handling in nvme_fc_fcpio_done

2017-04-06 Thread Johannes Thumshirn
e endian format with the > phase bit used in the NVMe CQE to fix / enable this. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn

Re: [PATCH 04/25] nvme: split nvme status from block req->errors

2017-04-06 Thread Johannes Thumshirn
quest > that contains a bit for this condition. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de

Re: [PATCH 06/25] virtio: fix spelling of virtblk_scsi_request_done

2017-04-06 Thread Johannes Thumshirn
On Thu, Apr 06, 2017 at 05:39:25PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Fair enough, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage

Re: [PATCH 07/25] virtio_blk: don't use req->errors

2017-04-06 Thread Johannes Thumshirn
-off-by: Christoph Hellwig <h...@lst.de> > --- Otherwise looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH,

Re: [PATCH 5/5] block, scsi: move the retries field to struct scsi_request

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:56PM +0200, Christoph Hellwig wrote: > Instead of bloating the generic struct request with it. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>

Re: [PATCH 1/5] nvme: move ->retries setup to nvme_setup_cmd

2017-04-05 Thread Johannes Thumshirn
On Wed, Apr 05, 2017 at 04:18:52PM +0200, Christoph Hellwig wrote: > This way we get the behavior right for the non-PCIe transports. Could you please share a bit of your minds inner workings for us mere mortals? Thanks, Johannes -- Johannes Thumsh

Re: [PATCH 2/3] block: remove blk_end_request_cur

2017-04-13 Thread Johannes Thumshirn
On Wed, Apr 12, 2017 at 12:13:58PM +0200, Christoph Hellwig wrote: > This function is not used anywhere in the kernel. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Looks good, though one could argue it can be merged into the last patch. Reviewed-by: Johannes

Re: [PATCH] block: bios with an offset are always gappy

2017-04-13 Thread Johannes Thumshirn
a regression that came in with -rc1 I'd rather like to have it fixed or at least have a band aid in place. Byte, Johannes -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr.

Re: [PATCH 1/3] block: remove blk_end_request_err and __blk_end_request_err

2017-04-13 Thread Johannes Thumshirn
On Wed, Apr 12, 2017 at 12:13:57PM +0200, Christoph Hellwig wrote: > Both functions are entirely unused. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Looks good, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de>

Re: [PATCH] block: bios with an offset are always gappy

2017-04-13 Thread Johannes Thumshirn
On Thu, Apr 13, 2017 at 11:48:35AM +0200, Christoph Hellwig wrote: > On Thu, Apr 13, 2017 at 10:06:29AM +0200, Johannes Thumshirn wrote: > > Doing a mkfs.btrfs on a (qemu emulated) PCIe NVMe causes a kernel panic > > in nvme_setup_prps() because the dma_len will drop below zero but

Re: [PATCH] block: bios with an offset are always gappy

2017-04-13 Thread Johannes Thumshirn
On Thu, Apr 13, 2017 at 06:02:21PM +0800, Ming Lei wrote: > Could you try the following patch to see if it fixes your issue? Sure, jsut have a short lunch break and then I'll report back. -- Johannes Thumshirn Storage jthumsh...@suse

Re: [PATCH] block: fix bio_will_gap()

2017-04-14 Thread Johannes Thumshirn
e segment > ends in unaligned virt boundary. This patch trys to avoid the > issue by not allowing to merge if the req starts with non-aligned > buffer. > > Also add comments to explain why the merged segment can't > end in unaligned virt boundary. > > Fixes: 729204ef49ec ("

[PATCH] block: bios with an offset are always gappy

2017-04-13 Thread Johannes Thumshirn
's offsets are not taken into account in the decision if the bio will gap any more. Restore the old behavior of checking bio offsets as well for the decision if a bio will gap. Signed-off-by: Johannes Thumshirn <jthumsh...@suse.de> Fixes: 729204ef49ec ("block: relax check on sg gap

Re: [PATCH] block: bios with an offset are always gappy

2017-04-13 Thread Johannes Thumshirn
On Thu, Apr 13, 2017 at 06:02:21PM +0800, Ming Lei wrote: > On Thu, Apr 13, 2017 at 10:06:29AM +0200, Johannes Thumshirn wrote: > > Doing a mkfs.btrfs on a (qemu emulated) PCIe NVMe causes a kernel panic > > in nvme_setup_prps() because the dma_len will drop below zero but

Re: [PATCH] block: bios with an offset are always gappy

2017-04-13 Thread Johannes Thumshirn
On Thu, Apr 13, 2017 at 10:45:10PM +0800, Ming Lei wrote: > On Thu, Apr 13, 2017 at 01:53:28PM +0200, Johannes Thumshirn wrote: > > On Thu, Apr 13, 2017 at 06:02:21PM +0800, Ming Lei wrote: > > > On Thu, Apr 13, 2017 at 10:06:29AM +0200, Johannes Thumshirn wrote: > >

Re: [PATCH 11/23] dm rq: don't pass irrelevant error code to blk_mq_complete_request

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:04PM +0200, Christoph Hellwig wrote: > dm never uses rq->errors, so there is no need to pass an error argument > to blk_mq_complete_request. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Reviewed-by: Johannes Thumshirn <jthum

Re: [PATCH 12/23] dm mpath: don't check for req->errors

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:05PM +0200, Christoph Hellwig wrote: > We'll get all proper errors reported through ->end_io and ->errors will > go away soon. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Reviewed-by: Johannes Thumshirn <jthumsh...@s

Re: [PATCH 21/23] swim3: remove (commented out) printing of req->errors

2017-04-20 Thread Johannes Thumshirn
On Thu, Apr 20, 2017 at 04:03:14PM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig <h...@lst.de> > --- Easy enough, Reviewed-by: Johannes Thumshirn <jthumsh...@suse.de> -- Johannes Thumshirn Storage

  1   2   3   4   >