Re: [PATCH V13 08/10] mmc: block: blk-mq: Separate card polling from recovery

2017-11-08 Thread Adrian Hunter
On 08/11/17 11:30, Linus Walleij wrote: > On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > >> Recovery is simpler to understand if it is only used for errors. Create a >> separate function for card polling. >> >> Signed-off-by: Adrian Hunter > > This looks good but I can't see why it's no

Re: [PATCH V13 10/10] mmc: block: blk-mq: Stop using legacy recovery

2017-11-08 Thread Adrian Hunter
On 08/11/17 11:38, Linus Walleij wrote: > On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > >> There are only a few things the recovery needs to do. Primarily, it just >> needs to: >> Determine the number of bytes transferred >> Get the card back to transfer state >>

Re: [PATCH v2] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Byungchul Park
On Thu, Nov 09, 2017 at 04:20:36PM +0900, Byungchul Park wrote: > Changes from v1 > - Run several tools checking english spell and grammar over the text. > - Simplify the document more. Checker tools also reported other words e.g. crosslock, crossrelease, lockdep, mutex, lockless, and so on, but I

Re: [PATCH V13 07/10] mmc: block: blk-mq: Add support for direct completion

2017-11-08 Thread Adrian Hunter
On 08/11/17 11:28, Linus Walleij wrote: > On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > >> For blk-mq, add support for completing requests directly in the ->done >> callback. That means that error handling and urgent background operations >> must be handled by recovery_work in that case.

[PATCH v2] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Byungchul Park
Changes from v1 - Run several tools checking english spell and grammar over the text. - Simplify the document more. -8<- >From 412bc9eb0d22791f70f7364bda189feb41899ff9 Mon Sep 17 00:00:00 2001 From: Byungchul Park Date: Thu, 9 Nov 2017 16:12:23 +0900 Subject: [PATCH v2] locking/lockdep: R

Re: [PATCH V13 06/10] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-11-08 Thread Adrian Hunter
On 08/11/17 11:24, Linus Walleij wrote: > On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > >> Add CQHCI initialization and implement CQHCI operations for Intel GLK. >> >> Signed-off-by: Adrian Hunter > > This patch seems OK in context, but it merely illustrates the > weirdness of .[runtim

[PATCH V8 6/7] sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Damien Le Moal
Initialize the seq_zones_bitmap, seq_zones_wlock and nr_zones fields of the disk request queue on disk revalidate. As the seq_zones_bitmap and seq_zones_wlock allocations are identical, introduce the helper sd_zbc_alloc_zone_bitmap(). Using this helper, reallocate the bitmaps whenever the disk capa

[PATCH V8 2/7] mq-deadline: Introduce dispatch helpers

2017-11-08 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in __dd_dispatch_request() for zoned block devices. Signed-off-by: Damien Le Moal Reviewed-by: Bart Va

[PATCH V8 1/7] block: introduce zoned block devices zone write locking

2017-11-08 Thread Damien Le Moal
From: Christoph Hellwig Components relying only on the request_queue structure for accessing block devices (e.g. I/O schedulers) have a limited knowledged of the device characteristics. In particular, the device capacity cannot be easily discovered, which for a zoned block device also result in t

[PATCH V8 5/7] deadline-iosched: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
Introduce zone write locking to avoid write request reordering with zoned block devices. This is achieved using a finer selection of the next request to dispatch: 1) Any non-write request is always allowed to proceed. 2) Any write to a conventional zone is always allowed to proceed. 3) For a write

[PATCH V8 7/7] sd: Remove zone write locking

2017-11-08 Thread Damien Le Moal
The block layer now handles zone write locking. Signed-off-by: Damien Le Moal Reviewed-by: Christoph Hellwig Reviewed-by: Martin K. Petersen --- drivers/scsi/sd.c| 41 +++- drivers/scsi/sd.h| 11 --- drivers/scsi/sd_zbc.c| 83

[PATCH V8 4/7] deadline-iosched: Introduce dispatch helpers

2017-11-08 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in deadline_dispatch_requests() for zoned block devices. While at it, also remove the unnecessary forwa

[PATCH V8 0/7] blk-mq support for ZBC disks

2017-11-08 Thread Damien Le Moal
This series, formerly titled "scsi-mq support for ZBC disks", implements support for ZBC disks for system using the scsi-mq I/O path. The current scsi level support of ZBC disks guarantees write request ordering using a per-zone write lock which prevents issuing simultaneously multiple write comma

