Re: [PATCH 10/12] nvme: mark nvme_queue_scan static

2018-06-04 Thread Hannes Reinecke
vers/nvme/host/nvme.h | 1 - > 2 files changed, 9 insertions(+), 11 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 11/12] nvme: use the changed namespaces list log to clear ns data changed AENs

2018-06-04 Thread Hannes Reinecke
as well use it to optimize the rescan. > > Signed-off-by: Christoph Hellwig > --- > drivers/nvme/host/core.c | 51 > drivers/nvme/host/nvme.h | > 2 ++ 2 files changed, 49 insertions(+), 4 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 08/12] nvmet: mask pending AERs

2018-06-04 Thread Hannes Reinecke
ivers/nvme/target/admin-cmd.c | 1 + > drivers/nvme/target/core.c | 9 - > drivers/nvme/target/nvmet.h | 1 + > 3 files changed, 10 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 06/12] nvmet: implement the changed namespaces log

2018-06-04 Thread Hannes Reinecke
++ > drivers/nvme/target/core.c | 50 > +++-- drivers/nvme/target/nvmet.h | > 3 ++ 3 files changed, 70 insertions(+), 9 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 05/12] nvmet: split log page implementation

2018-06-04 Thread Hannes Reinecke
laborate ANA log page. > > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > drivers/nvme/target/admin-cmd.c | 99 > - 1 file changed, 36 insertions(+), > 63 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 04/12] nvmet: add a new nvmet_zero_sgl helper

2018-06-04 Thread Hannes Reinecke
es changed, 8 insertions(+) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 01/12] nvme.h: untangle AEN notice definitions

2018-06-04 Thread Hannes Reinecke
- > include/linux/nvme.h | 8 ++-- > 2 files changed, 24 insertions(+), 14 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 01/12] nvme.h: untangle AEN notice definitions

2018-06-04 Thread Hannes Reinecke
- > include/linux/nvme.h | 8 ++-- > 2 files changed, 24 insertions(+), 14 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 02/12] nvme.h: add the changed namespace list log

2018-06-04 Thread Hannes Reinecke
On Wed, 30 May 2018 18:45:50 +0200 Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig > Reviewed-by: Johannes Thumshirn > --- > include/linux/nvme.h | 3 +++ > 1 file changed, 3 insertions(+) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 4/4] bcache: Replace bch_read_string_list() by __sysfs_match_string()

2018-05-29 Thread Hannes Reinecke
vchenko > Signed-off-by: Coly Li > --- > drivers/md/bcache/sysfs.c | 44 > --- 1 file changed, 9 > insertions(+), 35 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 3/4] bcache: Move couple of functions to sysfs.c

2018-05-29 Thread Hannes Reinecke
, 35 insertions(+), 40 deletions(-) > Reviewed-by: Hannes Reinecke Cheers, Hannes

Re: [PATCH 2/4] bcache: Move couple of string arrays to sysfs.c

2018-05-29 Thread Hannes Reinecke
ntended. > > Signed-off-by: Andy Shevchenko > Signed-off-by: Coly Li > --- > drivers/md/bcache/bcache.h | 2 -- > drivers/md/bcache/super.c | 18 -- > drivers/md/bcache/sysfs.c | 18 ++ > 3 files changed, 18 insertions(+), 20 deleti

Re: [PATCH 11/14] block: document the blk_eh_timer_return values

2018-05-23 Thread Hannes Reinecke
_TIMER, + BLK_EH_DONE,/* drivers has completed the command */ + BLK_EH_RESET_TIMER, /* reset timer and try again */ }; typedef enum blk_eh_timer_return (rq_timed_out_fn)(struct request *); Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 09/14] libiscsi: don't try to bypass SCSI EH

2018-05-23 Thread Hannes Reinecke
ame issue which triggered this patchset in the first place. Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 10/14] block: remove BLK_EH_HANDLED

2018-05-23 Thread Hannes Reinecke
ed, 18 deletions(-) Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 12/14] blk-mq: Fix timeout and state order

2018-05-23 Thread Hannes Reinecke
MQ_RQ_IN_FLIGHT); write_seqcount_end(>gstate_seq); preempt_enable(); Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 08/14] mmc: complete requests from ->timeout

2018-05-23 Thread Hannes Reinecke
c core */ return BLK_EH_RESET_TIMER; Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 07/14] scsi_transport_fc: complete requests from ->timeout

