Re: [dm-devel] [PATCH V4 11/14] mpathpersist: check whether malloc paramp->trnptid_list fails in handle_args func

2020-09-10 Thread Martin Wilck
Hi Lixiaokeng, On Fri, 2020-09-11 at 09:34 +0800, lixiaokeng wrote: > > Hi Martin, > When I compile it, I add a patch thats changes int to unsigned int. > But I don't think it is an error. It is just a warning and becomes > an > error with [-Werror]. Anyway, What do you think, why did we add

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Joe Perches
On Thu, 2020-09-10 at 15:21 +0100, Robin Murphy wrote: > On 2020-09-09 21:06, Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > > > Convert pseudo-keyword fallthrough; statements to a simple break; when > > the next label is case or default and the

Re: [dm-devel] [PATCH V4 11/14] mpathpersist: check whether malloc paramp->trnptid_list fails in handle_args func

2020-09-10 Thread lixiaokeng
On 2020/9/11 2:48, Martin Wilck wrote: > On Thu, 2020-09-10 at 18:52 +0800, lixiaokeng wrote: >> In handle_args func, we donot check whether malloc paramp and >> each paramp->trnptid_list[j] fails before using them, it may >> cause access NULL pointer. >> >> Here, we add alloc_prout_param_descrip

Re: [dm-devel] [PATCH] dax: fix for do not print error message for non-persistent memory block device

2020-09-10 Thread Coly Li
On 2020/9/11 04:29, John Pittman wrote: > But it should be moved prior to the two bdev_dax_pgoff() checks right? > Else a misaligned partition on a dax unsupported block device can > print the below messages. > > kernel: sda1: error: unaligned partition for dax > kernel: sda2: error: unaligned pa

Re: [dm-devel] [PATCH] dax: fix for do not print error message for non-persistent memory block device

2020-09-10 Thread John Pittman
But it should be moved prior to the two bdev_dax_pgoff() checks right? Else a misaligned partition on a dax unsupported block device can print the below messages. kernel: sda1: error: unaligned partition for dax kernel: sda2: error: unaligned partition for dax kernel: sda3: error: unaligned parti

[dm-devel] [PATCH v2] libmultipath: setup_map(): don't break multipath attributes

2020-09-10 Thread mwilck
From: Martin Wilck setup_map() is called both for new maps (e.g. from coalesce_paths()) and existing maps (e.g. from reload_map(), resize_map()). In the former case, the map will be removed from global data structures, so incomplete initialization is not an issue. But In the latter case, removal

[dm-devel] [PATCH] libmultipath: setup_map(): don't break multipath attributes

2020-09-10 Thread mwilck
From: Martin Wilck setup_map() is called both for new maps (e.g. from coalesce_paths()) and existing maps (e.g. from reload_map(), resize_map()). In the former case, the map will be removed from global data structures, so incomplete initialization is not an issue. But In the latter case, removal

Re: [dm-devel] [PATCH V4 09/14] libmultipath: check whether mpp->features is NUll in setup_map

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:51 +0800, lixiaokeng wrote: > In assemble_map func, f = STRDUP(mp->features) is just used > for APPEND(). We can directly pass mp->features to APPEND(). > The mpp->features, hwhandler and selector got form strdup > should be check after select* function. > > Signed-off-by:

Re: [dm-devel] [PATCH V4 09/14] libmultipath: check whether mpp->features is NUll in setup_map

2020-09-10 Thread Benjamin Marzinski
On Thu, Sep 10, 2020 at 06:48:56PM +0200, Martin Wilck wrote: > On Thu, 2020-09-10 at 18:51 +0800, lixiaokeng wrote: > > In assemble_map func, f = STRDUP(mp->features) is just used > > for APPEND(). We can directly pass mp->features to APPEND(). > > The mpp->features, hwhandler and selector got for

Re: [dm-devel] [PATCH V4 14/14] multipathpersist: delete unused variable in handle_args

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:54 +0800, lixiaokeng wrote: > In handle_args, the tmp isn't used. We delete it. > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Liu > Signed-off-by: Linfeilong Reviewed-by: Martin Wilck > --- > mpathpersist/main.c | 1 - > 1 file changed, 1 deletion(-) > >

