Re: [PATCH 1/2] blk-mq: Export iterating all tagged requests

2018-12-01 Thread Hannes Reinecke
On 12/1/18 5:48 PM, Christoph Hellwig wrote: On Fri, Nov 30, 2018 at 01:36:09PM -0700, Jens Axboe wrote: On 11/30/18 1:26 PM, Keith Busch wrote: A driver may wish to iterate every tagged request, not just ones that satisfy blk_mq_request_started(). The intended use is so a driver may terminate

Re: [PATCH 16/16] block: remove the queue_lock indirection

2018-11-14 Thread Hannes Reinecke
++--- block/blk-sysfs.c | 4 +-- block/blk-throttle.c| 22 +++ drivers/block/pktcdvd.c | 4 +-- drivers/ide/ide-pm.c| 10 +++ include/linux/blkdev.h | 8 +- 14 files changed, 85 insertions(+), 99 deletions(-) Reviewed-by: Hannes Reinecke Cheers

Re: [PATCH 14/16] mmc: stop abusing the request queue_lock pointer

2018-11-14 Thread Hannes Reinecke
deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. No

Re: [PATCH 15/16] block: remove the lock argument to blk_alloc_queue_node

2018-11-14 Thread Hannes Reinecke
+-- 10 files changed, 12 insertions(+), 24 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendör

Re: [PATCH 13/16] mmc: simplify queue initialization

2018-11-14 Thread Hannes Reinecke
++-- drivers/mmc/core/queue.h | 3 +- 3 files changed, 32 insertions(+), 59 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldst

Re: [PATCH 12/16] umem: don't override the queue_lock

2018-11-14 Thread Hannes Reinecke
failed_alloc; Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. U

Re: [PATCH 10/16] blk-cgroup: move locking into blkg_destroy_all

2018-11-14 Thread Hannes Reinecke
On 11/14/18 5:02 PM, Christoph Hellwig wrote: Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networki

Re: [PATCH 11/16] drbd: don't override the queue_lock

2018-11-14 Thread Hannes Reinecke
*adm_ctx, unsig drbd_init_set_defaults(device); - q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, >req_lock); + q = blk_alloc_queue_node(GFP_KERNEL, NUMA_NO_NODE, NULL); if (!q) goto out_no_q; device->rq_queue = q; Reviewed-by: Hannes Re

Re: [PATCH 09/16] blk-cgroup: consolidate error handling in blkcg_init_queue

2018-11-14 Thread Hannes Reinecke
On 11/14/18 5:02 PM, Christoph Hellwig wrote: Use a goto label to merge two identical pieces of error handling code. Signed-off-by: Christoph Hellwig --- block/blk-cgroup.c | 22 ++ 1 file changed, 10 insertions(+), 12 deletions(-) Reviewed-by: Hannes Reinecke Cheers

Re: [PATCH 08/16] block: remove a few unused exports

2018-11-14 Thread Hannes Reinecke
deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmany

Re: [PATCH 06/16] block-iolatency: remove the unused lock argument to rq_qos_throttle

2018-11-14 Thread Hannes Reinecke
/blk-wbt.c | 16 5 files changed, 15 insertions(+), 36 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX

Re: [PATCH 07/16] block: update a few comments for the legacy request removal