2018-05-23 Thread Hannes Reinecke
flight) + blk_mq_complete_request(req); + return BLK_EH_DONE; } /** Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 06/14] null_blk: complete requests from ->timeout

2018-05-23 Thread Hannes Reinecke
.de> --- drivers/block/null_blk.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 05/14] mtip32xx: complete requests from ->timeout

2018-05-23 Thread Hannes Reinecke
quest(req); + return BLK_EH_DONE; } if (test_bit(req->tag, dd->port->cmds_to_issue)) Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 04/14] nbd: complete requests from ->timeout

2018-05-23 Thread Hannes Reinecke
eh_timer_return nbd_xmit_timeout(struct request *req, cmd->status = BLK_STS_IOERR; sock_shutdown(nbd); nbd_config_put(nbd); - - return BLK_EH_HANDLED; +done: + blk_mq_complete_request(req); + return BLK_EH_DONE; } /* Again, some testcase would be nice ... R

Re: [PATCH 03/14] nvme: return BLK_EH_DONE from ->timeout

2018-05-23 Thread Hannes Reinecke
H_HANDLED with BLK_EH_NOT_HANDLED. And, as nothing else has changed, would imply that we can do it on older/stable versions, too. Which means that the original code was buggy to start with. Hence a test here would be really beneficial. But then, assuming you did some tests here: Reviewed-by: Hannes Re

Re: [PATCH 02/14] block: rename BLK_EH_NOT_HANDLED to BLK_EH_DONE

2018-05-23 Thread Hannes Reinecke
files changed, 25 insertions(+), 25 deletions(-) Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 01/14] libata: remove ata_scsi_timed_out

2018-05-23 Thread Hannes Reinecke
ta/libata-eh.c | 51 - include/linux/libata.h | 2 -- 2 files changed, 53 deletions(-) Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: BLK_EH_HANDLED

2018-05-23 Thread Hannes Reinecke
On 05/23/2018 02:19 PM, Christoph Hellwig wrote: Hi all, this series removes the BLK_EH_HANDLED return value, and instead places responsibility of timed out commands entirely on the drivers. Except for some odd layering vilations in libiscsi this actually is surprisingly simple. The last two

Re: [RFC PATCH 3/3] blk-mq: Remove generation seqeunce

2018-05-22 Thread Hannes Reinecke
On 05/22/2018 06:17 PM, Christoph Hellwig wrote: Hi Keith, I like this series a lot. One comment that is probably close to the big discussion in the thread: switch (ret) { case BLK_EH_HANDLED: /* +* If the request is still in flight, the driver

Re: [PATCH 6/6] bcache: use pr_info() to inform duplicated CACHE_SET_IO_DISABLE set

2018-05-02 Thread Hannes Reinecke
set"); + pr_info("CACHE_SET_IO_DISABLE already set"); /* XXX: we can be called from atomic context acquire_console_sem(); Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 5/6] bcache: set dc->io_disable to true in conditional_stop_bcache_device()

2018-05-02 Thread Hannes Reinecke
able should be +* explicitly set to true. +*/ + dc->io_disable = true; + /* make others know io_disable is true earlier */ + smp_mb(); bcache_device_stop(d); } else

Re: [PATCH 4/6] bcache: add wait_for_kthread_stop() in bch_allocator_thread()

2018-05-02 Thread Hannes Reinecke
bch_prio_write(ca); } } +out: + wait_for_kthread_stop(); + return 0; } /* Allocation */ Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 3/6] bcache: count backing device I/O error for writeback I/O

2018-05-02 Thread Hannes Reinecke
_endio(struct bio *bio) struct keybuf_key *w = bio->bi_private; struct dirty_io *io = w->private; - if (bio->bi_status) + if (bio->bi_status) { SET_KEY_DIRTY(>key, false); + bch_count_backing_io_errors(io->dc, bio); +

Re: [PATCH 2/6] bcache: set CACHE_SET_IO_DISABLE in bch_cached_dev_error()

2018-05-02 Thread Hannes Reinecke
= dc->disk.c; + if (c && test_and_set_bit(CACHE_SET_IO_DISABLE, >flags)) + pr_warn("CACHE_SET_IO_DISABLE already set"); + bcache_device_stop(>disk); return true; } Neat. Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 1/6] bcache: store disk name in struct cache and struct cached_dev

2018-05-02 Thread Hannes Reinecke
5 files changed, 30 insertions(+), 34 deletions(-) Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH] MAINTAINERS: Remove me as maintainer of bcache