[PATCH V8 3/7] mq-deadline: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
Introduce zone write locking to avoid write request reordering with zoned block devices. This is achieved using a finer selection of the next request to dispatch: 1) Any non-write request is always allowed to proceed. 2) Any write to a conventional zone is always allowed to proceed. 3) For a write

Re: [PATCH v11 0/7] block, scsi, md: Improve suspend and resume

2017-11-08 Thread Oleksandr Natalenko
Bart, is this something known to you, or it is just my fault applying this series to v4.13? Except having this warning, suspend/resume works for me: === [ 27.383846] sd 0:0:0:0: [sda] Starting disk [ 27.383976] sd 1:0:0:0: [sdb] Starting disk [ 27.451218] sdb: Attempt to allocate non-preem

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Ming Lei
On Wed, Nov 08, 2017 at 10:57:23AM -0700, Jens Axboe wrote: > On 11/08/2017 09:41 AM, Bart Van Assche wrote: > > On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: > >> At this point, I have no idea what Bart's setup looks like. Bart, it > >> would be REALLY helpful if you could tell us how you a

Re: [PATCH] blk-mq: fix issue with shared tag queue re-running

2017-11-08 Thread Ming Lei
On Wed, Nov 08, 2017 at 03:48:51PM -0700, Jens Axboe wrote: > This patch attempts to make the case of hctx re-running on driver tag > failure more robust. Without this patch, it's pretty easy to trigger a > stall condition with shared tags. An example is using null_blk like > this: > > modprobe nu

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Ming Lei
On Wed, Nov 08, 2017 at 04:41:35PM +, Bart Van Assche wrote: > On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: > > At this point, I have no idea what Bart's setup looks like. Bart, it > > would be REALLY helpful if you could tell us how you are reproducing > > your hang. I don't know why t

Re: [PATCH] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Byungchul Park
On Wed, Nov 08, 2017 at 10:34:38AM +0100, Ingo Molnar wrote: > > * Byungchul Park wrote: > > > I'm afraid the revision is not perfect yet. Of course, the document can > > have got much better english by others than me. > > > > But, > > > > I think I should enhance it as much as I can, before t

Re: [PATCH] null_blk: fix dev->badblocks leak

2017-11-08 Thread Shaohua Li
On Wed, Nov 08, 2017 at 05:29:44PM +0100, David Disseldorp wrote: > null_alloc_dev() allocates memory for dev->badblocks, but cleanup > currently only occurs in the configfs release codepath, missing a number > of other places. > > This bug was found running the blktests block/010 test, alongside

Re: [PATCH V7 6/8] scsi: sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Damien Le Moal
Martin, On 11/9/17 08:41, Martin K. Petersen wrote: > > Damien, > >> wait for the disk capacity and number of zones to stabilize on the >> second revalidation pass to allocate and initialize the bitmaps. > > Stabilize how? If RC_BASIS is 0, the capacity changes after the first report zones...

Re: [PATCH V7 8/8] scsi: sd_zbc: Fix zone information initialization

2017-11-08 Thread Martin K. Petersen
Damien, > Make sure that the device request queue zone information (number of > zones and zone bitmaps) are reinitialized if the number of zones > changes (e.g. on a drive capacity change on revalidate). This should probably be part of patch 6. Reviewed-by: Martin K. Petersen -- Martin K. Pe

Re: [PATCH V7 7/8] scsi: sd: Remove zone write locking

2017-11-08 Thread Martin K. Petersen
Damien, > The block layer now handles zone write locking. Looks OK. Reviewed-by: Martin K. Petersen -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] blk-mq: fix issue with shared tag queue re-running

2017-11-08 Thread Bart Van Assche
On Wed, 2017-11-08 at 15:48 -0700, Jens Axboe wrote: > + * We got a tag, remove outselves from the wait queue to ensure ^ ourselves? Anyway, since this patch fixes a SCSI queue stall I ran into recently (see also https:/

Re: [PATCH V7 6/8] scsi: sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Martin K. Petersen
Damien, > wait for the disk capacity and number of zones to stabilize on the > second revalidation pass to allocate and initialize the bitmaps. Stabilize how? -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH V7 5/8] block: deadline-iosched: Introduce zone locking support

2017-11-08 Thread Martin K. Petersen
Damien, > Introduce zone write locking to avoid write request reordering with > zoned block devices. This is achieved using a finer selection of the > next request to dispatch: > 1) Any non-write request is always allowed to proceed. > 2) Any write to a conventional zone is always allowed to proc