2018-11-14 Thread Hannes Reinecke
ock_irq(q->queue_lock or fq->mq_flush_lock) + * spin_lock_irq(fq->mq_flush_lock) * */ static void blk_kick_flush(struct request_queue *q, struct blk_flush_queue *fq, Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & N

Re: [PATCH 05/16] block: remove queue_lockdep_assert_held

2018-11-14 Thread Hannes Reinecke
- 2 files changed, 14 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffe

Re: [PATCH 04/16] block: use atomic bitops for ->queue_flags

2018-11-14 Thread Hannes Reinecke
56 -- include/linux/blkdev.h | 1 - 6 files changed, 24 insertions(+), 127 deletions(-) I wonder if we can't remove the 'blk_queue_flag_XXX' helpers and replace them with inlines ... Otherwise: Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reine

Re: [PATCH 03/16] block: don't hold the queue_lock over blk_abort_request

2018-11-14 Thread Hannes Reinecke
/mtip32xx/mtip32xx.c | 5 + drivers/scsi/libsas/sas_ata.c | 5 - drivers/scsi/libsas/sas_scsi_host.c | 10 ++ 5 files changed, 4 insertions(+), 22 deletions(-) After all the pain we went through with aborts ... Reviewed-by: Hannes Reinecke Cheers Hannes -- Dr. Hannes

Re: [PATCH 02/16] block: remove deadline __deadline manipulation helpers

2018-11-14 Thread Hannes Reinecke
(+), 43 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guil

Re: [PATCH 01/16] block: remove QUEUE_FLAG_BYPASS and ->bypass

2018-11-14 Thread Hannes Reinecke
-throttle.c | 3 --- include/linux/blk-cgroup.h | 6 +- include/linux/blkdev.h | 3 --- 6 files changed, 1 insertion(+), 48 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@sus

Re: [PATCH 6/6] ide: don't use req->special

2018-11-10 Thread Hannes Reinecke
/ide-tape.c | 2 +- > drivers/ide/ide-taskfile.c | 2 +- > include/linux/ide.h| 1 + > 12 files changed, 31 insertions(+), 26 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de

Re: [PATCH 5/6] pd: replace ->special use with private data in the request

2018-11-10 Thread Hannes Reinecke
On 11/9/18 7:32 PM, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > --- > drivers/block/paride/pd.c | 30 +- > 1 file changed, 25 insertions(+), 5 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr.

Re: [PATCH 4/6] aoe: replace ->special use with private data in the request

2018-11-10 Thread Hannes Reinecke
> drivers/block/aoe/aoedev.c | 11 ++- > 4 files changed, 20 insertions(+), 23 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUS

Re: [PATCH 3/6] skd_main: don't use req->special

2018-11-10 Thread Hannes Reinecke
rtions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guil

Re: [PATCH 2/6] nullb: remove leftover legacy request code

2018-11-10 Thread Hannes Reinecke
++-- > 1 file changed, 3 insertions(+), 6 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF:

Re: [PATCH 1/6] fnic: fix fnic_scsi_host_{start,end}_tag

2018-11-10 Thread Hannes Reinecke
*fnic, struct scsi_cmnd *sc) > { > - struct request *dummy = sc->request->special; > + struct request *dummy = (struct request *)sc->host_scribble; > > blk_mq_free_request(dummy); > } > The entire device_reset for fnic should be redone; which reminds me

Re: [PATCH 14/14] nvme: add separate poll queue map

2018-10-29 Thread Hannes Reinecke
--- drivers/nvme/host/pci.c | 103 +--- include/linux/blk-mq.h | 2 +- 2 files changed, 88 insertions(+), 17 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 13/14] block: add REQ_HIPRI and inherit it from IOCB_HIPRI

2018-10-29 Thread Hannes Reinecke
to the lower layers as well. Signed-off-by: Jens Axboe --- fs/block_dev.c| 2 ++ fs/direct-io.c| 2 ++ fs/iomap.c| 9 - include/linux/blk_types.h | 4 +++- 4 files changed, 15 insertions(+), 2 deletions(-) Reviewed-by: Hannes Reinecke

Re: [PATCH 12/14] nvme: utilize two queue maps, one for reads and one for writes

2018-10-29 Thread Hannes Reinecke
, one for reads and one for writes, the latter using the configurable number of queues (hardware queue counts permitting). Signed-off-by: Jens Axboe --- drivers/nvme/host/pci.c | 139 +--- 1 file changed, 131 insertions(+), 8 deletions(-) Reviewed-by: Hannes

Re: [PATCH 10/14] blk-mq: initial support for multiple queue maps

2018-10-29 Thread Hannes Reinecke
-cpumap.c | 9 + block/blk-mq-pci.c | 2 +- block/blk-mq-virtio.c | 2 +- include/linux/blk-mq.h | 3 ++- 4 files changed, 9 insertions(+), 7 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 09/14] blk-mq: ensure that plug lists don't straddle hardware queues

2018-10-29 Thread Hannes Reinecke
(+), 2 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 08/14] blk-mq: separate number of hardware queues from nr_cpu_ids

2018-10-29 Thread Hannes Reinecke
ple queue maps. Signed-off-by: Jens Axboe --- block/blk-mq.c | 28 +--- 1 file changed, 21 insertions(+), 7 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 07/14] blk-mq: support multiple hctx maps

2018-10-29 Thread Hannes Reinecke
| 19 ++ include/linux/blk-mq.h | 7 3 files changed, 76 insertions(+), 35 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 06/14] blk-mq: add 'type' attribute to the sysfs hctx directory