2018-04-19 Thread Hannes Reinecke
gt; community seems fairly active, and there are regular contributors. >>> >>> Coly and Tang Junhui come to mind. >> >> I think Coly would be a great maintainer. > > I concur. Coly? > Indeed, that would be perfect. But I don't want to put any pressure on you, Coly

Re: [PATCH 6/7] block: consistently use GFP_NOIO instead of __GFP_NORECLAIM

2018-04-10 Thread Hannes Reinecke
/swap.c | 14 +++--- > 8 files changed, 16 insertions(+), 15 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 7/7] block: use GFP_KERNEL for allocations from blk_get_request

2018-04-10 Thread Hannes Reinecke
d int op, > blk_mq_req_flags_t flags) { > struct request *rq; > - gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC : > GFP_NOIO; > + gfp_t gfp_mask = flags & BLK_MQ_REQ_NOWAIT ? GFP_ATOMIC : > GFP_KERNEL; int ret = 0; > > WARN_ON_ONCE(q->mq_ops); Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 5/7] block: use GFP_NOIO instead of __GFP_DIRECT_RECLAIM

2018-04-10 Thread Hannes Reinecke
--- > block/blk-core.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 4/7] block: pass explicit gfp_t to get_request

2018-04-10 Thread Hannes Reinecke
block/blk-core.c | 14 +++--- > drivers/scsi/scsi_error.c | 4 > 2 files changed, 7 insertions(+), 11 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: [PATCH 3/7] block: sanitize blk_get_request calling conventions

2018-04-10 Thread Hannes Reinecke
ers/scsi/sg.c | 2 +- > drivers/scsi/st.c | 2 +- > drivers/target/target_core_pscsi.c | 3 +-- > fs/nfsd/blocklayout.c | 2 +- > include/linux/blkdev.h | 5 + > 29 files changed, 42 insertions(+), 59 deletions(-) > Long overdue. Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes

Re: Block layer use of __GFP flags

2018-04-09 Thread Hannes Reinecke
On Mon, 9 Apr 2018 04:46:22 + "Bart Van Assche" wrote: > On Sun, 2018-04-08 at 12:08 -0700, Matthew Wilcox wrote: > > On Sun, Apr 08, 2018 at 04:40:59PM +, Bart Van Assche wrote: > > > Do you perhaps want me to prepare a patch that makes > > > blk_get_request()

Re: Multi-Actuator SAS HDD First Look

2018-04-09 Thread Hannes Reinecke
On 04/09/2018 04:08 AM, Tim Walker wrote: > On Fri, Apr 6, 2018 at 11:09 AM, Douglas Gilbert <dgilb...@interlog.com> > wrote: >> >> On 2018-04-06 02:42 AM, Christoph Hellwig wrote: >>> >>> On Fri, Apr 06, 2018 at 08:24:18AM +0200, Hannes Reinecke wrote:

Re: Multi-Actuator SAS HDD First Look

2018-04-06 Thread Hannes Reinecke
On Thu, 5 Apr 2018 17:43:46 -0600 Tim Walker <tim.t.wal...@seagate.com> wrote: > On Tue, Apr 3, 2018 at 1:46 AM, Christoph Hellwig <h...@infradead.org> > wrote: > > On Sat, Mar 31, 2018 at 01:03:46PM +0200, Hannes Reinecke wrote: > >> Actually I would propose t

Re: Multi-Actuator SAS HDD First Look

2018-03-31 Thread Hannes Reinecke
etter treating this entire device just like a normal target having two LUNs. I would actually advocating having a device with _three_ LUNs, where one LUN would serve as an endpoint for all device-centric commands, and the other LUNs simply won't implement the device-centric commands. Then you wouldn't ne

Re: Multi-Actuator SAS HDD First Look

2018-03-31 Thread Hannes Reinecke
LUNs. I guess that would make the whole setup easier to handle. 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: Multi-Actuator SAS HDD First Look

2018-03-26 Thread Hannes Reinecke
On Fri, 23 Mar 2018 08:57:12 -0600 Tim Walker wrote: > Seagate announced their split actuator SAS drive, which will probably > require some kernel changes for full support. It's targeted at cloud > provider JBODs and RAID. > > Here are some of the drive's architectural

Re: [PATCH 00/16] remove eight obsolete architectures

2018-03-15 Thread Hannes Reinecke
On 03/15/2018 10:42 AM, David Howells wrote: > Do we have anything left that still implements NOMMU? > RISC-V ? (evil grin :-) Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE

