On Mon, 2017-09-25 at 14:00 +0200, Johannes Thumshirn wrote:
> Coverity-scan recently found a possible NULL pointer dereference in
> fc_block_scsi_eh() as starget_to_rport() either returns the rport for
> the startget or NULL.
>
> While it is rather unlikely to have fc_block_scsi_eh() called
Meng,
> Since right after the user copy, we are going to
> memset(, 0, sizeof(karg)), the copy_from_user is redundant
Applied to 4.15/scsi-queue. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
On Sun, Sep 24, 2017 at 11:36:33PM +0100, Al Viro wrote:
> Suppose vhost_scsi_iov_to_sgl() got a two-iovec array, mapped
> e.g. 20 pages from the first one just fine and failed on the
> second.
>
> static int
> vhost_scsi_iov_to_sgl(struct vhost_scsi_cmd *cmd, bool write,
>
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> - return rq_entry_fifo(dd->fifo_list[data_dir].next);
> + if (!dd->zones_wlock || data_dir == READ)
> + return rq_entry_fifo(dd->fifo_list[data_dir].next);
> +
> + spin_lock_irqsave(>zone_lock, flags);
> +
> +
Hannes,
> When an rport is found in the bindings array there is no guarantee
> that it had been a target port, so we need to call
> fc_remote_port_rolechg() here to ensure the scsi_target_id is set
> correctly. Otherwise the port will never be scanned.
Applied to 4.14/scsi-fixes. Thank you!
Hi Suganath,
> Also, Making all PRP buffer may or may not need FW changes (assuming
> it is possible.), we may end up into multiple FW version check.
I don't understand how submitting an I/O that is guaranteed to honor the
constraints of the target NVMe drive could possibly cause problems for
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> 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
Thomas,
> Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.
> Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci"
Applied to 4.15/scsi-queue. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
On 09/21/2017 01:19 PM, Dave Carroll wrote:
>> [...]
>> ---
> Acked-by: Dave Carroll
>
Thanks Dave!
James/Martin, am I expected to send a v2 with some change? Perhaps with
Dave's ack?
Sorry to annoy, thanks in advance for any advice!
Cheers,
Guilherme
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> +static inline bool deadline_request_needs_zone_wlock(struct deadline_data
> *dd,
> + struct request *rq)
> +{
> +
> + if (!dd->zones_wlock)
> + return false;
> +
> + if
Thomas,
> Use *_pool_zalloc rather than *_pool_alloc followed by memset with 0.
> Found by coccinelle spatch "api/alloc/pool_zalloc-simple.cocci"
Applied to 4.15/scsi-queue. Thanks!
--
Martin K. Petersen Oracle Linux Engineering
On Mon, 2017-09-25 at 15:14 +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().
>
> No
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> + return kzalloc_node(BITS_TO_LONGS(sdkp->nr_zones)
> + * sizeof(unsigned long),
Does this perhaps fit on one line?
> +/**
> + * sd_zbc_get_seq_zones - Parse report zones reply to identify sequential
> zones
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> 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().
Hannes,
> here's a small patchset to suppress errors from scsi_dh_attach() for
> unsupported devices.
Applied to 4.15/scsi-queue. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
Hannes,
> During failover there is a small race window between
> fc_remote_port_add() and fc_timeout_deleted_rport(); the latter drops
> the lock after setting the port to NOTPRESENT, so if
> fc_remote_port_add() is called right at that time it will fail to
> detect the existing rport and
Hi, Robin,
Can ARM/ARM64 use the same implementation as MIPS? Or I just do MIPS things is
OK?
Huacai
-- Original --
From: "Robin Murphy";
Date: Mon, Sep 25, 2017 08:57 PM
To: "Huacai Chen"; "Christoph
Ewan,
> Some devices do not support a WRITE SAME / WRITE SAME(16) with the
> UNMAP bit set up to the length specified in the MAXIMUM WRITE SAME
> LENGTH field in the block limits VPD page (or, the field is zero,
> indicating there is no limit). Limit the length by the MAXIMUM UNMAP
> LBA COUNT
Hi, Christoph,
Can I put the declaration in asm/dma-coherence.h?
And, last time you said it is OK to pass a NULL to dma_get_cache_alignment()
and cc all driver maintainers. I have do so.
Huacai
-- Original --
From: "Christoph Hellwig";
Date: Mon,
> index aba7138..e2c5d9e 100644
> --- a/arch/mips/include/asm/dma-mapping.h
> +++ b/arch/mips/include/asm/dma-mapping.h
> @@ -39,4 +39,6 @@ static inline void arch_setup_dma_ops(struct device *dev,
> u64 dma_base,
> #endif
> }
>
> +int mips_get_cache_alignment(struct device *dev);
All the
On 25/09/17 10:46, Huacai Chen wrote:
> Make dma_get_cache_alignment() to accept a 'dev' argument. As a result,
> it can return different alignments due to different devices' I/O cache
> coherency.
>
> Currently, MIPS is the only architecture which support coherent & non-
> coherent devices
In non-coherent DMA mode, kernel uses cache flushing operations to
maintain I/O coherency, so scsi's block queue should be aligned to
ARCH_DMA_MINALIGN. Otherwise, it will cause data corruption, at least
on MIPS:
Step 1, dma_map_single
Step 2, cache_invalidate (no writeback)
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
Again, if this is fixing an oops it should be tagged for inclusion
into stable.
Byte,
Johannes
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF:
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
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
CC: stable?
Anyways,
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
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
On Thu, Sep 21, 2017 at 11:17:35PM -0700, James Smart wrote:
> Support for NPIV with NVME will be added in the near future.
Sounds like the future is bright,
Reviewed-by: Johannes Thumshirn
--
Johannes Thumshirn Storage
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
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
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
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
Looks good,
Reviewed-by: Johannes Thumshirn
But again, this should be considered for inclusion into stable
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr.
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
hello,
an additional research shows that the very latest kernels are not showing
a crash with a reproducer. git bisect showed that:
commit 7f564528a480084e2318cd48caba7aef4a54a77f is the first commit (between
v4.11 and v4.12-rc1) a crash is not reproduced with:
commit
> if (!q)
> return ERR_PTR(-ENOMEM);
> q->cmd_size = sizeof(struct bsg_job) + dd_job_size;
> - q->init_rq_fn = bsg_init_rq;
> - q->exit_rq_fn = bsg_exit_rq;
> + q->init_rq_fn = bsg_init_job;
> + q->exit_rq_fn = bsg_exit_job;
> + q->initialize_rq_fn =
On Mon, Sep 25, 2017 at 08:53:07AM -0700, Christoph Hellwig wrote:
> > if (!q)
> > return ERR_PTR(-ENOMEM);
> > q->cmd_size = sizeof(struct bsg_job) + dd_job_size;
> > - q->init_rq_fn = bsg_init_rq;
> > - q->exit_rq_fn = bsg_exit_rq;
> > + q->init_rq_fn = bsg_init_job;
>
Xin,
> ChunYu found a kernel crash by syzkaller:
[...]
> It's caused by skb_shared_info at the end of sk_buff was overwritten by
> ISCSI_KEVENT_IF_ERROR when parsing nlmsg info from skb in iscsi_if_rx.
>
> During the loop if skb->len == nlh->nlmsg_len and both are sizeof(*nlh),
> ev =
Alim,
> Should I drop this patch and send another one which removes UFS_BIT()
> macro?
I fail to see the point of UFS_BIT(). So yes.
Please make sure to CC: Subhash on ufs changes.
--
Martin K. Petersen Oracle Linux Engineering
Varun,
> Set PCIe relax ordering bits in FW_IQ_CMD if relax ordering is enabled
> in the PCIe device.
Applied to 4.15/scsi-queue. Thank you!
--
Martin K. Petersen Oracle Linux Engineering
Damien,
> Reporting a maximum number of blocks that is not aligned on the device
> physical size would cause a large write same request to be split into
> physically unaligned chunks by __blkdev_issue_write_zeroes() and
> __blkdev_issue_write_same(), even if the caller of these functions
> took
On Mon, 2017-09-25 at 15:14 +0900, Damien Le Moal wrote:
> Modify mq-dealine init_queue and exit_queue elevator methods to handle
^^
mq-deadline ?
> +static int deadline_init_zones_wlock(struct request_queue *q,
> + struct deadline_data
Guilherme,
> James/Martin, am I expected to send a v2 with some change? Perhaps
> with Dave's ack? Sorry to annoy, thanks in advance for any advice!
I was just about to mail Dave and ask for confirmation that your
interpretation of the controller behavior is correct.
Dave?
--
Martin K.
Viswas,
> Do we need to send V3 patch set with corrected date ?
Yes, please. And address Jack's/kbuild robot's comments.
Thanks!
--
Martin K. Petersen Oracle Linux Engineering
Make dma_get_cache_alignment() to accept a 'dev' argument. As a result,
it can return different alignments due to different devices' I/O cache
coherency.
Currently, MIPS is the only architecture which support coherent & non-
coherent devices co-exist. This may be changed in the future, so add a
On Mon, Sep 25, 2017 at 03:14:46PM +0900, Damien Le Moal wrote:
> 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
This probably should be two patches and both CCed to stable.
Byte,
Johannes
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer,
Looks good,
Reviewed-by: Johannes Thumshirn
But should probably go into stable as well.
--
Johannes Thumshirn Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
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
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
Looks good,
Reviewed-by: Johannes Thumshirn
But maybe worth adding a:
Fixes: 4042629e426d ("[SCSI] lpfc 8.3.20: Updates to FC discovery commands")
Byte,
Johannes
--
Johannes Thumshirn Storage
jthumsh...@suse.de
> -Original Message-
> From: Christoph Hellwig [mailto:h...@infradead.org]
> Sent: Monday, September 18, 2017 9:52 PM
> To: Shivasharan Srikanteshwara
> Cc: Christoph Hellwig; shuw...@redhat.com; Kashyap Desai; Sumit Saxena;
> j...@linux.vnet.ibm.com; martin.peter...@oracle.com;
>
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
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
During failover there is a small race window between fc_remote_port_add()
and fc_timeout_deleted_rport(); the latter drops the lock after setting
the port to NOTPRESENT, so if fc_remote_port_add() is called right at
that time it will fail to detect the existing rport and happily adding
a new
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
Coverity-scan recently found a possible NULL pointer dereference in
fc_block_scsi_eh() as starget_to_rport() either returns the rport for
the startget or NULL.
While it is rather unlikely to have fc_block_scsi_eh() called without
an rport associated it's a good idea to catch potential misuses of
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
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
---
When dispatching writes to a zoned block device, only allow the request
to be dispatched if its target zone is not locked. If it is, leave the
request in the scheduler queue and look for another suitable write
request. If no write can be dispatched, allow reads to be dispatched
even if the write
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:
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
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 (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
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
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
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
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
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
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
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
Introduce new fields to mq-deadline private data to support zoned block
devices. The fields are a zone bitmap used to implement zone write
locking and a spinlock to atomically handle zone write locking with
other processing.
Modify mq-dealine init_queue and exit_queue elevator methods to handle
73 matches
Mail list logo