2018-10-29 Thread Hannes Reinecke
On 10/25/18 11:16 PM, Jens Axboe wrote: It can be useful for a user to verify what type a given hardware queue is, expose this information in sysfs. Signed-off-by: Jens Axboe --- block/blk-mq-sysfs.c | 10 ++ 1 file changed, 10 insertions(+) Reviewed-by: Hannes Reinecke Cheers

Re: [PATCH 05/14] blk-mq: allow software queue to map to multiple hardware queues

2018-10-29 Thread Hannes Reinecke
Axboe --- block/blk-mq-sched.c | 2 +- block/blk-mq.c | 18 -- block/blk-mq.h | 2 +- block/kyber-iosched.c | 6 +++--- include/linux/blk-mq.h | 3 ++- 5 files changed, 19 insertions(+), 12 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 04/14] blk-mq: pass in request/bio flags to queue mapping

2018-10-29 Thread Hannes Reinecke
++ block/blk-mq-tag.c | 5 +++-- block/blk-mq.c | 50 +++--- block/blk-mq.h | 8 --- block/blk.h| 6 ++--- 7 files changed, 58 insertions(+), 38 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 03/14] blk-mq: provide dummy blk_mq_map_queue_type() helper

2018-10-29 Thread Hannes Reinecke
_queue *q, + int type, int cpu) +{ + return blk_mq_map_queue(q, cpu); +} + /* * sysfs helpers */ Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 02/14] blk-mq: abstract out queue map

2018-10-29 Thread Hannes Reinecke
/linux/blk-mq.h| 13 -- 15 files changed, 63 insertions(+), 49 deletions(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 01/14] blk-mq: kill q->mq_map

2018-10-29 Thread Hannes Reinecke
ons(-) Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH] blk-mq-debugfs: Also show requests that have not yet been started

2018-10-04 Thread Hannes Reinecke
te(rq) != MQ_RQ_IDLE) + if (blk_mq_map_queue(rq->q, rq->mq_ctx->cpu) == params->hctx) __blk_mq_debugfs_rq_show(params->m, list_entry_rq(>queuelist)); } Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes Reinecke

[PATCH 2/5] nvme: register ns_id attributes as default sysfs groups

2018-09-28 Thread Hannes Reinecke
We should be registering the ns_id attribute as default sysfs attribute groups, otherwise we have a race condition between the uevent and the attributes appearing in sysfs. Suggested-by: Bart van Assche Signed-off-by: Hannes Reinecke --- drivers/nvme/host/core.c | 21 - drivers

[PATCH 1/5] block: genhd: add 'groups' argument to device_add_disk

2018-09-28 Thread Hannes Reinecke
-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- arch/um/drivers/ubd_kern.c | 2 +- block/genhd.c | 19 ++- drivers/block/floppy.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 2 +- drivers/block

[PATCH 4/5] zram: register default groups with device_add_disk()

2018-09-28 Thread Hannes Reinecke
Register default sysfs groups during device_add_disk() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Cc: Minchan Kim Cc: Nitin Gupta Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/block/zram/zram_drv.c | 28

[PATCH 5/5] virtio-blk: modernize sysfs attribute creation

2018-09-28 Thread Hannes Reinecke
Use new-style DEVICE_ATTR_RO/DEVICE_ATTR_RW to create the sysfs attributes and register the disk with default sysfs attribute groups. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Michael S. Tsirkin Reviewed-by: Bart Van Assche --- drivers/block/virtio_blk.c | 68

[PATCHv4 0/5] genhd: register default groups with device_add_disk()

2018-09-28 Thread Hannes Reinecke
to v2: - Fold lightnvm attributes into the generic attribute group as suggested by Bart Changes to v1: - Drop first patch - Convert lightnvm sysfs attributes as suggested by Bart Hannes Reinecke (5): block: genhd: add 'groups' argument to device_add_disk nvme: register ns_id attributes

[PATCH 3/5] aoe: register default groups with device_add_disk()

2018-09-28 Thread Hannes Reinecke
Register default sysfs groups during device_add_disk() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Ed L. Cachin Reviewed-by: Bart Van Assche --- drivers/block/aoe/aoe.h| 1 - drivers/block/aoe/aoeblk.c | 21

Re: REQ_OP_WRITE_ZEROES clash with REQ_FAILFAST_TRANSPORT ?

