[dm-devel] [RFC v3 2/4] crypto: Introduce CRYPTO_ALG_BULK flag

2016-05-31 Thread Baolin Wang
Now some cipher hardware engines prefer to handle bulk block rather than one sector (512 bytes) created by dm-crypt, cause these cipher engines can handle the intermediate values (IV) by themselves in one bulk block. This means we can increase the size of the request by merging request rather than

[dm-devel] [RFC v3 0/4] Introduce the bulk mode method when sending request to crypto layer

2016-05-31 Thread Baolin Wang
This patchset will check if the cipher can support bulk mode, then dm-crypt will handle different ways to send requests to crypto layer according to cipher mode. For bulk mode, we can use sg table to map the whole bio and send all scatterlists of one bio to crypto engine to encrypt or decrypt,

[dm-devel] [RFC v3 3/4] md: dm-crypt: Introduce the bulk mode method when sending request

2016-05-31 Thread Baolin Wang
In now dm-crypt code, it is ineffective to map one segment (always one sector) of one bio with just only one scatterlist at one time for hardware crypto engine. Especially for some encryption mode (like ecb or xts mode) cooperating with the crypto engine, they just need one initial IV or null IV

Re: [dm-devel] [PATCH] dm-log-writes: fix bug with too large bios

2016-05-31 Thread James Johnston
Hi Mikulas, > bio_alloc can allocate a bio with at most BIO_MAX_PAGES (256) vector > entries. However, the incoming bio may have more vector entries if it was > allocated by other means. For example, bcache submits bios with more than > BIO_MAX_PAGES entries. This results in bio_alloc failure. >

[dm-devel] [PATCH 5/7] multipath: validate devmap names

2016-05-31 Thread Benjamin Marzinski
Any device identifier given to multipath that isn't either a block device or a major:minor id is assumed to be a multipath alias. This can cause some confusing messages if the user accidentally enters something that is clearly a pathname, but isn't a block device. Since multipath device aliases

[dm-devel] [PATCH 6/7] libmultipath: add Huawei Storage default config

2016-05-31 Thread Benjamin Marzinski
Add a default device config for the Huawei XSG1 arrary. This config comes from Huawei. Signed-off-by: Benjamin Marzinski --- libmultipath/hwtable.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libmultipath/hwtable.c b/libmultipath/hwtable.c index

[dm-devel] [PATCH 4/7] kpartx.rules: respect skip_kpartx flag

2016-05-31 Thread Benjamin Marzinski
Check if DM_SUBSYSTEM_UDEV_FLAG1 is set, and if so, don't run kpartx. If the event was not generated by device-mapper, just use the existing value of DM_SUBSYSTEM_UDEV_FLAG1. Signed-off-by: Benjamin Marzinski --- kpartx/kpartx.rules | 2 ++ 1 file changed, 2 insertions(+)

[dm-devel] [PATCH 3/7] libmultipath: add skip_kpartx option

2016-05-31 Thread Benjamin Marzinski
This option gives multipath the ability to stop kpartx from running. The previous idea, the "no_partitions" feature, was not accepted in the upstream kernel. This method uses one of the dm cookie subsystem flags DM_SUBSYSTEM_UDEV_FLAG1, which can be checked by udev to skip running kpartx when

[dm-devel] [PATCH 0/7] multpath patch sync

2016-05-31 Thread Benjamin Marzinski
This series is a resend of my previous "handler fixes" patch, along with some bug fixes, a new default configuration, and a new attempt to make multipath able to skip kpartx handling on devices. Benjamin Marzinski (7): multipathd: handler fixes libmultipath: remove calls to dm_udev_complete

Re: [dm-devel] multipathd: Add 'sysfs' prioritizer

2016-05-31 Thread Sebastian Herbszt
Hannes Reinecke wrote: > Recent kernels have an 'access_state' attribute which allows > us to read the asymmetric access state directly from sysfs. > > Signed-off-by: Hannes Reinecke > --- > libmultipath/discovery.c | 33 + >