Re: [PATCH V5 02/14] scsi: sd_zbc: Fix comments and indentation

2017-10-02 Thread Bart Van Assche
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote: > + * sd_zbc_zone_no - Get the number of the zone conataining a sector. Please fix the spelling in the above comment ("conataining"). Anyway: Reviewed-by: Bart Van Assche

Re: [PATCH V6 10/14] block: mq-deadline: Add zoned block device data

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: > + pr_info("mq-deadline: %s: zones write locking enabled\n", > + dev_name(q->backing_dev_info->dev)); Should this message perhaps be changed into "... zone write locking ..." or "... per-zone write locking ..."? Anyway:

Re: [PATCH V6 12/14] block: mq-deadline: Introduce zone locking support

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: > For a write request to a zoned block device, lock the request target > zone upon request displatch. The zone is unlocked either when the ^ dispatch? > request completes or when the request is

Re: [PATCH 0/3] smartpqi updates

2017-10-02 Thread Martin K. Petersen
Don, > These patches are based on Linus's tree > > The changes are: > - update list of controllers > - cleanup warning message > - change driver version to 1.1.2-126 Applied to 4.15/scsi-queue. -- Martin K. Petersen Oracle Linux Engineering

Re: [Patch v2 1/2] libiscsi: Fix use-after-free race during iscsi_session_teardown

2017-10-02 Thread Martin K. Petersen
Khazhismel, > Noticed these don't seem to be in 4.14/scsi-queue Not sure what happened there. I apologize. They are now in 4.14/scsi-fixes. -- Martin K. Petersen Oracle Linux Engineering

Re: [PATCH] ibmvscsis: Fix write_pending failure path

2017-10-02 Thread Martin K. Petersen
Bryant, > For write_pending if the queue is down or client failed then return > -EIO so that LIO can properly process the completed command. Prior we > returned 0 since LIO could not handle it properly. Now with: target: > Fix unknown fabric callback queue-full errors that patch addresses >

[PATCH] scsi/fnic: Fix a sleep-in-atomic bug in fnic_handle_event

2017-10-02 Thread Jia-Ju Bai
The driver may sleep under a spinlock, and the function call path is: fnic_handle_event (acquire the spinlock) fnic_fcoe_start_fcf_disc fcoe_ctlr_link_up mutec_lock --> may sleep To fix it, the spinlock can be released before fnic_fcoe_start_fcf_disc, and acquired again after this

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Jérémy Lefaure
On Mon, 2 Oct 2017 15:22:24 -0400 bfie...@fieldses.org (J. Bruce Fields) wrote: > Mainly I'd just like to know which you're asking for. Do you want me to > apply this, or to ACK it so someone else can? If it's sent as a series > I tend to assume the latter. > > But in this case I'm assuming

Re: [PATCH v2 00/21] lpfc updates for 11.4.0.4

2017-10-02 Thread Martin K. Petersen
James, > This patch set provides a number of bug fixes and additions to > the driver. > > The patches were cut against the Martin's 4.14/scsi-queue tree. > There are no outside dependencies. Applied to 4.15/scsi-queue. I got a conflict in patch 8 in the "Process all the event on FCP fast-path

[BUG] scsi/fcoe: Sleep-in-atomic bugs in fcoe driver

2017-10-02 Thread Jia-Ju Bai
According to fcoe_ctlr.c, the driver may sleep under a RCU lock, and the function call paths are: fcoe_ctlr_disc_stop_locked (acquire the RCU lock) fc_rport_logoff mutex_lock --> may sleep fcoe_ctlr_vn_disc fc_rport_login mutex_lock --> may sleep fcoe_ctlr_vn_age fc_rport_logoff