2018-09-21 Thread Hannes Reinecke
On 9/21/18 11:15 AM, Hannes Reinecke wrote: Hi all, there's one thing which decidedly puzzles me: [ .. ] Ah. Screw that. REQ_OP_XXX is a number, and the others are a bitmask. Sorry for the noise. Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networki

REQ_OP_WRITE_ZEROES clash with REQ_FAILFAST_TRANSPORT ?

2018-09-21 Thread Hannes Reinecke
Q_OP_MASK) will actually _exclude_ REQ_WRITE_ZEROES. Am I correct? Is this intended? Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörf

Re: [PATCH V3 00/17] SCSI: introduce per-host admin queue & enable runtime PM

2018-09-17 Thread Hannes Reinecke
LPSS we've discussed this issue and came up with a different proposal: Allocate a PM request before _suspending_. Then we trivially have that request available when resuming, and are sure that nothing can block the request. Far simpler, and doesn't require an entirely new infrastructure.

Re: [PATCH 2/5] nvme: register ns_id attributes as default sysfs groups

2018-09-06 Thread Hannes Reinecke
On 09/05/2018 03:45 PM, Christoph Hellwig wrote: > On Wed, Sep 05, 2018 at 03:32:03PM +0200, Hannes Reinecke wrote: >> On 09/05/2018 03:18 PM, Christoph Hellwig wrote: >>> On Wed, Sep 05, 2018 at 09:00:50AM +0200, Hannes Reinecke wrote: >>>> We should be registering

Re: [PATCH 2/5] nvme: register ns_id attributes as default sysfs groups

2018-09-05 Thread Hannes Reinecke
On 09/05/2018 03:18 PM, Christoph Hellwig wrote: > On Wed, Sep 05, 2018 at 09:00:50AM +0200, Hannes Reinecke wrote: >> We should be registering the ns_id attribute as default sysfs >> attribute groups, otherwise we have a race condition between >> the uevent and the attribut

[PATCH 2/5] nvme: register ns_id attributes as default sysfs groups

2018-09-05 Thread Hannes Reinecke
We should be registering the ns_id attribute as default sysfs attribute groups, otherwise we have a race condition between the uevent and the attributes appearing in sysfs. Signed-off-by: Hannes Reinecke --- drivers/nvme/host/core.c | 21 - drivers/nvme/host/lightnvm.c | 106

[PATCH 4/5] zram: register default groups with device_add_disk()

2018-09-05 Thread Hannes Reinecke
Register default sysfs groups during device_add_disk() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Cc: Minchan Kim Cc: Nitin Gupta Reviewed-by: Christoph Hellwig Reviewed-by: Bart Van Assche --- drivers/block/zram/zram_drv.c | 28

[PATCH 1/5] block: genhd: add 'groups' argument to device_add_disk

2018-09-05 Thread Hannes Reinecke
-by: Hannes Reinecke Reviewed-by: Christoph Hellwig --- arch/um/drivers/ubd_kern.c | 2 +- block/genhd.c | 19 ++- drivers/block/floppy.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 2 +- drivers/block/ps3disk.c | 2

[PATCH 3/5] aoe: use device_add_disk_with_groups()

2018-09-05 Thread Hannes Reinecke
Use device_add_disk_with_groups() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Ed L. Cachin Reviewed-by: Bart Van Assche --- drivers/block/aoe/aoe.h| 1 - drivers/block/aoe/aoeblk.c | 21

[PATCH 5/5] virtio-blk: modernize sysfs attribute creation

2018-09-05 Thread Hannes Reinecke
Use new-style DEVICE_ATTR_RO/DEVICE_ATTR_RW to create the sysfs attributes and register the disk with default sysfs attribute groups. Signed-off-by: Hannes Reinecke Reviewed-by: Christoph Hellwig Acked-by: Michael S. Tsirkin Reviewed-by: Bart Van Assche --- drivers/block/virtio_blk.c | 68

[PATCHv3 0/5] genhd: register default groups with device_add_disk()

2018-09-05 Thread Hannes Reinecke
Changes to v1: - Drop first patch - Convert lightnvm sysfs attributes as suggested by Bart Hannes Reinecke (5): block: genhd: add 'groups' argument to device_add_disk nvme: register ns_id attributes as default sysfs groups aoe: use device_add_disk_with_groups() zram: register default groups

Re: [PATCH 3/6] nvme: register ns_id attributes as default sysfs groups