Re: [PATCH] dm mpath: fix passing integrity data

2018-03-14 Thread Hannes Reinecke
.features = DM_TARGET_SINGLETON | DM_TARGET_IMMUTABLE, > + .features = DM_TARGET_SINGLETON | DM_TARGET_IMMUTABLE | > + DM_TARGET_PASSES_INTEGRITY, > .module = THIS_MODULE, > .ctr = multipath_ctr, > .dtr = multipath_dtr, > Ho-hum. Thanks for t

Re: [PATCH] device_handler: remove VLAs

2018-03-12 Thread Hannes Reinecke
> drivers/scsi/device_handler/scsi_dh_alua.c | 8 > drivers/scsi/device_handler/scsi_dh_emc.c | 2 +- > drivers/scsi/device_handler/scsi_dh_rdac.c | 2 +- > 3 files changed, 6 insertions(+), 6 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheer

Re: [PATCH V4 0/4] SCSI: fix selection of reply(hw) queue

2018-03-08 Thread Hannes Reinecke
ivers/scsi/virtio_scsi.c | 59 ++- > include/scsi/scsi_host.h| 3 ++ > 8 files changed, 100 insertions(+), 85 deletions(-) > Well ... while this looks good in principle, what happens on cpu hotplug? Don't we have to redo the map th

Re: [PATCH V3 1/8] scsi: hpsa: fix selection of reply queue

2018-03-08 Thread Hannes Reinecke
ase. Would it be possible move tags->rqs to become a _double_ pointer? Then we would have only a shared lookup table, but the requests themselves can be allocated per node, depending on the CPU map. _And_ it should be easier on the CPU cache ... 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)

[PATCH][RESEND] block: copy ioprio in __bio_clone_fast()

2018-02-26 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 <h...@suse.com> --- block/bio.c | 1 + 1 file changed, 1 insertio

Re: [PATCH] block: copy ioprio in __bio_clone_fast()

2018-02-26 Thread Hannes Reinecke
On 02/26/2018 11:55 AM, Hannes Reinecke wrote: > 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 <h

[PATCH] block: copy ioprio in __bio_clone_fast()

2018-02-26 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 <h...@suse.com> --- block/bio.c | 1 + drivers/vh

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-07 Thread Hannes Reinecke
On 02/07/2018 03:14 PM, Kashyap Desai wrote: >> -Original Message- >> From: Ming Lei [mailto:ming@redhat.com] >> Sent: Wednesday, February 7, 2018 5:53 PM >> To: Hannes Reinecke >> Cc: Kashyap Desai; Jens Axboe; linux-block@vger.kernel.org; Christoph >

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-06 Thread Hannes Reinecke
t. > Whee; thanks for that. I've just finished a patchset moving megarai_sas_fusion to embedded commands (and cutting down the size of 'struct megasas_cmd_fusion' by half :-), so that will come in just handy. Will give it a spin. Cheers, Hannes -- Dr. Hannes ReineckeTeamlead St

Re: [PATCH V2 8/8] scsi: hpsa: use blk_mq to solve irq affinity issue

2018-02-06 Thread Hannes Reinecke
equest can't be submitted to this hw queue > at all, finally the irq affinity issue is solved. > > Cc: Hannes Reinecke <h...@suse.de> > Cc: Arun Easi <arun.e...@cavium.com> > Cc: Omar Sandoval <osan...@fb.com>, > Cc: "Martin K. Petersen" <mar

Re: [PATCH V2 7/8] scsi: hpsa: call hpsa_hba_inquiry() after adding host

2018-02-06 Thread Hannes Reinecke
On 02/05/2018 04:20 PM, Ming Lei wrote: > So that we can decide the default reply queue by the map created > during adding host. > > Cc: Hannes Reinecke <h...@suse.de> > Cc: Arun Easi <arun.e...@cavium.com> > Cc: Omar Sandoval <osan...@fb.com>, >

Re: [PATCH 0/5] blk-mq/scsi-mq: support global tags & introduce force_blk_mq

2018-02-04 Thread Hannes Reinecke
--- > include/linux/blk-mq.h | 2 ++ > include/scsi/scsi_host.h | 3 +++ > 13 files changed, 105 insertions(+), 101 deletions(-) > Thanks Ming for picking this up. I'll give it a shot and see how it behaves on other hardware. Cheers, Hannes -- Dr. Hannes

Re: [PATCH 1/5] blk-mq: tags: define several fields of tags as pointer

