On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> Fix comments style (do not use documented comment style) and add some
> comments 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
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> Zoned block devices have no write constraints for conventional zones.
> So write locking of conventional zones is not necessary and can even
> hurt performance by unnecessarily operating the disk under low queue
> depth. To avoid this, use the disk
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> 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,
This closes a possible race condition in _fcoe_create() where
we drop the rtnl_lock() before calling fcoe_interface_remove().
Signed-off-by: Hannes Reinecke
Reviewed-by: Lee Duncan
Acked-by: Johannes Thumshirn
---
drivers/scsi/fcoe/fcoe.c | 12
When a NETDEV_UNREGISTER notification is received the network
device is _deleted_ after the callback returns.
So we cannot use a workqueue here, as this would cause an
inversion when removing the device as the netdev is already gone.
This manifests with a nasty warning during shutdown:
sysfs
Hi all,
when shutting down an FCoE target system one is greeted with a flood
of kernel warnings about
sysfs group 81eff0e0 not found for kobject 'XXX'
Reason here is that the fcoe driver tries to remove devices from
a workqueue, but the NETDEV_UNREGISTER notification expects any
calls
Separate out fcoe_vport_remove() from fcoe_destroy_work().
Required for the next patch.
Signed-off-by: Hannes Reinecke
Reviewed-by: Lee Duncan
Acked-by: Johannes Thumshirn
---
drivers/scsi/fcoe/fcoe.c | 55
On Fri, Sep 15, 2017 at 01:21:52PM +0800, shuw...@redhat.com wrote:
> From: Shu Wang
>
> Kmemleak reports about a thousand false positives for fusion->
> cmd_list[]. Root casue is the cmd_list objects are allocated from
> slab allocator, and stored its pointer in object
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> 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
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> 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
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
Fix comments style (do not use documented comment style) and add some
comments 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
The functions blk_mq_sched_free_hctx_data(), blk_mq_sched_try_merge(),
blk_mq_sched_try_insert_merge() and blk_mq_sched_request_inserted() are
all exported symbols but are declared only internally in
block/blk-mq-sched.h. Move these declarations to the new file
include/linux/blk-mq-sched.h to make
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
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
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
Components relying only on the requeuest_queue structure for managing
and controlling block devices (e.g. I/O schedulers) have a limited
view/knowledged of the device being controlled. For instance, the device
capacity cannot be known easily, which for a zoned block device also
result in the
__blk_mq_debugfs_rq_show() and blk_mq_debugfs_rq_show() are exported
symbols but ar eonly declared in the block internal file
block/blk-mq-debugfs.h. which is not cleanly accessible to files outside
of the block directory.
Move the declaration of these functions to the new file
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> Allocate and initialize the disk request queue zoned structure on disk
> revalidate. As the bitmap allocation for the seq_zones field of the
> zoned structure is identical to the allocation of the zones write lock
> bitmap, introduce the helper
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> 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
The zoned I/O scheduler is mostly identical to mq-deadline and retains
the same configuration attributes. The main difference is that the
zoned scheduler will ensure that at any time at most one write request
per sequential zone is in flight (has been dispatched to the disk) in
order to protect
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
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:
Zoned block devices have no write constraints for conventional zones.
So write locking of conventional zones is 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_zones bitmap to
allow any write to be
Allocate and initialize the disk request queue zoned structure on disk
revalidate. As the bitmap allocation for the seq_zones field of the
zoned structure is identical to the allocation of the zones write lock
bitmap, introduce the helper sd_zbc_alloc_zone_bitmap().
Using this helper, wait for the
On 09/15/2017 12:06 PM, Damien Le Moal wrote:
> The zoned I/O scheduler is mostly identical to mq-deadline and retains
> the same configuration attributes. The main difference is that the
> zoned scheduler will ensure that at any time at most one write request
> per sequential zone is in flight
When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled
table is returned; the remaining part will then contain stale
kernel memory information.
This patch zeroes out the entire table to avoid this issue.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/sg.c | 5 ++---
1
Factor our sg_fill_request_table() for better readability.
Signed-off-by: Hannes Reinecke
---
drivers/scsi/sg.c | 62 ---
1 file changed, 36 insertions(+), 26 deletions(-)
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c
KMSAN detected a possible infoleak when using SG_GET_REQUEST_TABLE ioctl.
This patchset fixes it.
As usual, comments and reviews are welcome.
Hannes Reinecke (2):
sg: factor out sg_fill_request_table()
sg: fixup infoleak when using SG_GET_REQUEST_TABLE
drivers/scsi/sg.c | 65
On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> + * There is no write constraints on conventional zones. So any write
^^^
Should this have been "There are no"?
> - if (sdkp->zones_wlock &&
> - test_and_set_bit(zno, sdkp->zones_wlock))
> + if
On Fri, 2017-09-15 at 14:05 +0200, Hannes Reinecke wrote:
> Factor our sg_fill_request_table() for better readability.
Reviewed-by: Bart Van Assche
On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> 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().
Both functions
On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> @@ -492,6 +497,10 @@ struct request_queue {
> struct blk_integrity integrity;
> #endif /* CONFIG_BLK_DEV_INTEGRITY */
>
> +#ifdef CONFIG_BLK_DEV_ZONED
> + struct blk_zonedzoned;
> +#endif
> +
> #ifdef CONFIG_PM
On Fri, 2017-09-15 at 13:21 +0800, shuw...@redhat.com wrote:
> @@ -4548,9 +4556,11 @@ megasas_free_fusion_context(struct megasas_instance
> *instance)
>
> if (is_vmalloc_addr(fusion))
> vfree(fusion);
> - else
> + else {
> +
On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> __blk_mq_debugfs_rq_show() and blk_mq_debugfs_rq_show() are exported
> symbols but ar eonly declared in the block internal file
are only?
> block/blk-mq-debugfs.h. which is not cleanly accessible to
On 9/14/2017 6:19 PM, Martin K. Petersen wrote:
James/Dick,
Please review!
It seemed to be changing so I was waiting for the final posting...
-- james
On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> The functions blk_mq_sched_free_hctx_data(), blk_mq_sched_try_merge(),
> blk_mq_sched_try_insert_merge() and blk_mq_sched_request_inserted() are
> all exported symbols but are declared only internally in
> block/blk-mq-sched.h. Move these
On Fri, 2017-09-15 at 14:05 +0200, Hannes Reinecke wrote:
> When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled
> table is returned; the remaining part will then contain stale
> kernel memory information.
> This patch zeroes out the entire table to avoid this issue.
Reviewed-by: Bart
On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> 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().
Reviewed-by: Bart Van Assche
On 2017-09-15 08:05 AM, Hannes Reinecke wrote:
When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled
table is returned; the remaining part will then contain stale
kernel memory information.
This patch zeroes out the entire table to avoid this issue.
Signed-off-by: Hannes Reinecke
On 2017-09-15 08:05 AM, Hannes Reinecke wrote:
Factor our sg_fill_request_table() for better readability.
Signed-off-by: Hannes Reinecke
Acked-by: Douglas Gilbert
Thanks.
---
drivers/scsi/sg.c | 62
On Fri, Sep 15, 2017 at 07:06:34PM +0900, Damien Le Moal wrote:
> __blk_mq_debugfs_rq_show() and blk_mq_debugfs_rq_show() are exported
> symbols but ar eonly declared in the block internal file
> block/blk-mq-debugfs.h. which is not cleanly accessible to files outside
> of the block directory.
>
Looks fine,
Reviewed-by: Christoph Hellwig
On Fri, Sep 15, 2017 at 02:51:03PM +, Bart Van Assche wrote:
> On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> > 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
On Fri, Sep 15, 2017 at 02:05:16PM +0200, Hannes Reinecke wrote:
> When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled
> table is returned; the remaining part will then contain stale
> kernel memory information.
> This patch zeroes out the entire table to avoid this issue.
>
>
> + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> + _aac_probe_container2(context, fibptr);
> + return;
if (dresp->status == cpu_to_le32(ST_OK) &&
Looks good.
James, I expect I'll be getting this through the normal SCSI pulls..
Linus
On Fri, Sep 15, 2017 at 5:05 AM, Hannes Reinecke wrote:
> When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled
> table is returned; the remaining part will then contain
> -Original Message-
> From: Dave Carroll [mailto:david.carr...@microsemi.com]
> Sent: Friday, September 15, 2017 10:04 AM
> To: Martin K . Petersen ; James Bottomley
>
> Cc: Dave Carroll ; linux-scsi
Colin,
> The pointer eqe is always non-null inside the while loop, so the check
> to see if eqe is NULL is redudant and hence can be removed.
Applied to 4.15/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Hannes,
> Factor our sg_fill_request_table() for better readability.
^^^ out
Fixed typo and applied to 4.14/scsi-fixes. I had to do it by hand so
please check.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Hannes,
> When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled table
> is returned; the remaining part will then contain stale kernel memory
> information. This patch zeroes out the entire table to avoid this
> issue.
Applied to 4.14/scsi-fixes. Thank you!
--
Martin K. Petersen
Christos,
> Pointers bnx2i_cmd are set but never used, so they can be removed.
Applied to 4.15/scsi-queue. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
Dave,
> The logic for supporting large drives was previously tied to 4Kn
> support for SmartIOC-2000. As SmartIOC-2000 does not support volumes
> using 4Kn drives, use the intended option flag AAC_OPT_NEW_COMM_64 to
> determine support for volumes greater than 2T.
Applied to 4.14/scsi-fixes.
All error handling paths 'goto fail' in this function.
If 'scsi_register()' fails, we should also go there, otherwise a
'pci_dev_put(pdev)' will be missing.
Signed-off-by: Christophe JAILLET
---
In order to keep consistance with the rest of the file, I've ignored
Viswas,
> This patch set include some bug fixes and enhancement for pm80xx
> driver.
You are still sending mail from 2015. Please fix your system
time. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Colin,
> Don't populate const arrays on the stack, instead make them static.
> Makes the object code smaller by over 740 bytes.
Applied to 4.15/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
Hannes,
> when shutting down an FCoE target system one is greeted with a flood
> of kernel warnings about
Applied to 4.15/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
If .queue_rq() returns BLK_STS_RESOURCE, blk-mq will rerun
the queue in the three situations:
1) if BLK_MQ_S_SCHED_RESTART is set
- queue is rerun after one rq is completed, see blk_mq_sched_restart()
which is run from blk_mq_free_request()
2) BLK_MQ_S_TAG_WAITING is set
- queue is rerun after
Looks fine,
Reviewed-by: Christoph Hellwig
I think the megaraid fusion code has a deeper problem here.
Instead of playing weird games with get_free_pages and vmalloc
the structure just needs to shrink by moving all the arrays
of MAX_MSIX_QUEUES_FUSION size into a separate allocation for each,
and then we have normall, small kmalloc
Same as for patch 1: this should stay local to block/ - we don't
want random drivers to grow I/O schedulers.
Looks fine,
Reviewed-by: Christoph Hellwig
On Sat, 2017-09-16 at 00:44 +0800, Ming Lei wrote:
> If .queue_rq() returns BLK_STS_RESOURCE, blk-mq will rerun
> the queue in the three situations:
>
> 1) if BLK_MQ_S_SCHED_RESTART is set
> - queue is rerun after one rq is completed, see blk_mq_sched_restart()
> which is run from
On Fri, Sep 15, 2017 at 02:05:15PM +0200, Hannes Reinecke wrote:
> Factor our sg_fill_request_table() for better readability.
>
> Signed-off-by: Hannes Reinecke
Looks fine,
Reviewed-by: Christoph Hellwig
On Fri, Sep 15, 2017 at 5:05 AM, Hannes Reinecke wrote:
> When calling SG_GET_REQUEST_TABLE ioctl that only a half-filled
> table is returned; the remaining part will then contain stale
> kernel memory information.
> This patch zeroes out the entire table to avoid this issue.
>
>
Thanks Martin.
Do we need to send V3 patch set with corrected date ?
Regards,
Viswas G
> -Original Message-
> From: Martin K. Petersen [mailto:martin.peter...@oracle.com]
> Sent: Saturday, September 16, 2017 1:06 AM
> To: Viswas G
> Cc:
On Sat, 2017-09-16 at 07:35 +0900, Damien Le Moal wrote:
> rw16 is mandatory for ZBC drives. So it has to be set to true. If the
> HBA does not support rw16 (why would that happen ?), then the disk
> should not be used.
It's good that all HBAs support rw16. But it's nontrivial to analyze whether
>
> Fix possible indexing array of bound for >hba_map[bus][cid], where bus
> and cid boundary check happens later.
>
> Fixes: 0d643ff3c353 ("scsi: aacraid: use aac_tmf_callback for reset fib")
> Signed-off-by: Nikola Pajkovsky
> ---
> drivers/scsi/aacraid/linit.c | 20
The logic for supporting large drives was previously tied to 4Kn support
for SmartIOC-2000. As SmartIOC-2000 does not support volumes using 4Kn
drives, use the intended option flag AAC_OPT_NEW_COMM_64 to determine
support for volumes greater than 2T.
cc: sta...@vger.kernel.org
Signed-off-by:
> +struct blk_zoned {
> + unsigned intnr_zones;
> + unsigned long *seq_zones;
> +};
> +
> struct blk_zone_report_hdr {
> unsigned intnr_zones;
> u8 padding[60];
> @@ -492,6 +497,10 @@ struct request_queue {
> struct blk_integrity integrity;
>
Looks fine,
Reviewed-by: Christoph Hellwig
On Fri, 2017-09-15 at 19:51 +0200, h...@lst.de wrote:
> On Fri, Sep 15, 2017 at 02:51:03PM +, Bart Van Assche wrote:
> > On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
> > > Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw
> > > assignments and move the calculation
On 9/16/17 02:45, Christoph Hellwig wrote:
> On Fri, Sep 15, 2017 at 07:06:34PM +0900, Damien Le Moal wrote:
>> __blk_mq_debugfs_rq_show() and blk_mq_debugfs_rq_show() are exported
>> symbols but ar eonly declared in the block internal file
>> block/blk-mq-debugfs.h. which is not cleanly
Hi Christoph,
> > + if ((le32_to_cpu(dresp->status) == ST_OK) &&
> > + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
> > + _aac_probe_container2(context, fibptr);
> > + return;
>
> if (dresp->status ==
On 9/16/17 06:02, Bart Van Assche wrote:
> On Fri, 2017-09-15 at 19:51 +0200, h...@lst.de wrote:
>> On Fri, Sep 15, 2017 at 02:51:03PM +, Bart Van Assche wrote:
>>> On Fri, 2017-09-15 at 19:06 +0900, Damien Le Moal wrote:
Rearrange sd_zbc_setup() to include use_16_for_rw and use_10_for_rw
On 9/15/17 19:44, Hannes Reinecke wrote:
> On 09/15/2017 12:06 PM, Damien Le Moal wrote:
>> Fix comments style (do not use documented comment style) and add some
>> comments to clarify some functions. Also fix some functions signature
>> indentation and remove a useless blank line in
Dave,
> Hi Christoph,
>
>> > + if ((le32_to_cpu(dresp->status) == ST_OK) &&
>> > + (le32_to_cpu(dresp->mnt[0].vol) != CT_NONE)) {
>> > + _aac_probe_container2(context, fibptr);
>> > + return;
>>
>> if
Stefano,
> Internal error codes happen to be positive, thus the PCI driver
> core won't treat them as failure, but we do. This would cause a
> crash later on as lpfc_pci_remove_one() is called (e.g. as
> shutdown function).
Applied to 4.14/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle
Colin,
> csk is always null on the error return path and so the non-null check
> and call to cxgbi_sock_closed on csk is redundant and can be removed.
Applied to 4.15/scsi-queue.
--
Martin K. Petersen Oracle Linux Engineering
Nikola,
> Fix possible indexing array of bound for >hba_map[bus][cid],
> where bus and cid boundary check happens later.
Applied to 4.14/scsi-fixes. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Jason,
> Yijing Wang handed over this topic to me. We are working on it the
> last two months. We have tested the patchset for a long time. Here is
> the new version.
Applied patches 1-4 and 11 to 4.15/scsi-queue. I suggest you resubmit
the rest to get them back on people's radar.
--
Martin
81 matches
Mail list logo