2018-08-14 Thread Hannes Reinecke
On 08/13/2018 09:51 PM, Bart Van Assche wrote: > On Mon, 2018-07-30 at 09:12 +0200, Hannes Reinecke wrote: >> @@ -3061,11 +3066,7 @@ static void nvme_alloc_ns(struct nvme_ctrl *ctrl, >> unsigned nsid) >> >> nvme_get_ctrl(ctrl); >> >> -devic

Re: [PATCH v2 0/2] Fix a race condition related to creation of /dev/nvme0n

2018-08-13 Thread Hannes Reinecke
On 08/13/2018 07:25 PM, Bart Van Assche wrote: Hello Jens, The two patches in this series fix a race condition related to the creation of the sysfs attributes for the /dev/nvme0n devices nodes. I encountered this race while adding tests to the blktests project for the NVMeOF kernel drivers.

Re: [PATCH v4 02/10] block, scsi: Give RQF_PREEMPT back its original meaning

2018-08-06 Thread Hannes Reinecke
el; we're using the QUIESCE state there to do domain validation, and all commands there are most definitely not PM requests. Can you please validate your patches with eg aic7xxx and SCSI parallel disks? Thanks. Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking

Re: [PATCH v4 01/10] block: Change the preempt-only flag into a counter

2018-08-06 Thread Hannes Reinecke
nchao Wang > Cc: Ming Lei > Cc: Johannes Thumshirn > Cc: Alan Stern > --- > block/blk-core.c| 35 ++- > block/blk-mq-debugfs.c | 10 +- > drivers/scsi/scsi_lib.c | 8 > include/linux/blkdev.h | 14 +++++-

[PATCH] block: copy ioprio in __bio_clone_fast()

2018-08-01 Thread Hannes Reinecke
We need to copy the io priority, too; otherwise the clone will run with a different priority than the original one. Fixes: 43b62ce3ff0a ("block: move bio io prio to a new field") Signed-off-by: Hannes Reinecke --- block/bio.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/blo

Re: [PATCH 4/6] aoe: use device_add_disk_with_groups()

2018-08-01 Thread Hannes Reinecke
On 08/01/2018 03:00 AM, Ed Cashin wrote: > On Mon, Jul 30, 2018 at 3:12 AM Hannes Reinecke <mailto:h...@suse.de>> wrote: > > Use device_add_disk_with_groups() to avoid a race condition with > udev during startup. > > > I love the idea of getting rid of the

Re: [PATCH 1/6] genhd: drop 'bool' argument from __device_add_disk()

2018-07-30 Thread Hannes Reinecke
On 07/30/2018 10:56 AM, Christoph Hellwig wrote: > I really don't see the point for this change. > Okay, I'll be dropping it on the next iteration. Cheers, Hannes -- Dr. Hannes ReineckezSeries & Storage h...@suse.com +49

[PATCH 3/6] nvme: register ns_id attributes as default sysfs groups

2018-07-30 Thread Hannes Reinecke
We should be registering the ns_id attribute as default sysfs attribute groups, otherwise we have a race condition between the uevent and the attributes appearing in sysfs. Signed-off-by: Hannes Reinecke Cc: Sagi Grimberg Cc: Keith Busch --- drivers/nvme/host/core.c | 13

[PATCH 2/6] block: genhd: add 'groups' argument to device_add_disk

2018-07-30 Thread Hannes Reinecke
-by: Hannes Reinecke --- arch/um/drivers/ubd_kern.c | 2 +- block/genhd.c | 21 +++-- drivers/block/floppy.c | 2 +- drivers/block/mtip32xx/mtip32xx.c | 2 +- drivers/block/ps3disk.c | 2 +- drivers/block/ps3vram.c

[PATCH 1/6] genhd: drop 'bool' argument from __device_add_disk()

2018-07-30 Thread Hannes Reinecke
Split off the last part of __device_add_disk() and move it into the caller. Signed-off-by: Hannes Reinecke --- block/genhd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index 8cc719a37b32..62aba3d8ae19 100644

[PATCH 6/6] virtio-blk: modernize sysfs attribute creation

2018-07-30 Thread Hannes Reinecke
Use new-style DEVICE_ATTR_RO/DEVICE_ATTR_RW to create the sysfs attributes and register the disk with default sysfs attribute groups. Signed-off-by: Hannes Reinecke Cc: Michael Tsirkin Cc: Jason Wang --- drivers/block/virtio_blk.c | 68 ++ 1 file

[PATCH 4/6] aoe: use device_add_disk_with_groups()