2018-02-04 Thread Hannes Reinecke
+++-- > block/blk-mq-tag.h | 10 +++--- > block/blk-mq.c | 2 +- > block/kyber-iosched.c | 2 +- > 6 files changed, 42 insertions(+), 34 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Chee

Re: [PATCH 5/5] scsi: virtio_scsi: fix IO hang by irq vector automatic affinity

2018-02-04 Thread Hannes Reinecke
e hw queue hasn't online > CPUs. > > Fix this issue by forcing to use blk_mq. > > BTW, I have been used virtio-scsi(scsi_mq) for several years, and it has > been quite stable, so it shouldn't cause extra risk. > > Cc: Hannes Reinecke <h...@suse.de> > Cc:

Re: [PATCH 4/5] scsi: introduce force_blk_mq

2018-02-04 Thread Hannes Reinecke
> to reinvent wheels for solving the problem. > > [2] https://marc.info/?t=15160185141=1=2 > > Sovling the above issues for non-MQ path may not be easy, or introduce > unnecessary work, especially we plan to enable SCSI_MQ soon as discussed > recently[3]: > &g

Re: [PATCH 2/5] blk-mq: introduce BLK_MQ_F_GLOBAL_TAGS

2018-02-04 Thread Hannes Reinecke
tch only makes the tags > sbitmap > and active_queues data structure HBA wide, and others are kept as NUMA > locality, > such as request, hctx, tags, ... > > The following patch will support global tags on null_blk, also the performance > data is provided, no obvious performan

Re: [PATCH 3/5] block: null_blk: introduce module parameter of 'g_global_tags'

2018-02-04 Thread Hannes Reinecke
lb1 --filename=/dev/nullb1 > --name=nullb2 --filename=/dev/nullb2 --name=nullb3 --filename=/dev/nullb3 > > 1M IOPS can be reached in both above tests which is done in one VM. > > Cc: Hannes Reinecke <h...@suse.de> > Cc: Arun Easi <arun.e...@cavium.com> > Cc: Omar S

Re: [dm-devel] [LSF/MM TOPIC] block, dm: restack queue_limits

2018-01-30 Thread Hannes Reinecke
d if it moves to '0' we'll need to rescan the sd device. None of this is happening right now.) So I'd be glad to have a discussion around this. Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUS

Re: [PATCH v3 13/13] bcache: stop bcache device when backing device is offline

2018-01-16 Thread Hannes Reinecke
in time. > > This patch is quite simple, does not handle more complicated situations. > Once the bcache device is stopped, users need to recovery the backing > device, register and attach it manually. > > Signed-off-by: Coly Li <col...@suse.de> > Cc: Michael Lyle <ml

Re: [PATCH v3 12/13] bcache: add io_disable to struct cached_dev

2018-01-16 Thread Hannes Reinecke
tem. > > Signed-off-by: Coly Li <col...@suse.de> > Cc: Michael Lyle <ml...@lyle.org> > Cc: Hannes Reinecke <h...@suse.com> > Cc: Junhui Tang <tang.jun...@zte.com.cn> > --- > drivers/md/bcache/bcache.h | 7 +++ > drivers/md/bcache/io.c

Re: [PATCH v3 11/13] bcache: add backing_request_endio() for bi_end_io of attached backing device I/O

2018-01-16 Thread Hannes Reinecke
cache/super.c | 1 + > drivers/md/bcache/writeback.c | 1 + > 3 files changed, 81 insertions(+), 16 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de

Re: [PATCH v3 10/13] bcache: fix inaccurate io state for detached bcache devices

2018-01-16 Thread Hannes Reinecke
/md/bcache/request.c | 58 > +++-- > 1 file changed, 51 insertions(+), 7 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de

Re: [PATCH v3 05/13] bcache: quit dc->writeback_thread when BCACHE_DEV_DETACHING is set

2018-01-16 Thread Hannes Reinecke
thread should continue to perform writeback, this is the original > design of manually detach. > > I compose a separte patch because that patch "bcache: fix cached_dev->count > usage for bch_cache_set_error()" already gets a "Reviewed-by:" from Hannes > R

Re: [PATCH v3 03/13] bcache: set task properly in allocator_wait()

2018-01-16 Thread Hannes Reinecke
patch fixes this problem by setting task state to TASK_RUNNING if > kthread_should_stop() is true and before kernel thread returns back to > kernel/kthread.s:kthread(). > > Changelog: > v2: fix the race issue in v1 patch. > v1: initial buggy fix. > > Signed-off-by: Coly Li