Re: [PATCH V7 4/8] block: deadline-iosched: Introduce dispatch helpers

2017-11-08 Thread Martin K. Petersen
Damien, > Avoid directly referencing the next_rq and fifo_list arrays using the > helper functions deadline_next_request() and deadline_fifo_request() to > facilitate changes in the dispatch request selection in > deadline_dispatch_requests() for zoned block devices. > > While at it, also remove

Re: [PATCH V7 3/8] block: mq-deadline: Introduce zone locking support

2017-11-08 Thread Martin K. Petersen
Damien, > Introduce zone write locking to avoid write request reordering with > zoned block devices. This is achieved using a finer selection of the > next request to dispatch: > 1) Any non-write request is always allowed to proceed. > 2) Any write to a conventional zone is always allowed to proc

Re: [PATCH V7 2/8] blokc: mq-deadline: Introduce dispatch helpers

2017-11-08 Thread Martin K. Petersen
Damien, > Avoid directly referencing the next_rq and fifo_list arrays using the > helper functions deadline_next_request() and deadline_fifo_request() > to facilitate changes in the dispatch request selection in > __dd_dispatch_request() for zoned block devices. Reviewed-by: Martin K. Petersen

Re: [PATCH V7 1/8] block: introduce zoned block devices zone write locking

2017-11-08 Thread Martin K. Petersen
Damien, > + * Zoned block device information for request dispatch control. > + * nr_zones is the total number of zones of the device. This is always > + * 0 for regular block devices. seq_zones_bitmap is a bitmap of nr_zones > + * bits which indicates if a zone is conventional

[PATCH] blk-mq: fix issue with shared tag queue re-running

2017-11-08 Thread Jens Axboe
This patch attempts to make the case of hctx re-running on driver tag failure more robust. Without this patch, it's pretty easy to trigger a stall condition with shared tags. An example is using null_blk like this: modprobe null_blk queue_mode=2 nr_devices=4 shared_tags=1 submit_queues=1 hw_queue

Re: [PATCH] blk-mq: Avoid that request queue removal can trigger list corruption

2017-11-08 Thread Jens Axboe
On 11/08/2017 11:23 AM, Bart Van Assche wrote: > Avoid that removal of a request queue sporadically triggers the > following warning: > > list_del corruption. next->prev should be 8807d649b970, but was > 6b6b6b6b6b6b6b6b > WARNING: CPU: 3 PID: 342 at lib/list_debug.c:56 > __list_del_entry_va

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Jens Axboe
On 11/08/2017 11:22 AM, Laurence Oberman wrote: > On Wed, 2017-11-08 at 10:57 -0700, Jens Axboe wrote: >> On 11/08/2017 09:41 AM, Bart Van Assche wrote: >>> On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: At this point, I have no idea what Bart's setup looks like. Bart, it would

Re: [PATCH V7 8/8] scsi: sd_zbc: Fix zone information initialization

2017-11-08 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH V7 7/8] scsi: sd: Remove zone write locking

2017-11-08 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH V7 6/8] scsi: sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Christoph Hellwig
A bit of duplication vs the existing ZBC code here, but it seems the old code is going away later in the series, so: Reviewed-by: Christoph Hellwig

[PATCH] blk-mq: Avoid that request queue removal can trigger list corruption

2017-11-08 Thread Bart Van Assche
Avoid that removal of a request queue sporadically triggers the following warning: list_del corruption. next->prev should be 8807d649b970, but was 6b6b6b6b6b6b6b6b WARNING: CPU: 3 PID: 342 at lib/list_debug.c:56 __list_del_entry_valid+0x92/0xa0 Call Trace: process_one_work+0x11b/0x660 worke

Re: [PATCH V7 5/8] block: deadline-iosched: Introduce zone locking support

2017-11-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V7 4/8] block: deadline-iosched: Introduce dispatch helpers

2017-11-08 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig

Re: [PATCH V7 3/8] block: mq-deadline: Introduce zone locking support

2017-11-08 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Jens Axboe
On 11/08/2017 08:59 AM, Ming Lei wrote: > On Wed, Nov 08, 2017 at 02:20:41PM +0800, Ming Lei wrote: >> On Tue, Nov 07, 2017 at 08:17:59PM -0700, Jens Axboe wrote: >>> On 11/07/2017 08:12 PM, Ming Lei wrote: On Tue, Nov 07, 2017 at 08:01:48PM -0700, Jens Axboe wrote: > On 11/07/2017 06:03 P

