Re: [PATCH 1/4] block: add zone open, close and finish support

2019-06-21 Thread Minwoo Im
On 19-06-21 15:07:08, Matias Bjørling wrote: > @@ -226,6 +228,9 @@ int blkdev_reset_zones(struct block_device *bdev, > if (!blk_queue_is_zoned(q)) > return -EOPNOTSUPP; > > + if (!op_is_zone_mgmt_op(op)) > + return -EOPNOTSUPP; > + nitpick: -EINVAL looks bette

Re: [PATCH 4/4] dm: add zone open, close and finish support

2019-06-21 Thread Damien Le Moal
On 2019/06/21 22:07, Matias Bjørling wrote: > From: Ajay Joshi > > Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH > support to allow explicit control of zone states. > > Signed-off-by: Ajay Joshi > --- > drivers/md/dm-flakey.c| 7 +++ > drivers/md/dm-linear.c|

Re: [PATCH 3/4] scsi: sd_zbc: add zone open, close, and finish support

2019-06-21 Thread Damien Le Moal
On 2019/06/21 22:07, Matias Bjørling wrote: > From: Ajay Joshi > > Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH > support to allow explicit control of zone states. > > Signed-off-by: Ajay Joshi > --- > drivers/scsi/sd.c | 15 ++- > drivers/scsi/sd.h

Re: [PATCH 2/4] null_blk: add zone open, close, and finish support

2019-06-21 Thread Damien Le Moal
On 2019/06/21 22:07, Matias Bjørling wrote: > From: Ajay Joshi > > Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH > support to allow explicit control of zone states. > > Signed-off-by: Ajay Joshi > Signed-off-by: Matias Bjørling > --- > drivers/block/null_blk.h |

Re: [PATCH 1/4] block: add zone open, close and finish support

2019-06-21 Thread Damien Le Moal
Matias, Some comments inline below. On 2019/06/21 22:07, Matias Bjørling wrote: > From: Ajay Joshi > > Zoned block devices allows one to control zone transitions by using > explicit commands. The available transitions are: > > * Open zone: Transition a zone to open state. > * Close zone: T

Re: [dm-devel] [PATCH 00/30] multipath-tools: gcc9, VPD parsing, and get_uid fixes

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:22PM +0200, Martin Wilck wrote: > Hi Christophe, hi Ben, ACK for everything, except my nitpicks for patches 5 and 7. I don't know how much we care about patch 5 temporarily breaking compilation, but it no one else is bothered by it, I would be fine with simply tacking

Re: [dm-devel] [PATCH 07/30] libmpathcmd: use target length in strncpy() call

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:29PM +0200, Martin Wilck wrote: Not a big deal since default socket is a defined string, but since we are writing to &addr.sun_path[1], if DEFAULT_SOCKET were of size >= "sizeof(addr.sun_path) - 1", the strncpy() would fill all of addr.sun_path, without leaving any sp

Re: [dm-devel] [PATCH 05/30] multipath-tools: fix more gcc 9 -Wstringop-truncation warnings

2019-06-21 Thread Benjamin Marzinski
On Fri, Jun 07, 2019 at 03:05:27PM +0200, Martin Wilck wrote: > More often than not, this means replacing strncpy() by strlcpy(). This depends on "libmultipath: add size argument to dm_get_uuid()" for the the extra argument in the call to dm_get_uuid() from get_refwwid(). Otherwise, it looks fine.

[PATCH v14 7/7] xfs: disable map_sync for async flush

2019-06-21 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and xfs. Signed-off-by: Pankaj Gupta Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_file.c | 9

[PATCH v14 6/7] ext4: disable map_sync for async flush

2019-06-21 Thread Pankaj Gupta
Dont support 'MAP_SYNC' with non-DAX files and DAX files with asynchronous dax_device. Virtio pmem provides asynchronous host page cache flush mechanism. We don't support 'MAP_SYNC' with virtio pmem and ext4. Signed-off-by: Pankaj Gupta Reviewed-by: Jan Kara --- fs/ext4/file.c | 10 ++

[PATCH v13 4/7] dm: enable synchronous dax

2019-06-21 Thread Pankaj Gupta
This patch sets dax device 'DAXDEV_SYNC' flag if all the target devices of device mapper support synchrononous DAX. If device mapper consists of both synchronous and asynchronous dax devices, we don't set 'DAXDEV_SYNC' flag. 'dm_table_supports_dax' is refactored to pass 'iterate_devices_fn' as arg

[PATCH v14 1/7] libnvdimm: nd_region flush callback support

2019-06-21 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. virtio_pmem driver requires this special flush function. For rest of the region types we are registering existing flush function. Report error returned by host fsy

[PATCH v14 0/7] virtio pmem driver

2019-06-21 Thread Pankaj Gupta
This patch series is ready to be merged via nvdimm tree as discussed with Dan. We have ack/review on XFS, EXT4 device mapper & VIRTIO patches. This version has fix for test bot build failure. Keeping all the existing r-o-bs. Jakob CCed also tested the patch series and confirmed the working o

[PATCH 1/4] block: add zone open, close and finish support

2019-06-21 Thread Matias Bjørling
From: Ajay Joshi Zoned block devices allows one to control zone transitions by using explicit commands. The available transitions are: * Open zone: Transition a zone to open state. * Close zone: Transition a zone to closed state. * Finish zone: Transition a zone to full state. Allow kerne

[PATCH 3/4] scsi: sd_zbc: add zone open, close, and finish support

2019-06-21 Thread Matias Bjørling
From: Ajay Joshi Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Signed-off-by: Ajay Joshi --- drivers/scsi/sd.c | 15 ++- drivers/scsi/sd.h | 6 -- drivers/scsi/sd_zbc.c | 18 +- 3

[PATCH 2/4] null_blk: add zone open, close, and finish support

2019-06-21 Thread Matias Bjørling
From: Ajay Joshi Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Signed-off-by: Ajay Joshi Signed-off-by: Matias Bjørling --- drivers/block/null_blk.h | 4 ++-- drivers/block/null_blk_main.c | 13 ++--- dri

[PATCH 4/4] dm: add zone open, close and finish support

2019-06-21 Thread Matias Bjørling
From: Ajay Joshi Implement REQ_OP_ZONE_OPEN, REQ_OP_ZONE_CLOSE and REQ_OP_ZONE_FINISH support to allow explicit control of zone states. Signed-off-by: Ajay Joshi --- drivers/md/dm-flakey.c| 7 +++ drivers/md/dm-linear.c| 2 +- drivers/md/dm.c | 5 +++-- include/linux/blk_

[PATCH 0/4] open, close, finish zone support

2019-06-21 Thread Matias Bjørling
Hi, This patch serie adds support for explicit control of zone transitions. To test it, one can use an updated blkzone version that is available here: https://github.com/MatiasBjorling/util-linux.git zonemgmt blkzone can be compiled with: ./autogen.sh ./configure make blkzone After th

[PATCH v4 1/6] crypto: essiv - create wrapper template for ESSIV generation

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel Implement a template that wraps a (skcipher,cipher,shash) or (aead,cipher,shash) tuple so that we can consolidate the ESSIV handling in fscrypt and dm-crypt and move it into the crypto API. This will result in better test coverage, and will allow future changes to make the ba

[PATCH v4 0/6] crypto: switch to crypto API for ESSIV generation

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel This series creates an ESSIV template that produces a skcipher or AEAD transform based on a tuple of the form ',,' (or ',,' for the AEAD case). It exposes the encapsulated sync or async skcipher/aead by passing through all operations, while using the cipher/shash pair to tran

[PATCH v4 4/6] md: dm-crypt: switch to ESSIV crypto API template

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel Replace the explicit ESSIV handling in the dm-crypt driver with calls into the crypto API, which now possesses the capability to perform this processing within the crypto subsystem. Signed-off-by: Ard Biesheuvel --- drivers/md/Kconfig| 1 + drivers/md/dm-crypt.c | 20

[PATCH v4 6/6] crypto: arm64/aes - implement accelerated ESSIV/CBC mode

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel Add an accelerated version of the 'essiv(cbc(aes),aes,sha256' skcipher, which is used by fscrypt, and in some cases, by dm-crypt. This avoids a separate call into the AES cipher for every invocation. Signed-off-by: Ard Biesheuvel --- arch/arm64/crypto/aes-glue.c | 129 +++

[PATCH v4 5/6] crypto: essiv - add test vector for essiv(cbc(aes),aes,sha256)

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel Add a test vector for the ESSIV mode that is the most widely used, i.e., using cbc(aes) and sha256. Signed-off-by: Ard Biesheuvel --- crypto/tcrypt.c | 9 + crypto/testmgr.c | 6 + crypto/testmgr.h | 208 3 files changed, 223 insertions(+) diff -

[PATCH v4 3/6] md: dm-crypt: infer ESSIV block cipher from cipher string directly

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel Instead of allocating a crypto skcipher tfm 'foo' and attempting to infer the encapsulated block cipher from the driver's 'name' field, directly parse the string that we used to allocated the tfm. These are always identical (unless the allocation failed, in which case we bail

[PATCH v4 2/6] fs: crypto: invoke crypto API for ESSIV handling

2019-06-21 Thread Ard Biesheuvel
From: Ard Biesheuvel Instead of open coding the calculations for ESSIV handling, use a ESSIV skcipher which does all of this under the hood. Signed-off-by: Ard Biesheuvel --- fs/crypto/Kconfig | 1 + fs/crypto/crypto.c | 5 -- fs/crypto/fscrypt_private.h | 9 -- fs/crypto

Re: [PATCH v3 0/6] crypto: switch to crypto API for ESSIV generation

2019-06-21 Thread Ard Biesheuvel
On Fri, 21 Jun 2019 at 09:06, Ard Biesheuvel wrote: > > On Fri, 21 Jun 2019 at 09:01, Milan Broz wrote: > > > > On 20/06/2019 15:52, Ard Biesheuvel wrote: > > Does this include configurations that combine authenc with essiv? > > >>> > > >>> Hm, seems that we are missing these in luks2-integr

Re: [PATCH v3 0/6] crypto: switch to crypto API for ESSIV generation

2019-06-21 Thread Ard Biesheuvel
On Fri, 21 Jun 2019 at 09:01, Milan Broz wrote: > > On 20/06/2019 15:52, Ard Biesheuvel wrote: > Does this include configurations that combine authenc with essiv? > >>> > >>> Hm, seems that we are missing these in luks2-integrity-test. I'll add > >>> them there. > >>> > >>> I also used this

Re: [PATCH v3 0/6] crypto: switch to crypto API for ESSIV generation

2019-06-21 Thread Milan Broz
On 20/06/2019 15:52, Ard Biesheuvel wrote: Does this include configurations that combine authenc with essiv? >>> >>> Hm, seems that we are missing these in luks2-integrity-test. I'll add them >>> there. >>> >>> I also used this older test >>> https://gitlab.com/omos/dm-crypt-test-scripts/blob