Re: [PATCH v3 01/13] bcache: set writeback_rate_update_seconds in range [1, 60] seconds

2018-01-16 Thread Hannes Reinecke
by macros. > > Signed-off-by: Coly Li <col...@suse.de> > --- > drivers/md/bcache/sysfs.c | 3 +++ > drivers/md/bcache/writeback.c | 2 +- > drivers/md/bcache/writeback.h | 3 +++ > 3 files changed, 7 insertions(+), 1 deletion(-) > Reviewed-by: Hannes Reinecke <

Re: [PATCH v3 02/13] bcache: properly set task state in bch_writeback_thread()

2018-01-16 Thread Hannes Reinecke
e something risky with bcache and hurt their > data. Setting task state to TASK_RUNNING before returning fixes this > problem. > > Changelog: > v2: fix the race issue in v1 patch. > v1: initial buggy fix. > > Signed-off-by: Coly Li <col...@suse.de> > Cc: Michae

Re: [for-4.16 PATCH v3 3/3] dm: fix awkward and incomplete request_queue initialization

2018-01-10 Thread Hannes Reinecke
@@ -2121,7 +2130,6 @@ EXPORT_SYMBOL_GPL(dm_device_name); > > static void __dm_destroy(struct mapped_device *md, bool wait) > { > - struct request_queue *q = dm_get_md_queue(md); > struct dm_table *map; > int srcu_idx; > > @@ -2132,7 +2140,7 @@ static vo

Re: [for-4.16 PATCH v3 2/3] block: allow gendisk's request_queue registration to be deferred

2018-01-10 Thread Hannes Reinecke
end of device_add_disk(), so it would be trivial to make device_add_disk() a wrapper function like void device_add_disk(struct device *parent, struct gendisk *disk) { blk_add_disk(parent, disk); blk_register_queue(disk); } and then call blk_add_disk() from the dm-core. That would save us the magic 'you have to set this flag before registering' dance in dm.c... 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: [for-4.16 PATCH v3 2/3] block: allow gendisk's request_queue registration to be deferred

2018-01-10 Thread Hannes Reinecke
{ > #define QUEUE_FLAG_SCSI_PASSTHROUGH 27 /* queue supports SCSI commands > */ > #define QUEUE_FLAG_QUIESCED28/* queue has been quiesced */ > #define QUEUE_FLAG_PREEMPT_ONLY 29 /* only process REQ_PREEMPT > requests */ > +#define QUEUE_FLAG_DEFER_REG 30

Re: [for-4.16 PATCH v3 1/3] block: only bdi_unregister() in del_gendisk() if !GENHD_FL_HIDDEN

2018-01-10 Thread Hannes Reinecke
di_unregister(disk->queue->backing_dev_info); > blk_unregister_queue(disk); > } else { > WARN_ON(1); > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de

Re: [PATCH v2 2/2] blk-mq: Fix a race condition in blk_mq_mark_tag_wait()

2018-01-10 Thread Hannes Reinecke
f-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Christoph Hellwig <h...@lst.de> > Cc: Omar Sandoval <osan...@fb.com> > Cc: Hannes Reinecke <h...@suse.de> > Cc: Johannes Thumshirn <jthumsh...@suse.de> > --- > block/blk-mq.c | 19 +-

Re: [PATCH v2 1/2] blk-mq: Reduce the number of if-statements in blk_mq_mark_tag_wait()

2018-01-10 Thread Hannes Reinecke
Omar Sandoval <osan...@fb.com> > Cc: Hannes Reinecke <h...@suse.de> > Cc: Johannes Thumshirn <jthumsh...@suse.de> > --- > block/blk-mq.c | 30 +++--- > 1 file changed, 15 insertions(+), 15 deletions(-) > Reviewed-by: Hannes

Re: [for-4.16 PATCH v2 2/3] block: cope with gendisk's 'queue' being added later

2018-01-10 Thread Hannes Reinecke
ow how that could be safe given that the disk > is live and visible to userspace once added.. > We're getting an additional 'change' event once the tables are loaded and setup properly. That's not a problem, and in fact the DASD driver has the very same issue/feature/design. Cheers, Hannes --

Re: [PATCH 2/8] blk-mq: protect completion path with RCU

2018-01-08 Thread Hannes Reinecke
complete_request); > > Hmm. Why do we need to call blk_mq_map_queue() here? Is there a chance that we end up with a _different_ hctx on completion than that one used for submission? If not, why can't we just keep a pointer to the hctx in struct request? Cheers, Hannes -- Dr. Hannes Rein

Re: [PATCH 4/4] IB/srp: Fix a sleep-in-invalid-context bug

2018-01-08 Thread Hannes Reinecke
ead+0x11c/0x140 > ret_from_fork+0x24/0x30 > > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Jason Gunthorpe <j...@mellanox.com> > Cc: Doug Ledford <dledf...@redhat.com> > --- > drivers/infiniband/ulp/srp/ib_srp.c | 21 ++-

Re: [PATCH 3/4] scsi: Avoid that .queuecommand() gets called for a quiesced SCSI device

2018-01-08 Thread Hannes Reinecke
will make progress without aborting any > of these requests. > > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Martin K. Petersen <martin.peter...@oracle.com> > Cc: Christoph Hellwig <h...@lst.de> > Cc: Hannes Reinecke <h...@suse.de> > Cc: Johannes Thums

Re: [PATCH 2/4] block: Introduce blk_wait_if_quiesced() and blk_finish_wait_if_quiesced()

2018-01-08 Thread Hannes Reinecke
; > Signed-off-by: Bart Van Assche <bart.vanass...@wdc.com> > Cc: Martin K. Petersen <martin.peter...@oracle.com> > Cc: Christoph Hellwig <h...@lst.de> > Cc: Hannes Reinecke <h...@suse.de> > Cc: Johannes Thumshirn <jthumsh...@suse.de> > Cc: Ming Lei <mi

Re: [PATCH 1/4] blk-mq: Rename request_queue.mq_freeze_wq into mq_wq

2018-01-08 Thread Hannes Reinecke
Cc: Christoph Hellwig <h...@lst.de> > Cc: Hannes Reinecke <h...@suse.de> > Cc: Johannes Thumshirn <jthumsh...@suse.de> > Cc: Ming Lei <ming@redhat.com> > --- > block/blk-core.c | 10 +- > block/blk-mq.c | 10 +- > in

Re: [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Hannes Reinecke
_SC_LBA_RANGE: >> return BLK_STS_NOSPC; > > lba range isn't really enospc. It is returned when the lba in > the command is outside the logical size of the namespace. > Isn't that distinction pretty academic? The entire block-to-POSIX error mapp

Re: [PATCH 2/5] nvme/multipath: Consult blk_status_t for failover

2018-01-08 Thread Hannes Reinecke
insertions(+), 42 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes ReineckezSeries & Storage h...@suse.com +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendö

Re: [PATCH 5/5] dm mpath: Use blk_retryable

2018-01-08 Thread Hannes Reinecke
insertions(+), 17 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes ReineckezSeries & Storage h...@suse.com +49 911 74053 688 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: F. Imendörffer

Re: [PATCH 4/5] nvme/multipath: Use blk_retryable

2018-01-08 Thread Hannes Reinecke
t; - case BLK_STS_MEDIUM: > - case BLK_STS_PROTECTION: > - return false; > - } > - > - /* Everything else could be a path failure, so should be retried */ > - return true; > + return blk_retryable(error); > } > > void nvme_kick_re