Re: [dm-devel] [PATCH V4 11/14] mpathpersist: check whether malloc paramp->trnptid_list fails in handle_args func

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:52 +0800, lixiaokeng wrote: > In handle_args func, we donot check whether malloc paramp and > each paramp->trnptid_list[j] fails before using them, it may > cause access NULL pointer. > > Here, we add alloc_prout_param_descriptor to allocate and init > paramp, and we add f

Re: [dm-devel] [PATCH V4 12/14] libmultipathpersist: use update_multipath_table/status, in get_mpvec

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:53 +0800, lixiaokeng wrote: > The return values of dm_get_map, disassemble_map in get_mpvec > were not checked. Use update_multipath_table/status to instead > of them. If these function fail, call remove_map > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Liu > S

Re: [dm-devel] [PATCH V4 11/14] mpathpersist: check whether malloc paramp->trnptid_list fails in handle_args func

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:52 +0800, lixiaokeng wrote: > In handle_args func, we donot check whether malloc paramp and > each paramp->trnptid_list[j] fails before using them, it may > cause access NULL pointer. > > Here, we add alloc_prout_param_descriptor to allocate and init > paramp, and we add f

Re: [dm-devel] [PATCH 06/14] block: lift setting the readahead size into the block layer

2020-09-10 Thread Mike Snitzer
On Thu, Sep 10 2020 at 5:28am -0400, Christoph Hellwig wrote: > On Wed, Sep 02, 2020 at 12:20:07PM -0400, Mike Snitzer wrote: > > On Wed, Sep 02 2020 at 11:11am -0400, > > Christoph Hellwig wrote: > > > > > On Wed, Aug 26, 2020 at 06:07:38PM -0400, Mike Snitzer wrote: > > > > On Sun, Jul 26 20

Re: [dm-devel] [PATCH V4 09/14] libmultipath: check whether mpp->features is NUll in setup_map

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:51 +0800, lixiaokeng wrote: > In assemble_map func, f = STRDUP(mp->features) is just used > for APPEND(). We can directly pass mp->features to APPEND(). > The mpp->features, hwhandler and selector got form strdup > should be check after select* function. > > Signed-off-by:

Re: [dm-devel] [PATCH V4 06/14] kpartx: use xmalloc to instead of malloc in main func

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:50 +0800, lixiaokeng wrote: > In main func of kpartx.c, we should check return value of > malloc before using it. So we use xmalloc to instead of > malloc. > > Signed-off-by: Zhiqiang Liu > Signed-off-by: Lixiaokeng Reviewed-by: Martin Wilck -- dm-devel mailing list

Re: [dm-devel] [PATCH V4 05/14] multipathd: check return value of malloc in cli_getprkey func

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:49 +0800, lixiaokeng wrote: > In cli_getprkey func, we check the return value of malloc. > > Signed-off-by: Zhiqiang Liu > Signed-off-by: Lixiaokeng > Signed-off-by: Linfeilong Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com https://www.redhat

Re: [dm-devel] [PATCH V4 01/14] multipathd: initialize major and minor in cli_add_map

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:46 +0800, lixiaokeng wrote: > If dm_get_major_minor failed, log with major and minor should not > be printed to avoid major and minor used before initialization. > > Here, we set major and minor to -1 at begining > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Li

Re: [dm-devel] [PATCH V4 02/14] libmultipath: change malloc to calloc in print_foreign_topology

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:47 +0800, lixiaokeng wrote: > We chanege malloc to calloc. > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Liu > Signed-off-by: Linfeilong Reviewed-by: Martin Wilck -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH V4 04/14] multipathd: check MALLOC return value in mpath_pr_event_handler_fn

2020-09-10 Thread Martin Wilck
On Thu, 2020-09-10 at 18:48 +0800, lixiaokeng wrote: > In mpath_pr_event_handler_fn, we use MALLOC instead of malloc, and > check > the return value of MALLOC. And we delete seting ret when jump to out > > Signed-off-by: Lixiaokeng > Signed-off-by: Zhiqiang Liu > Signed-off-by: Linfeilong Rev