2018-07-30 Thread Hannes Reinecke
Use device_add_disk_with_groups() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Cc: Ed L. Cachin --- drivers/block/aoe/aoe.h| 1 - drivers/block/aoe/aoeblk.c | 21 +++-- drivers/block/aoe/aoedev.c | 1 - 3 files changed, 7 insertions

[PATCH 5/6] zram: register default groups with device_add_disk()

2018-07-30 Thread Hannes Reinecke
Register default sysfs groups during device_add-disk() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke Cc: Minchan Kim Cc: Nitin Gupta --- drivers/block/zram/zram_drv.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff

[PATCH 0/6] genhd: register default groups with device_add_disk()

2018-07-30 Thread Hannes Reinecke
to use it. There are some more drivers which might benefit from this (eg loop or md), but the interface is not straightforward so I haven't attempted it. As usual, comments and reviews are welcome. Hannes Reinecke (6): genhd: drop 'bool' argument from __device_add_disk() block: genhd: add 'groups

Re: [PATCH] blktests: Add '--outdir' to store results in a different directory

2018-07-26 Thread Hannes Reinecke
On 07/25/2018 11:23 PM, Omar Sandoval wrote: > On Tue, Jul 17, 2018 at 03:27:50PM +0200, Hannes Reinecke wrote: >> Adding an option '--outdir' to store results in a different >> director so as not to clutter the git repository itself. >> >> Signed-off-by: Hannes Rein

Re: [PATCH v5 2/3] blkdev: __blkdev_direct_IO_simple: fix leak in error case

2018-07-26 Thread Hannes Reinecke
(+), 4 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guil

[PATCH 1/5] genhd: drop 'bool' argument from __device_add_disk()

2018-07-25 Thread Hannes Reinecke
Split off the last part of __device_add_disk() into __device_get_disk(). With that we can drop the 'bool' argument and streamline the function. Signed-off-by: Hannes Reinecke --- block/genhd.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/block/genhd.c

[PATCH 0/5] genhd: implement device_add_disk_with_groups()

2018-07-25 Thread Hannes Reinecke
before the sysfs attributes are created, and udev fails to read the required information. This patchset adds a new function 'device_add_disk_with_groups()' and converts the obvious candidates to use this new function. As usual, comments and reviews are welcome. Hannes Reinecke (5): genhd: drop

[PATCH 2/5] block: genhd: add device_add_disk_with_groups

2018-07-25 Thread Hannes Reinecke
-by: Hannes Reinecke --- block/genhd.c | 28 +++- include/linux/genhd.h | 3 +++ 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/block/genhd.c b/block/genhd.c index cfa7f4f78435..fbe27cb2c9d7 100644 --- a/block/genhd.c +++ b/block/genhd.c @@ -567,7

[PATCH 4/5] aoe: use device_add_disk_with_groups()

2018-07-25 Thread Hannes Reinecke
Use device_add_disk_with_groups() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke --- drivers/block/aoe/aoe.h| 1 - drivers/block/aoe/aoeblk.c | 21 +++-- drivers/block/aoe/aoedev.c | 1 - 3 files changed, 7 insertions(+), 16 deletions

[PATCH 3/5] nvme: register ns_id attributes as default sysfs groups

2018-07-25 Thread Hannes Reinecke
We should be registering the ns_id attribute as default sysfs attribute groups, otherwise we have a race condition between the uevent and the attributes appearing in sysfs. Signed-off-by: Hannes Reinecke --- drivers/nvme/host/core.c | 14 +++--- drivers/nvme/host/multipath.c | 12

[PATCH 5/5] zram: use device_add_disk_with_groups()

2018-07-25 Thread Hannes Reinecke
Use device_add_disk_with_groups() to avoid a race condition with udev during startup. Signed-off-by: Hannes Reinecke --- drivers/block/zram/zram_drv.c | 28 +++- 1 file changed, 7 insertions(+), 21 deletions(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block

Re: [PATCH 2/2] blktests: add test for ANA state transition

2018-07-23 Thread Hannes Reinecke
On 07/21/2018 11:29 PM, Chaitanya Kulkarni wrote: From: linux-block-ow...@vger.kernel.org on behalf of Hannes Reinecke Sent: Tuesday, July 17, 2018 6:31 AM To: Omar Sandoval Cc: Christoph Hellwig; Sagi Grimberg; Keith Busch; linux-n...@lists.infradead.org; linux-block@vger.kernel.org; Hannes

Re: [PATCH 0/2] Fix silent data corruption in blkdev_direct_IO()

2018-07-19 Thread Hannes Reinecke
he blktest suite? This issue is something we really should cover there too, seeing the amount of time we've spend debugging it... Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX Gmb

Re: [PATCH 2/2] blkdev: __blkdev_direct_IO_simple: make sure to fill up the bio

2018-07-19 Thread Hannes Reinecke
Fixes: 72ecad22d9f1 ("block: support a full bio worth of IO for simplified > bdev direct-io") > Signed-off-by: Martin Wilck > --- > fs/block_dev.c | 8 +++- > 1 file changed, 7 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 1/2] block: bio_iov_iter_get_pages: fix size of last iovec