Re: [PATCH 3/5] block: Provide blk_status_t decoding for retryable errors

2018-01-08 Thread Hannes Reinecke
ase BLK_STS_TARGET: > + case BLK_STS_NEXUS: > + case BLK_STS_MEDIUM: > + case BLK_STS_PROTECTION: > + return false; > + } > + > + /* Anything else could be a path failure, so should be retried */ > + return true; > +} > + > stru

Re: [PATCH 1/5] nvme: Add more command status translation

2018-01-08 Thread Hannes Reinecke
se NVME_SC_ACCESS_DENIED: > case NVME_SC_READ_ONLY: > + case NVME_SC_COMPARE_FAILED: > return BLK_STS_MEDIUM; > case NVME_SC_GUARD_CHECK: > case NVME_SC_APPTAG_CHECK: > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes Reinec

Re: [PATCH v1 10/10] bcache: stop all attached bcache devices for a retired cache set

2018-01-07 Thread Hannes Reinecke
> + if (c->io_disable) > + bcache_device_stop(c->devices[i]); > } else { > bcache_device_stop(c->devices[i]); > } > Reviewed-by: Hannes Reinecke <h...@su

Re: [PATCH v1 09/10] bcache: add io_disable to struct cache_set

2018-01-07 Thread Hannes Reinecke
@ static bool refill_dirty(struct cached_dev *dc) > static int bch_writeback_thread(void *arg) > { > struct cached_dev *dc = arg; > + struct cache_set *c = dc->disk.c; > bool searched_full_index; > > bch_ratelimit_reset(>writeback_rate);

Re: [PATCH v1 08/10] bcache: fix misleading error message in bch_count_io_errors()

2018-01-07 Thread Hannes Reinecke
d/bcache/writeback.c | 4 +++- > 4 files changed, 16 insertions(+), 7 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com> Cheers, Hannes -- Dr. Hannes ReineckeTeamlead Storage & Networking h...@suse.de +49 911 74053 688 SUSE LINUX GmbH

Re: [PATCH v1 07/10] bcache: set error_limit correctly

2018-01-07 Thread Hannes Reinecke
cache devices. > > Signed-off-by: Coly Li <col...@suse.de> > --- > drivers/md/bcache/bcache.h | 1 + > drivers/md/bcache/super.c | 2 +- > drivers/md/bcache/sysfs.c | 4 ++-- > 3 files changed, 4 insertions(+), 3 deletions(-) > Reviewed-by: Hannes Reinecke <h...@suse.com>

Re: [PATCH v1 06/10] bcache: stop dc->writeback_rate_update, dc->writeback_thread earlier

2018-01-07 Thread Hannes Reinecke
rs/md/bcache/writeback.c > +++ b/drivers/md/bcache/writeback.c > @@ -548,6 +548,7 @@ void bch_cached_dev_writeback_init(struct cached_dev *dc) > dc->writeback_rate_i_term_inverse = 1; > > INIT_DELAYED_WORK(>writeback_rate_update, update_writeback_rate); >

Re: [PATCH v1 05/10] bcache: stop dc->writeback_rate_update if cache set is stopping

2018-01-07 Thread Hannes Reinecke
HZ); > } > This is actually not quite correct; the function might still be called after 'struct cached_dev' has been removed. The correct way of fixing is to either take a reference to struct cached_dev and release it once 'update_writeback_rate' is finished, or to call 'cancel_delayed_work_sy

