On Wed, Apr 26, 2017 at 12:11:33PM -0600, Logan Gunthorpe wrote:
> Ok, well for starters I think you are mistaken about kmap being able to
> fail. I'm having a hard time finding many users of that function that
> bother to check for an error when calling it.
A quick audit of the arch code shows yo
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> I/O errors triggered by multipathd incorrectly not enabling the
> no-flush flag for DM_DEVICE_SUSPEND or DM_DEVICE_RESUME are hard to
> debug. Add more logging to make it easier to debug this.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reineck
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> This patch does not change any functionality but makes the code
> easier to read.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> ---
> drivers/md/dm-mpath.c | 37 -
> 1 file changed, 16 insertions(+
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Instead of checking MPATHF_QUEUE_IF_NO_PATH,
> MPATHF_SAVED_QUEUE_IF_NO_PATH and the no_flush flag to decide whether
> or not to push back a request if there are no paths available, only
> clear MPATHF_QUEUE_IF_NO_PATH in queue_if_no_path() if no_flu
On Wed, Apr 26, 2017 at 06:41:27PM +, Bart Van Assche wrote:
> On Wed, 2017-04-26 at 09:40 +0200, Christoph Hellwig wrote:
> > this series has some prep patches for my work to have proper, type
> > checked block errors codes. One fallout of that is that we need to
> > get rid of how dm overloa
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Ensure that the assumptions about the caller holding suspend_lock
> are checked at runtime if lockdep is enabled.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> ---
> drivers/md/dm-table.c | 4
> drivers/md/dm.c | 9 ---
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Introduce an enumeration type for the queue mode. This patch does
> not change any functionality but makes the dm code easier to read.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> ---
> drivers/md/dm-core.h | 2 +-
> drive
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Verify at runtime that __pg_init_all_paths() is called with
> multipath.lock held if lockdep is enabled.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> ---
> drivers/md/dm-mpath.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Ensure that the assumptions about the caller holding suspend_lock
> are checked at runtime if lockdep is enabled.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> ---
> drivers/md/dm-table.c | 4
> drivers/md/dm.c | 9 ---
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> blk_mq_register_dev() can fail. Hence check the return value of
> that function.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> Cc: Christoph Hellwig
> ---
> drivers/md/dm-rq.c | 6 +-
> 1 file changed, 5 insertions(+), 1 deletio
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> The 'cache_size' argument of dm_block_manager_create() has never
> been used. Hence remove it and also the definitions of the constants
> passed as 'cache_size' argument.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
> ---
> drivers/md
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> When debugging the dm-mpath driver it is important to know what
> decisions have been taken with regard to requeuing. Hence this
> patch that adds pr_debug() statements that report what decisions
> have been taken.
>
> Signed-off-by: Bart Van Assche
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Reduce the requeue delay in dm_requeue_original_request() from 5s
> to 0.5s to avoid that this delay slows down failover or failback.
> Increase the requeue delay in dm_mq_queue_rq() from 0.1s to 0.5s
> to reduce the system load if immediate requeuin
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> Requeuing a request immediately while path initialization is ongoing
> causes high CPU usage, something that is undesired. Hence delay
> requeuing while path initialization is in progress.
>
> Signed-off-by: Bart Van Assche
> Cc: Hannes Reinecke
>
On 04/26/2017 08:37 PM, Bart Van Assche wrote:
> If blk_get_request() fails check whether the failure is due to
> a path being removed. If that is the case fail the path by
> triggering a call to fail_path(). This patch avoids that the
> following scenario can be encountered while removing paths:
>
On Tue, Apr 25, 2017 at 12:20:54PM -0600, Logan Gunthorpe wrote:
> Very straightforward conversion to the new function in the caam driver
> and shash library.
>
> Signed-off-by: Logan Gunthorpe
> Cc: Herbert Xu
> Cc: "David S. Miller"
> ---
> crypto/shash.c| 9 ++---
> driv
On Wed, Apr 26 2017 at 2:41pm -0400,
Bart Van Assche wrote:
> On Wed, 2017-04-26 at 09:40 +0200, Christoph Hellwig wrote:
> > this series has some prep patches for my work to have proper, type
> > checked block errors codes. One fallout of that is that we need to
> > get rid of how dm overloads
On Wed, 2017-04-26 at 09:40 +0200, Christoph Hellwig wrote:
> this series has some prep patches for my work to have proper, type
> checked block errors codes. One fallout of that is that we need to
> get rid of how dm overloads a few return values with either internal
> positive error codes or neg
Introduce an enumeration type for the queue mode. This patch does
not change any functionality but makes the dm code easier to read.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
---
drivers/md/dm-core.h | 2 +-
drivers/md/dm-ioctl.c | 2 +-
drivers/md/dm-mpath.c
blk_mq_register_dev() can fail. Hence check the return value of
that function.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Christoph Hellwig
---
drivers/md/dm-rq.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/md/dm-rq.c b/drivers/md/dm-rq.c
index
When debugging the dm-mpath driver it is important to know what
decisions have been taken with regard to requeuing. Hence this
patch that adds pr_debug() statements that report what decisions
have been taken.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Christoph Hellwig
---
drivers/
I/O errors triggered by multipathd incorrectly not enabling the
no-flush flag for DM_DEVICE_SUSPEND or DM_DEVICE_RESUME are hard to
debug. Add more logging to make it easier to debug this.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
---
drivers/md/dm-mpath.c | 25 +---
This patch does not change any functionality but makes the code
easier to read.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
---
drivers/md/dm-mpath.c | 37 -
1 file changed, 16 insertions(+), 21 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/driver
Hello Mike,
The patches in this series are:
* A few fixes for bugs in the dm-mpath driver I ran into while testing
this driver.
* A resend of various dm / dm-mpath patches I had posted before but
for which I'm still waiting for a review from you.
Please consider at least the dm-mpath bug fixe
Requeuing a request immediately while path initialization is ongoing
causes high CPU usage, something that is undesired. Hence delay
requeuing while path initialization is in progress.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Christoph Hellwig
Cc:
---
drivers/md/dm-mpath.c | 12
If blk_get_request() fails check whether the failure is due to
a path being removed. If that is the case fail the path by
triggering a call to fail_path(). This patch avoids that the
following scenario can be encountered while removing paths:
* CPU usage of a kworker thread jumps to 100%.
* Removin
Instead of checking MPATHF_QUEUE_IF_NO_PATH,
MPATHF_SAVED_QUEUE_IF_NO_PATH and the no_flush flag to decide whether
or not to push back a request if there are no paths available, only
clear MPATHF_QUEUE_IF_NO_PATH in queue_if_no_path() if no_flush has
not been set. The result is that only a single b
The 'cache_size' argument of dm_block_manager_create() has never
been used. Hence remove it and also the definitions of the constants
passed as 'cache_size' argument.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
---
drivers/md/dm-cache-metadata.c| 3 ---
drivers/md/dm-era-
This patch does not change any functionality but makes the next
patch in this series easier to read.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
Cc: Christoph Hellwig
Cc:
---
drivers/md/dm-mpath.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/driver
Reduce the requeue delay in dm_requeue_original_request() from 5s
to 0.5s to avoid that this delay slows down failover or failback.
Increase the requeue delay in dm_mq_queue_rq() from 0.1s to 0.5s
to reduce the system load if immediate requeuing has been requested
by the dm driver.
Signed-off-by:
Ensure that the assumptions about the caller holding suspend_lock
are checked at runtime if lockdep is enabled.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
---
drivers/md/dm-table.c | 4
drivers/md/dm.c | 9 -
2 files changed, 8 insertions(+), 5 deletions(-)
diff --gi
Verify at runtime that __pg_init_all_paths() is called with
multipath.lock held if lockdep is enabled.
Signed-off-by: Bart Van Assche
Cc: Hannes Reinecke
---
drivers/md/dm-mpath.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index fb4b7228f
Am 25.04.2017 um 20:20 schrieb Logan Gunthorpe:
This patch introduces functions which kmap the pages inside an sgl.
These functions replace a common pattern of kmap(sg_page(sg)) that is
used in more than 50 places within the kernel.
The motivation for this work is to eventually safely support sg
On 04/20/2017 11:35 PM, NeilBrown wrote:
> On Thu, Apr 20 2017, Jes Sorensen wrote:
...
>> Second, isn't this going to be racey if you have multiple arrays
>> running? I am wondering if we cannot find a solution that relies on a
>> permanently installed udev rule that we enable/disable with syste
On Tue, Apr 25, 2017 at 12:21:02PM -0600, Logan Gunthorpe wrote:
> Straightforward conversion to the new helper, except due to the lack
> of error path, we have to use SG_MAP_MUST_NOT_FAIL which may BUG_ON in
> certain cases in the future.
>
> Signed-off-by: Logan Gunthorpe
> Cc: Boris Ostrovsky
This simplifies the I/O completion path a bit.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-mpath.c | 53 +--
1 file changed, 18 insertions(+), 35 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 2950b145443d..19
This untangles the DM_MAPIO_* values returned from ->clone_and_map_rq
from the error codes used by the block layer.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-rq.c| 12 +---
drivers/md/dm-target.c| 2 +-
include/linux/device-mapper.h | 1 +
3 files changed,
Instead of returning either a DM_ENDIO_* constant or an error code, add
a new DM_ENDIO_DONE value that means keep errno as is. This allows us
to easily keep the existing error code in case where we can't push back,
and it also preparares for the new block level status codes with strict
type checki
Hi Mike,
this series has some prep patches for my work to have proper, type
checked block errors codes. One fallout of that is that we need to
get rid of how dm overloads a few return values with either internal
positive error codes or negative errno values. This patches does
that, which happens
Remove the r variable and just expand the value at the two places where
it is used.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-mpath.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c
index 9e971be254f4..33ecda737376 1
On Tue, Apr 25, 2017 at 12:20:49PM -0600, Logan Gunthorpe wrote:
> This is a prep patch to add a new error code to libiscsi. We want to
> rework some kmap calls to be able to fail. When we do, we'd like to
> use this error code.
The kmap case in iscsi_tcp_segment_map can already fail. Please add
On Tue, Apr 25, 2017 at 12:20:48PM -0600, Logan Gunthorpe wrote:
> This patch introduces functions which kmap the pages inside an sgl.
> These functions replace a common pattern of kmap(sg_page(sg)) that is
> used in more than 50 places within the kernel.
>
> The motivation for this work is to eve
> On Tue, Apr 25, 2017 at 04:31:29PM -0700, Adrian Salido wrote:
>> Struct dm_ioctl has some padding/data that is not explicitly cleared
>> before copying to user. This can cause kernel stack contents to be
>> leaked to user space.
>
> Please be more precise here, explaining which part of the buffe
Straightforward conversion to the new function.
Signed-off-by: Logan Gunthorpe
Acked-by: David Kershner
---
drivers/staging/unisys/visorhba/visorhba_main.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/unisys/visorhba/visorhba_main.c
b/drivers
Very straightforward conversion of three scsi drivers.
Signed-off-by: Logan Gunthorpe
Cc: Brian King
Cc: Artur Paszkiewicz
---
drivers/scsi/ipr.c | 27 ++-
drivers/scsi/isci/request.c | 42 +-
drivers/scsi/pmcraid.c
Very straightforward conversion to the new function in the caam driver
and shash library.
Signed-off-by: Logan Gunthorpe
Cc: Herbert Xu
Cc: "David S. Miller"
---
crypto/shash.c| 9 ++---
drivers/crypto/caam/caamalg.c | 8 +++-
2 files changed, 9 insertions(+), 8 deletio
Straightforward conversion except there's no error path, so we
make use of SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases
in the future.
Signed-off-by: Logan Gunthorpe
Cc: Santosh Shilimkar
Cc: "David S. Miller"
---
net/rds/ib_recv.c | 8
1 file changed, 4 insertions(+), 4 del
Fairly straightforward conversions in all spots. In a couple of cases
any error gets propogated up should sg_map fail. In other
cases a warning is issued if the kmap fails seeing there's no
clear error path. This should not be an issue until someone tries to
use unmappable memory in the sgl with th
On 04/19, Dan Williams wrote:
>On Wed, Apr 19, 2017 at 8:01 PM, kbuild test robot wrote:
>> Hi Dan,
>>
>> [auto build test ERROR on powerpc/next]
>> [also build test ERROR on v4.11-rc7 next-20170419]
>> [if your patch is applied to the wrong git tree, please drop us a note to
>> help improve the
Very straightforward conversion of three scsi drivers.
Signed-off-by: Logan Gunthorpe
Cc: Achim Leubner
Cc: John Garry
---
drivers/scsi/gdth.c| 9 +++--
drivers/scsi/hisi_sas/hisi_sas_v1_hw.c | 14 +-
drivers/scsi/hisi_sas/hisi_sas_v2_hw.c | 13 +---
the problem could be as simple as
On Tue, Apr 25, 2017 at 5:42 PM, Alasdair G Kergon wrote:
> On Tue, Apr 25, 2017 at 05:33:19PM -0700, Adrian Salido wrote:
>> it's actually the data portion of the struct under a custom user ioctl
>> where (param_kernel->data_size - minimum_data_size) <
>> sizeof
This is a single straightforward conversion from kmap to sg_map.
We also create the i915_gem_object_unmap function to common up the
unmap code.
Signed-off-by: Logan Gunthorpe
Acked-by: Daniel Vetter
---
drivers/gpu/drm/i915/i915_gem.c | 27 ---
1 file changed, 16 insert
Very straightforward conversion of three scsi drivers
Signed-off-by: Logan Gunthorpe
Cc: Adaptec OEM Raid Solutions
Cc: Kashyap Desai
Cc: Sumit Saxena
Cc: Shivasharan S
---
drivers/scsi/arcmsr/arcmsr_hba.c | 16
drivers/scsi/ips.c | 8
drivers/scsi/me
Changes since v1:
* Rebased onto next-20170424
* Removed the _offset version of these functions per Christoph's
suggestion
* Added an SG_MAP_MUST_NOT_FAIL flag which will BUG_ON in future cases
that can't gracefully fail. This removes a bunch of the noise added
in v1 to a couple of the drive
Struct dm_ioctl has some padding/data that is not explicitly cleared
before copying to user. This can cause kernel stack contents to be
leaked to user space.
Cc: sta...@vger.kernel.org
Signed-off-by: Adrian Salido
---
drivers/md/dm-ioctl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/driv
This patch introduces functions which kmap the pages inside an sgl.
These functions replace a common pattern of kmap(sg_page(sg)) that is
used in more than 50 places within the kernel.
The motivation for this work is to eventually safely support sgls that
contain io memory. In order for that to wo
Straightforward conversion to the new helper, except due to the lack
of error path, we have to use SG_MAP_MUST_NOT_FAIL which may BUG_ON in
certain cases in the future.
Signed-off-by: Logan Gunthorpe
Cc: Boris Ostrovsky
Cc: Juergen Gross
Cc: Konrad Rzeszutek Wilk
Cc: "Roger Pau Monné"
---
dr
We use the sg_map helper but it's slightly more complicated
as we only check for the error when the mapping actually gets used.
Such that if the mapping failed but wasn't needed then no
error occurs.
Signed-off-by: Logan Gunthorpe
Cc: Ulf Hansson
---
drivers/mmc/host/mmc_spi.c | 26
Very straightforward conversion to the new function in all four spots.
Signed-off-by: Logan Gunthorpe
Cc: Alasdair Kergon
Cc: Mike Snitzer
---
drivers/md/dm-crypt.c | 39 ++-
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/drivers/md/dm-crypt
This is a straightforward conversion to the new function.
Signed-off-by: Logan Gunthorpe
Cc: Sascha Sommer
Cc: Ulf Hansson
---
drivers/mmc/host/sdricoh_cs.c | 14 +-
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdric
Straightforward conversion to sg_map helper. Seeing there is no
cleare error path, SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain
cases in the future.
Signed-off-by: Logan Gunthorpe
Cc: Wolfram Sang
Cc: Ulf Hansson
---
drivers/mmc/host/tmio_mmc.h | 7 +--
drivers/mmc/host/tmio_mmc_p
Straightforward conversion, but we have to make use of
SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases
in the future.
Signed-off-by: Logan Gunthorpe
Cc: Alex Dubov
---
drivers/memstick/host/jmb38x_ms.c | 11 ++-
drivers/memstick/host/tifm_ms.c | 11 ++-
2 files changed,
Straightforward conversion, except due to the lack of an error path we
have to use SG_MAP_MUST_NOT_FAIL which may BUG_ON in certain cases
in the future.
Signed-off-by: Logan Gunthorpe
Cc: Adrian Hunter
Cc: Ulf Hansson
---
drivers/mmc/host/sdhci.c | 14 +-
1 file changed, 9 insertio
Conversion of a couple kmap_atomic instances to the sg_map helper
function.
However, it looks like there was a bug in the original code: the source
scatter lists offset (t->offset) was passed to ablkcipher_get which
added it to the destination address. This doesn't make a lot of
sense, but t->offs
Convert the kmap and kmap_atomic uses to the sg_map function. We now
store the flags for the kmap instead of a boolean to indicate
atomicitiy. We use ISCSI_TCP_INTERNAL_ERR error type that was prepared
earlier for this.
Signed-off-by: Logan Gunthorpe
Cc: Lee Duncan
Cc: Chris Leech
---
drivers/
These two drivers appear to duplicate the functionality of
sg_copy_buffer. So we clean them up to use the common code.
This helps us remove a couple of instances that would otherwise be
slightly tricky sg_map usages.
Signed-off-by: Logan Gunthorpe
Cc: Johannes Thumshirn
---
drivers/scsi/csiost
This is a prep patch to add a new error code to libiscsi. We want to
rework some kmap calls to be able to fail. When we do, we'd like to
use this error code.
This patch simply introduces ISCSI_TCP_INTERNAL_ERR and prints
"Internal Error." when it gets hit.
Signed-off-by: Logan Gunthorpe
---
dri
This conversion is a bit complicated. We modiy the read_fifo,
write_fifo and copy_page functions to take a scatterlist instead of a
page. Thus we can use sg_map instead of kmap_atomic. There's a bit of
accounting that needed to be done for the offset for this to work.
(Seeing sg_map takes care of t
68 matches
Mail list logo