[dm-devel] [PATCH 05/12] md: update the optimal I/O size on reshape

2020-09-10 Thread Christoph Hellwig
The raid5 and raid10 drivers currently update the read-ahead size, but not the optimal I/O size on reshape. To prepare for deriving the read-ahead size from the optimal I/O size make sure it is updated as well. Signed-off-by: Christoph Hellwig --- drivers/md/raid10.c | 22 ++

[dm-devel] [PATCH 01/12] fs: remove the unused SB_I_MULTIROOT flag

2020-09-10 Thread Christoph Hellwig
The last user of SB_I_MULTIROOT is disappeared with commit f2aedb713c28 ("NFS: Add fs_context support.") Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- fs/namei.c | 4 ++-- include/linux/fs.h | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/

[dm-devel] [PATCH 02/12] drbd: remove dead code in device_to_statistics

2020-09-10 Thread Christoph Hellwig
Ever since the switch to blk-mq, a lower device not used for VM writeback will not be marked congested, so the check will never trigger. Signed-off-by: Christoph Hellwig --- drivers/block/drbd/drbd_nl.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/block/drbd/drbd_nl.c b/drive

[dm-devel] [PATCH 03/12] drbd: remove RB_CONGESTED_REMOTE

2020-09-10 Thread Christoph Hellwig
This case isn't ever used. Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn --- drivers/block/drbd/drbd_req.c | 4 include/linux/drbd.h | 1 - 2 files changed, 5 deletions(-) diff --git a/drivers/block/drbd/drbd_req.c b/drivers/block/drbd/drbd_req.c index 5c975af9

[dm-devel] [PATCH 06/12] block: lift setting the readahead size into the block layer

2020-09-10 Thread Christoph Hellwig
Drivers shouldn't really mess with the readahead size, as that is a VM concept. Instead set it based on the optimal I/O size by lifting the algorithm from the md driver when registering the disk. Also set bdi->io_pages there as well by applying the same scheme based on max_sectors. Signed-off-by

[dm-devel] bdi cleanups v4

2020-09-10 Thread Christoph Hellwig
Hi Jens, this series contains a bunch of different BDI cleanups. The biggest item is to isolate block drivers from the BDI in preparation of changing the lifetime of the block device BDI in a follow up series. Changes since v3: - rebased on the lasted block tree, which has some of the prep

[dm-devel] [PATCH 11/12] bdi: invert BDI_CAP_NO_ACCT_WB

2020-09-10 Thread Christoph Hellwig
Replace BDI_CAP_NO_ACCT_WB with a positive BDI_CAP_WRITEBACK_ACCT to make the checks more obvious. Also remove the pointless bdi_cap_account_writeback wrapper that just obsfucates the check. Signed-off-by: Christoph Hellwig --- fs/fuse/inode.c | 3 ++- include/linux/backing-dev.h |

[dm-devel] [PATCH 10/12] bdi: replace BDI_CAP_STABLE_WRITES with a queue and a sb flag

2020-09-10 Thread Christoph Hellwig
The BDI_CAP_STABLE_WRITES is one of the few bits of information in the backing_dev_info shared between the block drivers and the writeback code. To help untangling the dependency replace it with a queue flag and a superblock flag derived from it. This also helps with the case of e.g. a file system

[dm-devel] [PATCH 12/12] bdi: replace BDI_CAP_NO_{WRITEBACK, ACCT_DIRTY} with a single flag

2020-09-10 Thread Christoph Hellwig
Replace the two negative flags that are always used together with a single positive flag that indicates the writeback capability instead of two related non-capabilities. Also remove the pointless wrappers to just check the flag. Signed-off-by: Christoph Hellwig --- fs/9p/vfs_file.c|

[dm-devel] [PATCH 08/12] bdi: remove BDI_CAP_SYNCHRONOUS_IO