Re: [PATCH V7 2/8] blokc: mq-deadline: Introduce dispatch helpers

2017-11-08 Thread Christoph Hellwig
Except for a bit of mis-spelling in the Subject this looks fine to me: Reviewed-by: Christoph Hellwig FYI, I would just simplify the subject to mq-deadline: Introduce dispatch helpers and similar in the other patches.

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Laurence Oberman
On Wed, 2017-11-08 at 10:57 -0700, Jens Axboe wrote: > On 11/08/2017 09:41 AM, Bart Van Assche wrote: > > On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: > > > At this point, I have no idea what Bart's setup looks like. Bart, > > > it > > > would be REALLY helpful if you could tell us how you

Re: [PATCH v2] nvme: compare NQN string with right size

2017-11-08 Thread Christoph Hellwig
Thanks, applied both patches to nvme-4.15.

Re: [PATCH V2] blk-mq: put driver tag if dispatch budget can't be got

2017-11-08 Thread Jens Axboe
On 11/07/2017 06:11 PM, Ming Lei wrote: > We have to put the driver tag if dispatch budget can't be got, otherwise > it might cause IO deadlock, especially in case that size of tags is very > small. Applied, thanks. -- Jens Axboe

Re: [PATCH] block: pass full fmode_t to blk_verify_command

2017-11-08 Thread Jens Axboe
On 11/05/2017 01:36 AM, Christoph Hellwig wrote: > Use the obvious calling convention. Applied, thanks. -- Jens Axboe

[PATCH] block: remove __bio_kmap_atomic

2017-11-08 Thread Christoph Hellwig
This helper doesn't buy us much over calling kmap_atomic directly. In fact in the only caller it does a bit of useless work as the caller already has the bvec at hand, and said caller would even buggy for a multi-segment bio due to the use of this helper. So just remove it. Signed-off-by: Christo

Re: [PATCH] block: remove __bio_kmap_atomic

2017-11-08 Thread Jens Axboe
On 11/08/2017 11:13 AM, Christoph Hellwig wrote: > This helper doesn't buy us much over calling kmap_atomic directly. > In fact in the only caller it does a bit of useless work as the > caller already has the bvec at hand, and said caller would even > buggy for a multi-segment bio due to the use of

