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
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
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
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
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
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
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
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:
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
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(-)
>
>
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
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
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
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
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:
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
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
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
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
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
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 ++
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/
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
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
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
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
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 |
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
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|
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
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
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/
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
[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 :
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
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
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
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
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
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
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
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
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
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
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
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/
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 +-
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
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
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;
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
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
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
> 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)
>
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(-
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
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
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
58 matches
Mail list logo