2020-09-10 Thread Christoph Hellwig
BDI_CAP_SYNCHRONOUS_IO is only checked in the swap code, and used to decided if ->rw_page can be used on a block device. Just check up for the method instead. The only complication is that zram needs a second set of block_device_operations as it can switch between modes that actually support ->rw

[dm-devel] [PATCH 09/12] mm: use SWP_SYNCHRONOUS_IO more intelligently

2020-09-10 Thread Christoph Hellwig
There is no point in trying to call bdev_read_page if SWP_SYNCHRONOUS_IO is not set, as the device won't support it. Signed-off-by: Christoph Hellwig --- mm/page_io.c | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index e485a6e

[dm-devel] [PATCH 04/12] bdi: initialize ->ra_pages and ->io_pages in bdi_init

2020-09-10 Thread Christoph Hellwig
Set up a readahead size by default, as very few users have a good reason to change it. Signed-off-by: Christoph Hellwig Acked-by: David Sterba [btrfs] Acked-by: Richard Weinberger [ubifs, mtd] --- block/blk-core.c | 2 -- drivers/mtd/mtdcore.c | 2 ++ fs/9p/vfs_super.c | 6 -- fs/

[dm-devel] [PATCH 07/12] bdi: remove BDI_CAP_CGROUP_WRITEBACK

2020-09-10 Thread Christoph Hellwig
Just checking SB_I_CGROUPWB for cgroup writeback support is enough. Either the file system allocates its own bdi (e.g. btrfs), in which case it is known to support cgroup writeback, or the bdi comes from the block layer, which always supports cgroup writeback. Signed-off-by: Christoph Hellwig Rev

Re: [dm-devel] Revert "dm: always call blk_queue_split() in dm_process_bio()"