2018-07-19 Thread Hannes Reinecke
ck > --- > block/bio.c | 18 -- > 1 file changed, 8 insertions(+), 10 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE L

[PATCH 2/2] blktests: add test for ANA state transition

2018-07-17 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- tests/nvme/014 | 158 + tests/nvme/014.out | 17 ++ 2 files changed, 175 insertions(+) create mode 100755 tests/nvme/014 create mode 100644 tests/nvme/014.out diff --git a/tests/nvme/014 b/tests

[PATCH 1/2] blktests: enable ANA support

2018-07-17 Thread Hannes Reinecke
Update nvme functions to support ANA. Signed-off-by: Hannes Reinecke --- tests/nvme/rc | 49 ++--- 1 file changed, 46 insertions(+), 3 deletions(-) diff --git a/tests/nvme/rc b/tests/nvme/rc index fb5dbdf..116661d 100644 --- a/tests/nvme/rc +++ b

[PATCH 0/2] blktests: test ANA base support

2018-07-17 Thread Hannes Reinecke
Hi all, here's a small patchset for testing ANA base support. The test itself requires the ANA patchset from Christoph, plus the fixes I've sent to the mailing list earlier. Hannes Reinecke (2): blktests: enable ANA support blktests: add test for ANA state transition tests/nvme/014

[PATCH] blktests: Add '--outdir' to store results in a different directory

2018-07-17 Thread Hannes Reinecke
Adding an option '--outdir' to store results in a different director so as not to clutter the git repository itself. Signed-off-by: Hannes Reinecke --- check | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/check b/check index a635531..42d07f8 100755

Re: Silent data corruption in blkdev_direct_IO()

2018-07-12 Thread Hannes Reinecke
On 07/12/2018 05:08 PM, Jens Axboe wrote: On 7/12/18 8:36 AM, Hannes Reinecke wrote: Hi Jens, Christoph, we're currently hunting down a silent data corruption occurring due to commit 72ecad22d9f1 ("block: support a full bio worth of IO for simplified bdev direct-io"). While the w

Silent data corruption in blkdev_direct_IO()

2018-07-12 Thread Hannes Reinecke
c() I found that bvec_alloc() will fail if nr_pages > BIO_MAX_PAGES. So why is there the check for 'nr_pages <= BIO_MAX_PAGES' ? It's not that we can handle it in __blkdev_direct_IO() ... Thanks for any clarification. Cheers, Hannes -- Dr. Hannes ReineckeTeamlead

Re: [PATCH blktests v2 3/3] Add tests for the SRP initiator and target drivers

2018-07-09 Thread Hannes Reinecke
one path > const prioritizer refcount 1 > none checker refcount 1 > exit (signal) > ^CReleasing uevent_monitor() resources > Releasing uevent_listen() resources > unloading none checker > unloading tur checker > unloading sysfs prioritizer > unloading const prioritizer > unlink pidfile > shut down--- > Weelll ... that's to be expected. You are running with RH-style defaults, which won't be starting multipath if a) only one path is set and b) if it's not registered in the wwids file You can switch off this behaviour with the option find_multipaths no Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton HRB 21284 (AG Nürnberg)

Re: [PATCH blktests v2 3/3] Add tests for the SRP initiator and target drivers

2018-07-03 Thread Hannes Reinecke
nk generation strongly depends on the OS you're running. With a recent distro you should be getting a lot of symlinks with the WWN of the disk in it, like /dev/disk/by-id/dm-uuid-mpath- /dev/disk/by-id/dm-name- /dev/disk/by-id/scsi- /dev/disk/by-id/wwn- originally we just specified /dev/disk/by-id/scsi-