Re: [dm-devel] [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Christoph Hellwig
On Wed, Nov 08, 2017 at 11:08:13AM -0700, Jens Axboe wrote: > On 11/08/2017 11:03 AM, Christoph Hellwig wrote: > > On Wed, Nov 08, 2017 at 08:36:25AM -0700, Jens Axboe wrote: > >> On 11/08/2017 08:34 AM, Christoph Hellwig wrote: > >>> On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote: > >>

Re: [dm-devel] [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Jens Axboe
On 11/08/2017 11:03 AM, Christoph Hellwig wrote: > On Wed, Nov 08, 2017 at 08:36:25AM -0700, Jens Axboe wrote: >> On 11/08/2017 08:34 AM, Christoph Hellwig wrote: >>> On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote: On top of that, there are no users of it at all... >>> >>> But Miku

Re: [dm-devel] [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Christoph Hellwig
On Wed, Nov 08, 2017 at 08:36:25AM -0700, Jens Axboe wrote: > On 11/08/2017 08:34 AM, Christoph Hellwig wrote: > > On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote: > >> On top of that, there are no users of it at all... > > > > But Mikulas wants to add one :) > > I know... > > > Note

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Jens Axboe
On 11/08/2017 09:41 AM, Bart Van Assche wrote: > On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: >> At this point, I have no idea what Bart's setup looks like. Bart, it >> would be REALLY helpful if you could tell us how you are reproducing >> your hang. I don't know why this has to be dragged

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Bart Van Assche
On Tue, 2017-11-07 at 20:06 -0700, Jens Axboe wrote: > At this point, I have no idea what Bart's setup looks like. Bart, it > would be REALLY helpful if you could tell us how you are reproducing > your hang. I don't know why this has to be dragged out. Hello Jens, It is a disappointment to me tha

[PATCH] null_blk: fix dev->badblocks leak

2017-11-08 Thread David Disseldorp
null_alloc_dev() allocates memory for dev->badblocks, but cleanup currently only occurs in the configfs release codepath, missing a number of other places. This bug was found running the blktests block/010 test, alongside kmemleak: rapido1:/blktests# ./check block/010 ... rapido1:/blktests# echo s

Re: [PATCH V3] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-08 Thread Ming Lei
On Wed, Nov 08, 2017 at 08:01:08AM -0800, James Bottomley wrote: > On Wed, 2017-11-08 at 21:21 +0800, Ming Lei wrote: > > cmd->cmnd can be allocated/freed dynamically in case of > > T10_PI_TYPE2_PROTECTION, > > so we should check it in scsi_show_rq() because this request may have > > been freed in

Re: [PATCH V3] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-08 Thread James Bottomley
On Wed, 2017-11-08 at 21:21 +0800, Ming Lei wrote: > cmd->cmnd can be allocated/freed dynamically in case of > T10_PI_TYPE2_PROTECTION, > so we should check it in scsi_show_rq() because this request may have > been freed in scsi_show_rq(). > > This patch fixs the following kernel crash when dumpin

Re: [PATCH] SCSI: don't get target/host busy_count in scsi_mq_get_budget()

2017-11-08 Thread Ming Lei
On Wed, Nov 08, 2017 at 02:20:41PM +0800, Ming Lei wrote: > On Tue, Nov 07, 2017 at 08:17:59PM -0700, Jens Axboe wrote: > > On 11/07/2017 08:12 PM, Ming Lei wrote: > > > On Tue, Nov 07, 2017 at 08:01:48PM -0700, Jens Axboe wrote: > > >> On 11/07/2017 06:03 PM, Ming Lei wrote: > > >>> On Tue, Nov 07

Re: [dm-devel] [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Jens Axboe
On 11/08/2017 08:34 AM, Christoph Hellwig wrote: > On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote: >> On top of that, there are no users of it at all... > > But Mikulas wants to add one :) I know... > Note that __bio_kmap_atomic has the same issues, only has a single > users either a

Re: [dm-devel] [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Christoph Hellwig
On Wed, Nov 08, 2017 at 08:20:58AM -0700, Jens Axboe wrote: > On top of that, there are no users of it at all... But Mikulas wants to add one :) Note that __bio_kmap_atomic has the same issues, only has a single users either and would be cleaner if opencoded there as it already has the current bv

Re: [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Jens Axboe
On 11/08/2017 08:05 AM, Christoph Hellwig wrote: > On Wed, Nov 08, 2017 at 07:38:44AM -0500, Mikulas Patocka wrote: >>> To be honest I think we should just remove bio_kmap_irq. It is currently >>> unused and assumes there is only a single bvec to map. >> >> It could be removed from include/linux/b

Re: [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Christoph Hellwig
On Wed, Nov 08, 2017 at 07:38:44AM -0500, Mikulas Patocka wrote: > > To be honest I think we should just remove bio_kmap_irq. It is currently > > unused and assumes there is only a single bvec to map. > > It could be removed from include/linux/bio.h and moved to my driver. But > if we leave it i

Re: [PATCH V13 05/10] mmc: cqhci: support for command queue enabled host

2017-11-08 Thread Adrian Hunter
On 08/11/17 11:22, Linus Walleij wrote: > On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > >> From: Venkat Gopalakrishnan >> >> This patch adds CMDQ support for command-queue compatible >> hosts. >> >> Command queue is added in eMMC-5.1 specification. This >> enables the controller to proc

[PATCH V3] scsi_debugfs: fix crash in scsi_show_rq()

2017-11-08 Thread Ming Lei
cmd->cmnd can be allocated/freed dynamically in case of T10_PI_TYPE2_PROTECTION, so we should check it in scsi_show_rq() because this request may have been freed in scsi_show_rq(). This patch fixs the following kernel crash when dumping request via block's debugfs interface: [ 252.962045] BUG: u

Re: [PATCH V13 04/10] mmc: block: Add CQE support

2017-11-08 Thread Adrian Hunter
On 08/11/17 11:00, Linus Walleij wrote: > On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > >> @@ -2188,11 +2327,18 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue >> *mq, struct request *req) >> return MMC_REQ_FAILED_TO_START; >> } >>

Re: [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Mikulas Patocka
On Wed, 8 Nov 2017, Christoph Hellwig wrote: > On Tue, Nov 07, 2017 at 04:45:17PM -0500, Mikulas Patocka wrote: > > Hi > > > > I need the function bio_kmap_irq in the driver that I am developing, but > > it doesn't return the size of the mapped data. I've made this patch to fix > > it. > > T

Re: [PATCH 4/5] nvme: implement multipath access to nvme subsystems

2017-11-08 Thread Hannes Reinecke
On 11/08/2017 09:54 AM, Christoph Hellwig wrote: > Can I get a review for this one? The only changes vs the previously > reviewed versions is that we don't use the multipath code at all for > subsystems that aren't multiported, and that there is an explicit > opt-out at compile and module load tim

Re: [PATCH v3 5/8] target: Use sgl_alloc_order() and sgl_free()

2017-11-08 Thread Nicholas A. Bellinger
On Mon, 2017-11-06 at 08:10 +0100, Hannes Reinecke wrote: > On 11/03/2017 11:23 PM, Bart Van Assche wrote: > > Use the sgl_alloc_order() and sgl_free() functions instead of open > > coding these functions. > > > > Signed-off-by: Bart Van Assche > > Cc: Nicholas A. Bellinger > > Cc: Christoph Hel

Re: [PATCH v2] nvme: compare NQN string with right size

2017-11-08 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

Re: [PATCH v2] nvme: fix eui_show() print format

2017-11-08 Thread Sagi Grimberg
Reviewed-by: Sagi Grimberg

[PATCH v2] nvme: fix eui_show() print format

2017-11-08 Thread Javier González
From: Javier González Fix print formatting, but keep the original output to prevent user breakage as suggested by Joe Perches. Change since v1: - Maintain the original output format printing spaces instead of dashes Signed-off-by: Javier González Reviewed-by: Keith Busch --- drivers/nvme/h

[PATCH v2] nvme: compare NQN string with right size

2017-11-08 Thread Javier González
From: Javier González Copy subnqns using NVMF_NQN_SIZE as it is < 256 Changes since V1: - Fix commit message to indicate that it is a copy and not a comparison. Signed-off-by: Javier González Reviewed-by: Christoph Hellwig --- drivers/nvme/host/core.c | 2 +- 1 file changed, 1 insertion(+)

Re: [PATCH] bio: have bio_kmap_irq return the size of mapped data (fwd)

2017-11-08 Thread Christoph Hellwig
On Tue, Nov 07, 2017 at 04:45:17PM -0500, Mikulas Patocka wrote: > Hi > > I need the function bio_kmap_irq in the driver that I am developing, but > it doesn't return the size of the mapped data. I've made this patch to fix > it. To be honest I think we should just remove bio_kmap_irq. It is c

Re: [PATCH V13 10/10] mmc: block: blk-mq: Stop using legacy recovery

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > There are only a few things the recovery needs to do. Primarily, it just > needs to: > Determine the number of bytes transferred > Get the card back to transfer state > Determine whether to retry > > There are also a c

Re: [PATCH] locking/lockdep: Revise Documentation/locking/crossrelease.txt

2017-11-08 Thread Ingo Molnar
* Byungchul Park wrote: > I'm afraid the revision is not perfect yet. Of course, the document can > have got much better english by others than me. > > But, > > I think I should enhance it as much as I can, before they can help it > starting with a better one. > > In addition, I removed verbo

Re: [PATCH V13 08/10] mmc: block: blk-mq: Separate card polling from recovery

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > Recovery is simpler to understand if it is only used for errors. Create a > separate function for card polling. > > Signed-off-by: Adrian Hunter This looks good but I can't see why it's not folded into patch 3 already. This error handling i

Re: [PATCH V13 07/10] mmc: block: blk-mq: Add support for direct completion

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > For blk-mq, add support for completing requests directly in the ->done > callback. That means that error handling and urgent background operations > must be handled by recovery_work in that case. > > Signed-off-by: Adrian Hunter I tried ena

Re: [PATCH V13 06/10] mmc: sdhci-pci: Add CQHCI support for Intel GLK

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > Add CQHCI initialization and implement CQHCI operations for Intel GLK. > > Signed-off-by: Adrian Hunter This patch seems OK in context, but it merely illustrates the weirdness of .[runtime]_suspend/resume calling into CQE-specific APIs rath

Re: [PATCH V13 05/10] mmc: cqhci: support for command queue enabled host

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > From: Venkat Gopalakrishnan > > This patch adds CMDQ support for command-queue compatible > hosts. > > Command queue is added in eMMC-5.1 specification. This > enables the controller to process upto 32 requests at > a time. > > Adrian Hunter

Re: [PATCH V13 04/10] mmc: block: Add CQE support

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > @@ -2188,11 +2327,18 @@ enum mmc_issued mmc_blk_mq_issue_rq(struct mmc_queue > *mq, struct request *req) > return MMC_REQ_FAILED_TO_START; > } > return MMC_REQ_FINISHED; > + case

Re: [PATCH 4/5] nvme: implement multipath access to nvme subsystems

2017-11-08 Thread Christoph Hellwig
Can I get a review for this one? The only changes vs the previously reviewed versions is that we don't use the multipath code at all for subsystems that aren't multiported, and that there is an explicit opt-out at compile and module load time, so it shouldn't be that hard to review for those who r

Re: [PATCH V13 03/10] mmc: block: Add blk-mq support

2017-11-08 Thread Linus Walleij
On Fri, Nov 3, 2017 at 2:20 PM, Adrian Hunter wrote: > Define and use a blk-mq queue. Discards and flushes are processed > synchronously, but reads and writes asynchronously. In order to support > slow DMA unmapping, DMA unmapping is not done until after the next request > is started. That means

[PATCH V7 6/8] scsi: sd_zbc: Initialize device request queue zoned data

2017-11-08 Thread Damien Le Moal
Initialize the seq_zone_bitmap and nr_zones fields of the disk request queue on disk revalidate. As the seq_zone_bitmap allocation is identical to the allocation of the zone write lock bitmap, introduce the helper sd_zbc_alloc_zone_bitmap(). Using this helper, wait for the disk capacity and number

[PATCH V7 1/8] block: introduce zoned block devices zone write locking

2017-11-08 Thread Damien Le Moal
From: Christoph Hellwig Components relying only on the request_queue structure for accessing block devices (e.g. I/O schedulers) have a limited knowledged of the device characteristics. In particular, the device capacity cannot be easily discovered, which for a zoned block device also result in t

[PATCH V7 8/8] scsi: sd_zbc: Fix zone information initialization

2017-11-08 Thread Damien Le Moal
Make sure that the device request queue zone information (number of zones and zone bitmaps) are reinitialized if the number of zones changes (e.g. on a drive capacity change on revalidate). Signed-off-by: Damien Le Moal --- drivers/scsi/sd_zbc.c | 36 ++-- 1 file

[PATCH V7 7/8] scsi: sd: Remove zone write locking

2017-11-08 Thread Damien Le Moal
The block layer now handles zone write locking. Signed-off-by: Damien Le Moal --- drivers/scsi/sd.c| 41 +++--- drivers/scsi/sd.h| 11 - drivers/scsi/sd_zbc.c| 105 +++ include/scsi/scsi_cmnd.h | 3 +- 4 files ch

[PATCH V7 2/8] blokc: mq-deadline: Introduce dispatch helpers

2017-11-08 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in __dd_dispatch_request() for zoned block devices. Signed-off-by: Damien Le Moal Reviewed-by: Bart Va

[PATCH V7 0/8] blk-mq support for ZBC disks

2017-11-08 Thread Damien Le Moal
This series, formerly titled "scsi-mq support for ZBC disks", implements support for ZBC disks for system using the scsi-mq I/O path. The current scsi level support of ZBC disks guarantees write request ordering using a per-zone write lock which prevents issuing simultaneously multiple write comma

[PATCH V7 3/8] block: mq-deadline: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
Introduce zone write locking to avoid write request reordering with zoned block devices. This is achieved using a finer selection of the next request to dispatch: 1) Any non-write request is always allowed to proceed. 2) Any write to a conventional zone is always allowed to proceed. 3) For a write

[PATCH V7 5/8] block: deadline-iosched: Introduce zone locking support

2017-11-08 Thread Damien Le Moal
Introduce zone write locking to avoid write request reordering with zoned block devices. This is achieved using a finer selection of the next request to dispatch: 1) Any non-write request is always allowed to proceed. 2) Any write to a conventional zone is always allowed to proceed. 3) For a write

[PATCH V7 4/8] block: deadline-iosched: Introduce dispatch helpers

2017-11-08 Thread Damien Le Moal
Avoid directly referencing the next_rq and fifo_list arrays using the helper functions deadline_next_request() and deadline_fifo_request() to facilitate changes in the dispatch request selection in deadline_dispatch_requests() for zoned block devices. While at it, also remove the unnecessary forwa