2020-09-10 Thread Mike Snitzer
[cc'ing dm-devel and linux-block because this is upstream concern too] On Wed, Sep 09 2020 at 1:00pm -0400, Vijayendra Suman wrote: >Hello Mike, > >While Running pgbench tool with 5.4.17 kernel build > >Following performance degrade is found out > >buffer read/write metric :

[dm-devel] [PATCH 0/3] add support for inline encryption to device mapper

2020-09-10 Thread Satya Tangirala
This patch series adds support for inline encryption to the device mapper. Patch 1 introduces the "passthrough" keyslot manager. The regular keyslot manager is designed for inline encryption hardware that have only a small fixed number of keyslots. A DM device itself does not actually have only a

[dm-devel] [PATCH 1/3] block: keyslot-manager: Introduce passthrough keyslot manager

2020-09-10 Thread Satya Tangirala
The device mapper may map over devices that have inline encryption capabilities, and to make use of those capabilities, the DM device must itself advertise those inline encryption capabilities. One way to do this would be to have the DM device set up a keyslot manager with a "sufficiently large" nu

[dm-devel] [PATCH 3/3] dm: enable may_passthrough_inline_crypto on some targets

2020-09-10 Thread Satya Tangirala
From: Eric Biggers dm-linear and dm-flakey obviously can pass through inline crypto support. dm-zero should declare that it passes through inline crypto support, since any reads from dm-zero should return zeroes, and blk-crypto should not attempt to decrypt data returned from dm-zero. Signed-of

[dm-devel] [PATCH 2/3] dm: add support for passing through inline crypto support

2020-09-10 Thread Satya Tangirala
From: Eric Biggers Update the device-mapper core to support exposing the inline crypto support of the underlying device(s) through the device-mapper device. This works by creating a "passthrough keyslot manager" for the dm device, which declares support for encryption settings which all underlyi

[dm-devel] [PATCH V4 14/14] multipathpersist: delete unused variable in handle_args

2020-09-10 Thread lixiaokeng
In handle_args, the tmp isn't used. We delete it. Signed-off-by: Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- mpathpersist/main.c | 1 - 1 file changed, 1 deletion(-) diff --git a/mpathpersist/main.c b/mpathpersist/main.c index da67c15c..85453ac2 100644 --- a/mpathpers

[dm-devel] [PATCH V4 11/14] mpathpersist: check whether malloc paramp->trnptid_list fails in handle_args func

2020-09-10 Thread lixiaokeng
In handle_args func, we donot check whether malloc paramp and each paramp->trnptid_list[j] fails before using them, it may cause access NULL pointer. Here, we add alloc_prout_param_descriptor to allocate and init paramp, and we add free_prout_param_descriptor to free paramp and each paramp->trnpti

[dm-devel] [PATCH V4 12/14] libmultipathpersist: use update_multipath_table/status, in get_mpvec

2020-09-10 Thread lixiaokeng
The return values of dm_get_map, disassemble_map in get_mpvec were not checked. Use update_multipath_table/status to instead of them. If these function fail, call remove_map Signed-off-by: Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmpathpersist/mpath_persist.c | 15

[dm-devel] [PATCH V4 09/14] libmultipath: check whether mpp->features is NUll in setup_map

2020-09-10 Thread lixiaokeng
In assemble_map func, f = STRDUP(mp->features) is just used for APPEND(). We can directly pass mp->features to APPEND(). The mpp->features, hwhandler and selector got form strdup should be check after select* function. Signed-off-by: Zhiqiang Liu Signed-off-by: Lixiaokeng --- libmultipath/confi

[dm-devel] [PATCH V4 06/14] kpartx: use xmalloc to instead of malloc in main func

2020-09-10 Thread lixiaokeng
In main func of kpartx.c, we should check return value of malloc before using it. So we use xmalloc to instead of malloc. Signed-off-by: Zhiqiang Liu Signed-off-by: Lixiaokeng --- kpartx/kpartx.c | 36 ++-- 1 file changed, 18 insertions(+), 18 deletions(-) diff

[dm-devel] [PATCH V4 04/14] multipathd: check MALLOC return value in mpath_pr_event_handler_fn

2020-09-10 Thread lixiaokeng
In mpath_pr_event_handler_fn, we use MALLOC instead of malloc, and check the return value of MALLOC. And we delete seting ret when jump to out Signed-off-by: Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- multipathd/main.c | 8 1 file changed, 4 insertions(+), 4

[dm-devel] [PATCH V4 05/14] multipathd: check return value of malloc in cli_getprkey func

2020-09-10 Thread lixiaokeng
In cli_getprkey func, we check the return value of malloc. Signed-off-by: Zhiqiang Liu Signed-off-by: Lixiaokeng Signed-off-by: Linfeilong --- multipathd/cli_handlers.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multipathd/cli_handlers.c b/multipathd/cli_handlers.c index e9698704..2

[dm-devel] [PATCH V4 02/14] libmultipath: change malloc to calloc in print_foreign_topology

2020-09-10 Thread lixiaokeng
We chanege malloc to calloc. Signed-off-by: Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- libmultipath/foreign.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libmultipath/foreign.c b/libmultipath/foreign.c index e8f61351..fce19347 100644 --- a/

[dm-devel] [PATCH V4 01/14] multipathd: initialize major and minor in cli_add_map

2020-09-10 Thread lixiaokeng
If dm_get_major_minor failed, log with major and minor should not be printed to avoid major and minor used before initialization. Here, we set major and minor to -1 at begining Signed-off-by: Lixiaokeng Signed-off-by: Zhiqiang Liu Signed-off-by: Linfeilong --- multipathd/cli_handlers.c | 2 +-

[dm-devel] [PATCH V4 00/14] multipath-tools series: some cleanups and fixes checked by codedex tool

2020-09-10 Thread lixiaokeng
Patches 01, 02, 04, 05, 06, 09, 11, 12, 14 have some changes Patches 01, 02, 04, 05, 11, 12, 14: change commit message Patches 06: move xmalloc before main Patches 09: check strdup result in setup_map, add message "mp->features must not be NULL" in assemble_map Zhiqiang Liu (7): multipathd: che

Re: [dm-devel] [PATCH 06/14] block: lift setting the readahead size into the block layer

2020-09-10 Thread Christoph Hellwig
On Wed, Sep 02, 2020 at 12:20:07PM -0400, Mike Snitzer wrote: > On Wed, Sep 02 2020 at 11:11am -0400, > Christoph Hellwig wrote: > > > On Wed, Aug 26, 2020 at 06:07:38PM -0400, Mike Snitzer wrote: > > > On Sun, Jul 26 2020 at 11:03am -0400, > > > Christoph Hellwig wrote: > > > > > > > Drivers s

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Ilya Dryomov
On Wed, Sep 9, 2020 at 10:10 PM Joe Perches wrote: > > fallthrough to a separate case/default label break; isn't very readable. > > Convert pseudo-keyword fallthrough; statements to a simple break; when > the next label is case or default and the only statement in the next > label block is break;

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Keith Busch
On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c > index eea0f453cfb6..8aac5bc60f4c 100644 > --- a/crypto/tcrypt.c > +++ b/crypto/tcrypt.c > @@ -2464,7 +2464,7 @@ static int do_test(const char *alg, u32 type, u32 mask, > int m, u32 num_m

Re: [dm-devel] [PATCH] IMA: Add test for dm-crypt measurement

2020-09-10 Thread Tushar Sugandhi
On 2020-08-31 11:07 p.m., Petr Vorel wrote: Hi Tushar, IMA subsystem supports measuring data from other kernel components through func=CRITICAL_DATA policy 'critical_kernel_data_sources'. This IMA policy can be set to measure the data coming from device-mapper targets. This scenario needs tes

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Jason Gunthorpe
On Wed, Sep 09, 2020 at 01:06:39PM -0700, Joe Perches wrote: > fallthrough to a separate case/default label break; isn't very readable. > > Convert pseudo-keyword fallthrough; statements to a simple break; when > the next label is case or default and the only statement in the next > label block is

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Wolfram Sang
> diff --git a/drivers/i2c/busses/i2c-i801.c b/drivers/i2c/busses/i2c-i801.c > index e32ef3f01fe8..b13b1cbcac29 100644 > --- a/drivers/i2c/busses/i2c-i801.c > +++ b/drivers/i2c/busses/i2c-i801.c > @@ -1785,7 +1785,7 @@ static int i801_probe(struct pci_dev *dev, const struct > pci_device_id *id) >

Re: [dm-devel] [PATCH 4/9] md: don't detour through bd_contains for the gendisk

2020-09-10 Thread Song Liu
On Wed, Sep 2, 2020 at 10:43 PM Christoph Hellwig wrote: > > bd_disk is set on all block devices, including those for partitions. > > Signed-off-by: Christoph Hellwig Acked-by: Song Liu > --- > drivers/md/md.c | 2 +- > drivers/md/md.h | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-

Re: [dm-devel] [PATCH 3/9] md: compare bd_disk instead of bd_contains

2020-09-10 Thread Song Liu
On Wed, Sep 2, 2020 at 10:43 PM Christoph Hellwig wrote: > > To check for partitions of the same disk bd_contains works as well, but > bd_disk is way more obvious. > > Signed-off-by: Christoph Hellwig Acked-by: Song Liu > --- > drivers/md/md.c | 7 +++ > 1 file changed, 3 insertions(+), 4

Re: [dm-devel] [trivial PATCH] treewide: Convert switch/case fallthrough; to break;

2020-09-10 Thread Mauro Carvalho Chehab
Em Wed, 09 Sep 2020 13:06:39 -0700 Joe Perches escreveu: > fallthrough to a separate case/default label break; isn't very readable. > > Convert pseudo-keyword fallthrough; statements to a simple break; when > the next label is case or default and the only statement in the next > label block is b

Re: [dm-devel] [PATCH] IMA: Add test for dm-crypt measurement

2020-09-10 Thread Petr Vorel
Hi Tushar, > > > IMA subsystem supports measuring data from other kernel components > > > through func=CRITICAL_DATA policy 'critical_kernel_data_sources'. > > > This IMA policy can be set to measure the data coming from device-mapper > > > targets. This scenario needs test coverage. > > Thank you