Re: [PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-15 Thread Hannes Reinecke
On 06/15/2018 04:07 PM, Bart Van Assche wrote: On Thu, 2018-06-14 at 15:38 +0200, Hannes Reinecke wrote: For performance reasons we should be able to allocate all memory from a given NUMA node, so this patch adds a new parameter 'rd_numa_node' to allow the user to specify the NUMA node id. When

Re: [PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-15 Thread Hannes Reinecke
On 06/14/2018 10:53 PM, Adam Manzanares wrote: [ .. ] Then how about a numactl ... dd /dev/ram ... after the modprobe. Yes of course, or you could do that for every application that ends up in the path of the doing IO to it. The point of the option is to just make it explicit, and not have to

Re: [PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-14 Thread Hannes Reinecke
On Thu, 14 Jun 2018 09:33:35 -0600 Jens Axboe wrote: > On 6/14/18 9:29 AM, Hannes Reinecke wrote: > > On Thu, 14 Jun 2018 08:47:33 -0600 > > Jens Axboe wrote: > > > >> On 6/14/18 7:38 AM, Hannes Reinecke wrote: > >>> For performance reason

Re: [PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-14 Thread Hannes Reinecke
On Thu, 14 Jun 2018 08:47:33 -0600 Jens Axboe wrote: > On 6/14/18 7:38 AM, Hannes Reinecke wrote: > > For performance reasons we should be able to allocate all memory > > from a given NUMA node, so this patch adds a new parameter > > 'rd_numa_node' to allow the user to spe

[PATCH] brd: Allow ramdisk to be allocated on selected NUMA node

2018-06-14 Thread Hannes Reinecke
-by: Hannes Reinecke --- drivers/block/brd.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/block/brd.c b/drivers/block/brd.c index bb976598ee43..7142d836539e 100644 --- a/drivers/block/brd.c +++ b/drivers/block/brd.c @@ -36,6 +36,7 @@ */ struct

Re: [PATCH] blktrace: display failfast and driver-specific flags

2018-06-07 Thread Hannes Reinecke
On Thu, 7 Jun 2018 13:24:23 +0200 Christoph Hellwig wrote: > Good idea to display the flags, but the characters aren't really > very self-describing. Should we prefix each with an f maybe? Honestly, I don't care. Just wanted to stick with the one-letter acronym like all the others did. But in

[PATCH] blktrace: display failfast and driver-specific flags

2018-06-07 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- kernel/trace/blktrace.c | 8 1 file changed, 8 insertions(+) diff --git a/kernel/trace/blktrace.c b/kernel/trace/blktrace.c index 987d9a9ae283..238e16211a5c 100644 --- a/kernel/trace/blktrace.c +++ b/kernel/trace/blktrace.c @@ -1922,6 +1922,14 @@ void

[PATCHv2] block: always set partition number to '0' in blk_partition_remap()

2018-06-07 Thread Hannes Reinecke
for native nvme multipathing) one of the lower-level devices do _not_support partitioning a spurious I/O error is generated. Signed-off-by: Hannes Reinecke --- block/blk-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index 3f56be15f17e

Re: [PATCH] block: always set partition number to '0' in blk_partition_remap()

2018-06-06 Thread Hannes Reinecke
On Wed, 6 Jun 2018 08:26:56 -0600 Jens Axboe wrote: > On 6/6/18 8:22 AM, Hannes Reinecke wrote: > > blk_partition_remap() will only clear bi_partno if an actual > > remapping has happened. But flush request et al don't have an > > actual size, so the remapping doesn't

[PATCH] block: always set partition number to '0' in blk_partition_remap()

2018-06-06 Thread Hannes Reinecke
for native nvme multipathing) one of the lower-level devices do _not_support partitioning a spurious I/O error is generated. Signed-off-by: Hannes Reinecke --- block/blk-core.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c index

[PATCH] block: pass failfast and driver-specific flags to flush requests

2018-06-06 Thread Hannes Reinecke
If flush requests are being sent to the device we need to inherit the failfast and driver-specific flags, too, otherwise I/O will fail. Signed-off-by: Hannes Reinecke --- block/blk-flush.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/block/blk-flush.c b/block/blk

Re: [PATCH 12/12] nvme: limit warnings from nvme_identify_ns

2018-06-04 Thread Hannes Reinecke
Johannes Thumshirn > --- > drivers/nvme/host/core.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

  1   2   3   4   5   6   >