Re: [PATCH V6 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: > When dispatching write requests to a zoned block device, only allow > requests targeting an unlocked zone. Requests targeting a locked zone > are left in the scheduler queue to preserve the initial write order. > If no write request can be

Re: [PATCH V6 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices

2017-10-02 Thread Damien Le Moal
Bart, On 10/3/17 08:44, Bart Van Assche wrote: > On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: >> When dispatching write requests to a zoned block device, only allow >> requests targeting an unlocked zone. Requests targeting a locked zone >> are left in the scheduler queue to preserve

[BUG] scsi/libfc: Sleep-in-atomic bugs in libfc

2017-10-02 Thread Jia-Ju Bai
According to fc_disc.c, the driver may sleep under a RCU lock, and the function call paths are: fc_disc_done (acquire the RCU lock) fc_rport_logoff mutex_lock --> may sleep fc_disc_done (acquire the RCU lock) fc_rport_login mutex_lock --> may sleep fc_disc_stop_rports

Re: [PATCH v2 07/21] lpfc: Make ktime sampling more accurate

2017-10-02 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

[PATCH V6 02/14] scsi: sd_zbc: Fix comments and indentation

2017-10-02 Thread Damien Le Moal
Fix comments style (use kernel-doc style) and content to clarify some functions. Also fix some functions signature indentation and remove a useless blank line in sd_zbc_read_zones(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal

[PATCH V6 11/14] blokc: mq-deadline: Introduce dispatch helpers

2017-10-02 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(). Signed-off-by: Damien Le Moal Reviewed-by: Bart

[PATCH V6 05/14] scsi: sd_zbc: Fix sd_zbc_read_zoned_characteristics()

2017-10-02 Thread Damien Le Moal
The three values starting at byte 8 of the Zoned Block Device Characteristics VPD page B6h are 32 bits values, not 64bits. So use get_unaligned_be32() to retrieve the values and not get_unaligned_be64() Fixes: 89d947561077 ("sd: Implement support for ZBC devices") Cc:

[PATCH V6 00/14] scsi-mq support for ZBC disks

2017-10-02 Thread Damien Le Moal
This series implements support for ZBC disks used through 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 commands to a zone, doing so avoid reordering of

[PATCH V6 07/14] scsi: sd_zbc: Initialize device request queue zoned data

2017-10-02 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

Re: [PATCH v2 19/21] lpfc: Fix oops of nvme host during driver unload.

2017-10-02 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v2 01/21] lpfc: fix pci hot plug crash in timer management routines

2017-10-02 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v2 02/21] lpfc: fix pci hot plug crash in list_add call

2017-10-02 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH v2 20/21] lpfc: correct nvme sg segment count check

2017-10-02 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

[PATCH V6 08/14] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-10-02 Thread Damien Le Moal
Conventional zones of zoned block devices have no write constraints. Write locking of conventional zones is thus not necessary and can even hurt performance by unnecessarily operating the disk under low queue depth. To avoid this, use the disk request queue seq_zone_bitmap to allow any write to be

[PATCH V6 12/14] block: mq-deadline: Introduce zone locking support

2017-10-02 Thread Damien Le Moal
For a write request to a zoned block device, lock the request target zone upon request displatch. The zone is unlocked either when the request completes or when the request is requeued (inserted). To indicate that a request has locked its target zone, use the first pointer of the request elevator

[PATCH V6 04/14] scsi: sd_zbc: Use well defined macros