Re: [PATCH v1 04/10] bcache: fix cached_dev->count usage for bch_cache_set_error()

2018-01-07 Thread Hannes Reinecke
ite complicated. > > Signed-off-by: Coly Li <col...@suse.de> > --- > drivers/md/bcache/super.c | 1 - > drivers/md/bcache/writeback.c | 10 +++--- > drivers/md/bcache/writeback.h | 2 -- > 3 files changed, 7 insertions(+), 6 deletions(-) > Personally, I'm

Re: [PATCH v1 03/10] bcache: reduce cache_set devices iteration by devices_max_used

2018-01-07 Thread Hannes Reinecke
back.h b/drivers/md/bcache/writeback.h > index a9e3ffb4b03c..1d284f3d0363 100644 > --- a/drivers/md/bcache/writeback.h > +++ b/drivers/md/bcache/writeback.h > @@ -21,7 +21,7 @@ static inline uint64_t > bcache_flash_devs_sectors_dirty(struct cache_set *c) > >

Re: [PATCH v1 02/10] bcache: set task properly in allocator_wait()

2018-01-07 Thread Hannes Reinecke
utex_lock(&(ca)->set->bucket_lock);\ > } \ > - __set_current_state(TASK_RUNNING); \ > } while (0) > > static int bch_allocator_push(struct cache *ca, long b

Re: [PATCH v1 01/10] bcache: exit bch_writeback_thread() with proper task state

2018-01-07 Thread Hannes Reinecke
E is okay for kthread_should_stop(); you just need to set it to 'TASK_RUNNING' before calling 'return 0'. So I think a fix like set_current_state(TASK_INTERRUPTIBLE); if (kthread_should_stop()) { set_current_state(TASK_RUNNING); return 0; } schedule(); would be better. Cheers, Hannes -- Dr. Hannes Rein

Re: [for-4.16 PATCH v2 0/5] block, nvme, dm: allow DM multipath to use NVMe's error handler

2018-01-07 Thread Hannes Reinecke
f an error is a > path failure. This should work for both NVMe and DM, and DM won't need > NVMe specifics. > > I can split this into a series if there's indication this is ok and > satisfies the need. > I'm all for it. Go. Cheers, Hannes -- Dr. Hannes Reinecke

<    1   2   3   4   5   6   >