[dm-devel] dm-verity OOPSes on kernel 4.12rc

2017-05-18 Thread Milan Broz
Hi Gilad, seems this OOPs is caused by async crypto hash changes in 4.12 for dm-verity. Could you please check if it is some known problem? Fedora rawhide x86_64 (with 4.12rc patches) crashes always, running verity-compat-test from cryptsetup testsuite is enough to trigger this. I am not able

Re: [dm-devel] dm-verity OOPSes on kernel 4.12rc

2017-05-18 Thread Gilad Ben-Yossef
On Thu, May 18, 2017 at 9:37 AM, Milan Broz wrote: > Hi Gilad, > > seems this OOPs is caused by async crypto hash changes in 4.12 for dm-verity. > Oy, that is not good. > Could you please check if it is some known problem? > I am not aware of any problem but of course I

[dm-devel] kernel BUG at lib/percpu-refcount.c:192

2017-05-18 Thread Marian Csontos
When running `lvm lvcreate --type raid5 --size 4194304B --name meta_r5 LVMTEST12279nqymhamb_vg --yes` there's a warning followed by the bug. Also at [ 192.140142] it looks like there is an uninitialized variable somewhere. env: rawhide, kvm, 2 (V)CPUs lvm2: upstream kernel:

Re: [dm-devel] dm-verity OOPSes on kernel 4.12rc

2017-05-18 Thread Milan Broz
On 05/18/2017 08:55 AM, Gilad Ben-Yossef wrote: > On Thu, May 18, 2017 at 9:37 AM, Milan Broz wrote: >> Hi Gilad, >> >> seems this OOPs is caused by async crypto hash changes in 4.12 for dm-verity. >> > > Oy, that is not good. > >> Could you please check if it is some known

[dm-devel] [PATCH] dm verity: fix no salt used use case

2017-05-18 Thread Gilad Ben-Yossef
DM-Verity has an (undocumented) mode where no salt is used. This was never handled directly by the DM-Verity code, instead working due to the fact that calling crypto_shash_update() with a zero length data is an implicit noop. This is no longer the case now that we have switched to

Re: [dm-devel] dm-verity OOPSes on kernel 4.12rc

2017-05-18 Thread Gilad Ben-Yossef
On Thu, May 18, 2017 at 10:18 AM, Milan Broz wrote: > On 05/18/2017 08:55 AM, Gilad Ben-Yossef wrote: >> On Thu, May 18, 2017 at 9:37 AM, Milan Broz wrote: >>> Hi Gilad, >>> >>> seems this OOPs is caused by async crypto hash changes in 4.12 for >>>

Re: [dm-devel] [PATCH] dm verity: fix no salt used use case

2017-05-18 Thread Milan Broz
On 05/18/2017 12:47 PM, Gilad Ben-Yossef wrote: > DM-Verity has an (undocumented) mode where no salt is used. > This was never handled directly by the DM-Verity code, instead working due > to the fact that calling crypto_shash_update() with a zero length data is > an implicit noop. > > This is

[dm-devel] [PATCH v7 1/2] init: add support to directly boot to a mapped device

2017-05-18 Thread Enric Balletbo i Serra
From: Will Drewry Add a dm= kernel parameter modeled after the md= parameter from do_mounts_md. It allows for device-mapper targets to be configured at boot time for use early in the boot process (as the root device or otherwise). Signed-off-by: Will Drewry

[dm-devel] [PATCH v7 0/2] dm: boot a mapped device without an initramfs

2017-05-18 Thread Enric Balletbo i Serra
Dear all, So here is a new version of the patches to be reviewed, this time as suggested by Alasdair the patches are reworked to match with the new dmsetup bootformat feature [1]. These patches are not reviewed yet but the format was discussed in the IRC and was suggested to send the kernel

[dm-devel] [PATCH v7 2/2] dm ioctl: add a device mapper ioctl function.

2017-05-18 Thread Enric Balletbo i Serra
Add a dm_ioctl_cmd to issue the equivalent of a DM ioctl call in kernel. Signed-off-by: Enric Balletbo i Serra --- drivers/md/dm-ioctl.c | 45 +++ include/linux/device-mapper.h | 6 ++ 2 files changed, 51