2017-10-02 Thread Damien Le Moal
instead of open coding, use the min() macro to calculate a report zones reply buffer length in sd_zbc_check_zone_size() and the round_up() macro for calculating the number of zones in sd_zbc_setup(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal

[PATCH V6 09/14] scsi: sd_zbc: Disable zone write locking with scsi-mq

2017-10-02 Thread Damien Le Moal
In the case of a ZBC disk used with scsi-mq, zone write locking does not prevent write reordering in sequential zones. Unlike the legacy case, zone locking is done after the command request is removed from the scheduler dispatch queue. That is, at the time of zone locking, the write command may

[PATCH V6 03/14] scsi: sd_zbc: Rearrange code

2017-10-02 Thread Damien Le Moal
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw assignments and move the calculation of sdkp->zone_shift together with the assignment of the verified zone_blocks value in sd_zbc_check_zone_size(). No functional change is introduced by this patch. Signed-off-by: Damien Le Moal

[PATCH V6 10/14] block: mq-deadline: Add zoned block device data

2017-10-02 Thread Damien Le Moal
Introduce a zone bitmap field in mq-deadline private data to support zoned block devices. The zone bitmap is used to implement per zone write locking. Modify mq-deadline init_queue() and exit_queue() elevator methods to handle initialization and cleanup of the zone write lock bitmap.

[PATCH V6 01/14] scsi: sd_zbc: Move ZBC declarations to scsi_proto.h

2017-10-02 Thread Damien Le Moal
Move standard macro definitions for the zone types and zone conditions to scsi_proto.h together with the definitions related to the REPORT ZONES command. While at it, define all values in the enums to be clear. Also remove unnecessary includes in sd_zbc.c. No functional change is introduced by

[PATCH V6 06/14] block: Add zoned block device information to request queue

2017-10-02 Thread Damien Le Moal
Components relying only on the requeuest_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 the inability to easily

[PATCH V6 13/14] block: mq-deadline: Limit write request dispatch for zoned block devices

2017-10-02 Thread Damien Le Moal
When dispatching write requests to a zoned block device, only allow requests targeting an unlocked zone. Requests targeting a locked zone are left in the scheduler queue to preserve the initial write order. If no write request can be dispatched, allow reads to be dispatched even if the write batch

[PATCH V6 14/14] block: do not set mq default scheduler

2017-10-02 Thread Damien Le Moal
For blk-mq disks with a single hardware queue, setting by default the disk scheduler to mq-deadline early during the queue initialization prevents properly setting zone write locking for host managed zoned block device as the disk type is not yet known. Fix this by simply not setting the default

Re: [PATCH v2 09/21] lpfc: Fix FCP hba_wqidx assignment

2017-10-02 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn -- Johannes Thumshirn Storage jthumsh...@suse.de+49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham

Re: [PATCH V7 1/6] blk-mq: only run hw queues for blk-mq

2017-10-02 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

Re: [PATCH V7 2/6] block: tracking request allocation with q_usage_counter

2017-10-02 Thread Christoph Hellwig
I think I already gate it to basically the same patch as queued up by Bart, but here again: Reviewed-by: Christoph Hellwig

Re: [PATCH V7 5/6] block: support PREEMPT_ONLY

2017-10-02 Thread Christoph Hellwig
> +void blk_set_preempt_only(struct request_queue *q, bool preempt_only) > +{ > + blk_mq_freeze_queue(q); > + if (preempt_only) > + queue_flag_set_unlocked(QUEUE_FLAG_PREEMPT_ONLY, q); > + else > + queue_flag_clear_unlocked(QUEUE_FLAG_PREEMPT_ONLY, q); > +

Re: mptsas driver cannot detect hotplugging disk with the LSI SCSI SAS1068 controller in Ubuntu guest on VMware

2017-10-02 Thread Hannes Reinecke
On 09/27/2017 09:33 AM, Gavin Guo wrote: > There is a problem in the latest upstream kernel with the device: > > $ grep -i lsi lspci > 03:00.0 Serial Attached SCSI controller [0107]: LSI Logic / Symbios > Logic SAS1068 PCI-X Fusion-MPT SAS [1000:0054] (rev 01) > > The device is simulated by the

Re: [PATCH V7 3/6] block: pass flags to blk_queue_enter()

2017-10-02 Thread Christoph Hellwig
On Sat, Sep 30, 2017 at 02:12:11PM +0800, Ming Lei wrote: > We need to pass PREEMPT flags to blk_queue_enter() > for allocating request with RQF_PREEMPT in the > following patch. I don't like having another name space for flags. It seems like we should simply pass ops on, and then map the nowait

Re: [PATCH V5 5/7] blk-mq-sched: move actual dispatching into one helper

2017-10-02 Thread Christoph Hellwig
Can you move this to the beginning of your series, just after the other edits to blk_mq_sched_dispatch_requests? > +static void blk_mq_do_dispatch_sched(struct request_queue *q, > + struct elevator_queue *e, > + struct

Re: [PATCH V7 6/6] SCSI: set block queue at preempt only when SCSI device is put into quiesce

2017-10-02 Thread Christoph Hellwig
> + /* > + * Simply quiesing SCSI device isn't safe, it is easy > + * to use up requests because all these allocated requests > + * can't be dispatched when device is put in QIUESCE. > + * Then no request can be allocated and we may hang > + * somewhere, such as system

Re: [PATCH V5 2/7] blk-mq-sched: fix scheduler bad performance

2017-10-02 Thread Christoph Hellwig
Looks fine, Reviewed-by: Christoph Hellwig

[PATCHv6 2/5] scsi: Export blacklist flags to sysfs

2017-10-02 Thread Hannes Reinecke
Each scsi device is scanned according to the found blacklist flags, but this information is never presented to sysfs. This makes it quite hard to figure out if blacklisting worked as expected. With this patch we're exporting an additional attribute 'blacklist' containing the blacklist flags for

[PATCHv6 1/5] scsi_debug: allow to specify inquiry vendor and model

2017-10-02 Thread Hannes Reinecke
For testing purposes we need to be able to pass in the inquiry vendor and model. Signed-off-by: Hannes Reinecke Reviewed-by: Bart Van Assche Acked-by: Doug Gilbert --- drivers/scsi/scsi_debug.c | 25 + 1

[PATCHv6 3/5] scsi_devinfo: Reformat blacklist flags

2017-10-02 Thread Hannes Reinecke
Reformat blacklist flags to make the values easier to read and to enhance error checking. Signed-off-by: Hannes Reinecke Reviewed-by: Bart van Assche --- include/scsi/scsi_devinfo.h | 76 + 1 file changed, 50

[PATCHv6 5/5] scsi_devinfo: fixup string compare

2017-10-02 Thread Hannes Reinecke
When checking the model and vendor string we need to use the minimum value of either string, otherwise we'll miss out on wildcard matches. And we should take card when matching with zero size strings; results might be unpredictable. With this patch the rules for matching devinfo strings are as

Re: [PATCH V7 4/6] block: prepare for passing RQF_PREEMPT to request allocation

2017-10-02 Thread Christoph Hellwig
As mentioned in the reply to Bart, I'd much rather use BLK_MQ_REQ_* for the sane blk_get_request version (which should have the same prototype as blk_mq_alloc_request) instead of having another flags namespace.

[PATCHv6 4/5] scsi_devinfo: Whitespace fixes

2017-10-02 Thread Hannes Reinecke
Signed-off-by: Hannes Reinecke --- drivers/scsi/scsi_devinfo.c | 44 ++-- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c index 28fea83..6858ad8 100644 ---

[PATCHv6 0/5] scsi: Fixup blacklist handling

2017-10-02 Thread Hannes Reinecke
Hi all, the SCSI blacklist handling seems to be rather tricky issue; everytime a fix is included it tends to break other devices. This patchset attempt to simplify the devlist handling yet again, but this time implementing the framework for regression testing, too. A patch adding a regression

Re: [PATCH V7 2/6] block: tracking request allocation with q_usage_counter

2017-10-02 Thread Bart Van Assche
On Sat, 2017-09-30 at 14:12 +0800, Ming Lei wrote: > @@ -1395,16 +1401,21 @@ static struct request *blk_old_get_request(struct > request_queue *q, > unsigned int op, gfp_t gfp_mask) > { > struct request *rq; > + int ret = 0; > >

Re: [PATCH V7 5/6] block: support PREEMPT_ONLY

2017-10-02 Thread Bart Van Assche
On Sat, 2017-09-30 at 14:12 +0800, Ming Lei wrote: > +void blk_set_preempt_only(struct request_queue *q, bool preempt_only) > +{ > + blk_mq_freeze_queue(q); > + if (preempt_only) > + queue_flag_set_unlocked(QUEUE_FLAG_PREEMPT_ONLY, q); > + else > +

Re: [PATCH v2 1/1] bsg-lib: fix use-after-free under memory-pressure

2017-10-02 Thread Christoph Hellwig
Looks good: Reviewed-by: Christoph Hellwig

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread Mauro Carvalho Chehab
Em Sun, 1 Oct 2017 20:52:20 -0400 Jérémy Lefaure escreveu: > Anyway, I can tell to each maintainer that they can apply the patches > they're concerned about and next time I may send individual patches. In the case of media, we'll handle it as if they were individual

[PATCH] bsg: update bsg_device_list to utilize static hash table implementation.

2017-10-02 Thread Tim Hansen
Updates bsg_device_list to utilize static hashtable implementation. This is done in an effort to standarize the hashtables used across the kernel. Signed-off-by: Tim Hansen --- block/bsg.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff

Re: [PATCHv6 2/5] scsi: Export blacklist flags to sysfs

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:26 +0200, Hannes Reinecke wrote: > Each scsi device is scanned according to the found blacklist flags, > but this information is never presented to sysfs. > This makes it quite hard to figure out if blacklisting worked as > expected. > With this patch we're exporting an

Re: system hung up when offlining CPUs

2017-10-02 Thread YASUAKI ISHIMATSU
On 09/16/2017 11:02 AM, Thomas Gleixner wrote: > On Sat, 16 Sep 2017, Thomas Gleixner wrote: >> On Thu, 14 Sep 2017, YASUAKI ISHIMATSU wrote: >>> Here are one irq's info of megasas: >>> >>> - Before offline CPU >>> /proc/irq/70/smp_affinity_list >>> 24-29 >>> >>> /proc/irq/70/effective_affinity

Re: [PATCH 1/3] scsi: ufs: Change HCI marco to actual bit position

2017-10-02 Thread Bart Van Assche
On Sat, 2017-09-30 at 11:52 +0530, Alim Akhtar wrote: > Currently UFS HCI uses UFS_BIT() macro to get various bit > position for the hardware registers status bits. Which makes > code longer instead of shorter. This macro does not improve > code readability as well. > Lets re-write these macro

Re: [PATCH V6 07/14] scsi: sd_zbc: Initialize device request queue zoned data

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: > 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

Re: [PATCH V6 08/14] scsi: sd_zbc: Limit zone write locking to sequential zones

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: > + * There is no write constraints on conventional zones. So any write ^^ are? Anyway: Reviewed-by: Bart Van Assche

Re: [PATCH V6 02/14] scsi: sd_zbc: Fix comments and indentation

2017-10-02 Thread Bart Van Assche
On Mon, 2017-10-02 at 16:15 +0900, Damien Le Moal wrote: > Fix comments style (use kernel-doc style) and content to clarify some > functions. Also fix some functions signature indentation and remove a > useless blank line in sd_zbc_read_zones(). Reviewed-by: Bart Van Assche

Inquiry

2017-10-02 Thread Stenvall Skoeld & Company
-- Dear Sir/Madam, I've visited your website and I find your products very interested at the first sight to create its place. To go to the next step which concern the marketing Please kindly send me your latest catalogue's product and please send us your prices CIF, to start presentation in

[PATCH] ibmvscsis: Fix write_pending failure path

2017-10-02 Thread Bryant G. Ly
From: "Bryant G. Ly" For write_pending if the queue is down or client failed then return -EIO so that LIO can properly process the completed command. Prior we returned 0 since LIO could not handle it properly. Now with: target: Fix unknown fabric callback queue-full errors that

Re: [PATCH 00/18] use ARRAY_SIZE macro

2017-10-02 Thread J. Bruce Fields
On Mon, Oct 02, 2017 at 07:35:54AM +0200, Greg KH wrote: > On Sun, Oct 01, 2017 at 08:52:20PM -0400, Jérémy Lefaure wrote: > > On Mon, 2 Oct 2017 09:01:31 +1100 > > "Tobin C. Harding" wrote: > > > > > > In order to reduce the size of the To: and Cc: lines, each patch of the > > >