[dm-devel] [PATCH 03/15] gfs2: remove the unused sd_log_error field

2017-05-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/gfs2/incore.h | 1 - fs/gfs2/lops.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index b7cf65d13561..aa3d44527fa2 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -815,7

[dm-devel] [PATCH 14/15] blk-mq: switch ->queue_rq return value to blk_status_t

2017-05-18 Thread Christoph Hellwig
Use the same values for use for request completion errors as the return value from ->queue_rq. BLK_STS_RESOURCE is special cased to cause a requeue, and all the others are completed as-is. Signed-off-by: Christoph Hellwig --- block/blk-mq.c| 37

[dm-devel] [PATCH 13/15] block: introduce new block status code type

2017-05-18 Thread Christoph Hellwig
Currently we use nornal Linux errno values in the block layer, and while we accept any error a few have overloaded magic meanings. This patch instead introduces a new blk_status_t value that holds block layer specific status codes and explicitly explains their meaning. Helpers to convert from

[dm-devel] [PATCH 09/15] dm: don't return errnos from ->map

2017-05-18 Thread Christoph Hellwig
Instead use the special DM_MAPIO_KILL return value to return -EIO just like we do for the request based path. Note that dm-log-writes returned -ENOMEM in a few places, which now becomes -EIO instead. No consumer treats -ENOMEM special so this shouldn't be an issue (and it should use a mempool to

[dm-devel] [PATCH 12/15] block: merge blk_types.h into bio.h

2017-05-18 Thread Christoph Hellwig
We've cleaned up our headers sufficiently that we don't need this split anymore. Signed-off-by: Christoph Hellwig --- block/blk-wbt.c| 2 +- drivers/target/target_core_pscsi.c | 2 +- include/linux/bio.h| 307

[dm-devel] [PATCH 06/15] fs: simplify dio_bio_complete

2017-05-18 Thread Christoph Hellwig
Only read bio->bi_error once in the common path. Signed-off-by: Christoph Hellwig --- fs/direct-io.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/direct-io.c b/fs/direct-io.c index 04247a6c3f73..bb711e4b86c2 100644 --- a/fs/direct-io.c +++

[dm-devel] [PATCH 05/15] fs: remove the unused error argument to dio_end_io()

2017-05-18 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- fs/btrfs/inode.c | 6 +++--- fs/direct-io.c | 3 +-- include/linux/fs.h | 2 +- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 17cbe9306faf..758b2666885e 100644 ---

[dm-devel] [PATCH 08/15] dm mpath: merge do_end_io_bio into multipath_end_io_bio

2017-05-18 Thread Christoph Hellwig
This simplifies the code and especially the error passing a bit and will help with the next patch. Signed-off-by: Christoph Hellwig --- drivers/md/dm-mpath.c | 42 -- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git

[dm-devel] [PATCH 11/15] fs-writeback: move wbc_to_write_flags out of line

2017-05-18 Thread Christoph Hellwig
This way writeback.h doesn't need to pull in blk_types.h. Signed-off-by: Christoph Hellwig --- fs/fs-writeback.c | 13 + include/linux/writeback.h | 11 +-- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/fs/fs-writeback.c

[dm-devel] [PATCH 01/15] nvme-lightnvm: use blk_execute_rq in nvme_nvm_submit_user_cmd

2017-05-18 Thread Christoph Hellwig
Instead of reinventing it poorly. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González --- drivers/nvme/host/lightnvm.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c

[dm-devel] dedicated error codes for the block layer

2017-05-18 Thread Christoph Hellwig
This series introduces a new blk_status_t error code type for the block layer so that we can have tigher control and explicit semantics for block layer errors. All but the last three patches are cleanups that lead to the new type. The series it mostly limited to the block layer and drivers, and

[dm-devel] [PATCH 07/15] block_dev: propagate bio_iov_iter_get_pages error in __blkdev_direct_IO

2017-05-18 Thread Christoph Hellwig
Once we move the block layer to its own status code we'll still want to propagate the bio_iov_iter_get_pages, so restructure __blkdev_direct_IO to take ret into account when returning the errno. --- fs/block_dev.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git

[dm-devel] [PATCH 02/15] scsi/osd: don't save block errors into req_results

2017-05-18 Thread Christoph Hellwig
We will only have sense data if the command exectured and got a SCSI result, so this is pointless. Signed-off-by: Christoph Hellwig --- drivers/scsi/osd/osd_initiator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/scsi/osd/osd_initiator.c

[dm-devel] [PATCH 04/15] dm: fix REQ_RAHEAD handling

2017-05-18 Thread Christoph Hellwig
A few (but not all) dm targets use a special EWOULDBLOCK error code for failing REQ_RAHEAD requests that fail due to a lack of available resources. But no one else knows about this magic code, and lower level drivers also don't generate it when failing read-ahead requests for similar reasons. So

Re: [dm-devel] dm-crypt IV generation (summary)

2017-05-18 Thread Ondrej Mosnacek
2017-04-07 8:12 GMT+02:00 Herbert Xu : > On Fri, Mar 10, 2017 at 02:44:26PM +0100, Ondrej Mosnacek wrote: >> >> ISSUES: >> a) The 'keycount' parameter. >> In order to support multi-key modes from Loop-AES, >> dm-crypt accepts a keycount

Re: [dm-devel] [PATCH 12/15] block: merge blk_types.h into bio.h

2017-05-18 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:18 +0200, Christoph Hellwig wrote: > We've cleaned up our headers sufficiently that we don't need this split > anymore. Hello Christoph, Request-based drivers need the structure definitions from and the type definitions from but do not need the definition of struct

[dm-devel] [PATCH] libmultipath: add comment about resuming

2017-05-18 Thread Benjamin Marzinski
The reason for the second resume in my commit "libmultipath: fix suspended devs from failed reloads" is not obvious from the multipath code, so add a comment. Signed-off-by: Benjamin Marzinski --- libmultipath/devmapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git

Re: [dm-devel] [PATCH 5/7] Move the declaration of mpath_mx_alloc_len to a header file

2017-05-18 Thread Benjamin Marzinski
On Thu, May 18, 2017 at 08:36:10PM +, Bart Van Assche wrote: > On Thu, 2017-05-18 at 15:06 -0500, Benjamin Marzinski wrote: > > On Wed, May 17, 2017 at 08:43:07AM -0700, Bart Van Assche wrote: > > > This allows the compiler to verify consistency of declaration and > > > definition. > > >

Re: [dm-devel] [PATCH 5/7] Move the declaration of mpath_mx_alloc_len to a header file

2017-05-18 Thread Bart Van Assche
On Thu, 2017-05-18 at 15:06 -0500, Benjamin Marzinski wrote: > On Wed, May 17, 2017 at 08:43:07AM -0700, Bart Van Assche wrote: > > This allows the compiler to verify consistency of declaration and > > definition. > > Signed-off-by: Bart Van Assche > > --- > >

Re: [dm-devel] [PATCH v3 00/10] dm: zoned block device support

2017-05-18 Thread Damien Le Moal
Mike, (resending using outlook as I am still having troubles reaching @redhat.com email domain with any other email client. My apologies if multiple copies of this email show up) On 5/18/17 03:54, Mike Snitzer wrote: > On Tue, May 16 2017 at 4:03pm -0400, > Mike Snitzer

[dm-devel] [PATCH] multipath-tools: replace 64bit archs macros by __LP64__

2017-05-18 Thread Xose Vazquez Perez
Rationale: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html __LP64__ _LP64 These macros are defined, with value 1, if (and only if) the compilation is for a target where long int and pointer both use 64-bits and int uses 32-bit. Cc: Christophe Varoqui

Re: [dm-devel] [PATCH] multipath-tools: replace 64bit archs macros by __LP64__

2017-05-18 Thread Bart Van Assche
On Fri, 2017-05-19 at 03:38 +0200, Xose Vazquez Perez wrote: > Rationale: https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html > > __LP64__ > _LP64 > These macros are defined, with value 1, if (and only if) the compilation is > for a target where long int and pointer both use

Re: [dm-devel] dedicated error codes for the block layer

2017-05-18 Thread David Sterba
On Thu, May 18, 2017 at 03:17:57PM +0200, Christoph Hellwig wrote: > This series introduces a new blk_status_t error code type for the block > layer so that we can have tigher control and explicit semantics for > block layer errors. > > All but the last three patches are cleanups that lead to the