Only virtio_blk and xen-blkfront set the revalidate argument to true,
and both do not implement the ->revalidate_disk method. So switch
to the helper that just updates the size instead.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 7 +++
include/linux/genhd.h | 4 ++--
2 fil
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On Thu, 2020-09-03 at 00:40 +0800, Coly Li wrote:
> On 2020/9/3 00:04, Mike Snitzer wrote:
> > 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
> > __generic_fsdax_supported()") switched from pr_debug() to pr_info().
> >
> > The justification in the commit header is really inade
Satya Tangirala wrote:
>On Tue, Sep 01, 2020 at 10:15:11PM -0700, Eric Biggers wrote:
>> From: Eric Biggers
>>
>> Callers of bio_clone_fast() may use a gfp_mask that excludes
>> GFP_DIRECT_RECLAIM. For example, map_request() uses GFP_ATOMIC.
>>
>> If this were to happen, the mempool_alloc() i
On Tue, Sep 1, 2020 at 9:00 AM Christoph Hellwig wrote:
>
> Remove the now unused helper.
>
> Signed-off-by: Christoph Hellwig
Acked-by: Song Liu
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
On Tue, Sep 1, 2020 at 9:00 AM Christoph Hellwig wrote:
>
[...]
> drivers/md/md-cluster.c | 6 ++---
> drivers/md/md-linear.c| 2 +-
> drivers/md/md.c | 10 -
For md bits:
Acked-by: Song Liu
[...]
>
> +/**
> + * revalidate_disk_size - checks for disk size
bd_contains is never NULL for an open block device. In addition ibd_bd
is always set to a block device that was exclusively opened by the
target code, so the holder is guranteed to be ib_dev as well.
Signed-off-by: Christoph Hellwig
---
drivers/target/target_core_iblock.c | 5 ++---
1 file chan
No need to go through the hd_struct to find the partition number.
Signed-off-by: Christoph Hellwig
---
block/genhd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/genhd.c b/block/genhd.c
index 081f1039d9367f..771aa56b1a8c3d 100644
--- a/block/genhd.c
+++ b/block/genhd
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
---
drivers/md/md.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 9562ef598ae1f4..3f33562d10d
bd_disk is set on all block devices, including those for partitions.
Signed-off-by: Christoph Hellwig
---
drivers/md/md.c | 2 +-
drivers/md/md.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 3f33562d10d6f5..5a0fd93769a70e 100644
-
bd_contains is an implementation detail and should not be mentioned in
a userspace API documentation.
Signed-off-by: Christoph Hellwig
---
Documentation/userspace-api/ioctl/hdio.rst | 24 +++---
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Documentation/userspa
bd_disk is set on all block devices, including those for partitions.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_receiver.c | 2 +-
drivers/block/drbd/drbd_worker.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_receiver.c
b/dri
The ->bd_contains field is set by __blkdev_get and drivers have no
business manipulating it.
Signed-off-by: Christoph Hellwig
---
drivers/block/drbd/drbd_main.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/block/drbd/drbd_main.c b/drivers/block/drbd/drbd_main.c
index 04b6bde9419d
No need to go through the hd_struct to find the partition number.
Signed-off-by: Christoph Hellwig
---
lib/vsprintf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/lib/vsprintf.c b/lib/vsprintf.c
index afb9521ddf9197..14c9a6af1b239a 100644
--- a/lib/vsprintf.c
+++ b/lib
Add a littler helper to make the somewhat arcane bd_contains checks a
little more obvious.
Signed-off-by: Christoph Hellwig
---
block/blk-lib.c | 2 +-
block/ioctl.c | 4 ++--
block/scsi_ioctl.c | 2 +-
drivers/ide/ide-ioctls.c| 4 ++--
driv
Hi Jens,
this series add a new helepr to check if a struct block_device represents
a parition, and removes most direct access to ->bd_contained from
drivers.
Diffstat:
Documentation/userspace-api/ioctl/hdio.rst | 24
block/blk-lib.c|2 +-
On 2020/9/3 00:51, Mike Snitzer wrote:
> On Wed, Sep 02 2020 at 12:46pm -0400,
> Coly Li wrote:
>
>> On 2020/9/3 00:44, Mike Snitzer wrote:
>>> On Wed, Sep 02 2020 at 12:40pm -0400,
>>> Coly Li wrote:
>>>
On 2020/9/3 00:04, Mike Snitzer wrote:
> 5.9 commit 231609785cbfb ("dax: print err
On 2020/9/3 07:05, Verma, Vishal L wrote:
> On Thu, 2020-09-03 at 00:40 +0800, Coly Li wrote:
>> On 2020/9/3 00:04, Mike Snitzer wrote:
>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info().
>>>
>>> The justif
The pull request you sent on Wed, 2 Sep 2020 14:02:48 -0400:
> git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
> tags/for-5.9/dm-fixes
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/c3a1309564d3834bad6547a50e58bd195ee85fb6
Thank you!
--
Dee
Hi Linus,
The following changes since commit f75aef392f869018f78cfedf3c320a6b3fcfda6b:
Linux 5.9-rc3 (2020-08-30 16:01:54 -0700)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git
tags/for-5.9/dm-fixes
for you to fetch changes
On 2020/9/3 00:51, Mike Snitzer wrote:
> On Wed, Sep 02 2020 at 12:46pm -0400,
> Coly Li wrote:
>
>> On 2020/9/3 00:44, Mike Snitzer wrote:
>>> On Wed, Sep 02 2020 at 12:40pm -0400,
>>> Coly Li wrote:
>>>
On 2020/9/3 00:04, Mike Snitzer wrote:
> 5.9 commit 231609785cbfb ("dax: print err
On Wed, Sep 02 2020 at 12:46pm -0400,
Coly Li wrote:
> On 2020/9/3 00:44, Mike Snitzer wrote:
> > On Wed, Sep 02 2020 at 12:40pm -0400,
> > Coly Li wrote:
> >
> >> On 2020/9/3 00:04, Mike Snitzer wrote:
> >>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
> >>> __generic_fs
On 2020/9/3 00:44, Mike Snitzer wrote:
> On Wed, Sep 02 2020 at 12:40pm -0400,
> Coly Li wrote:
>
>> On 2020/9/3 00:04, Mike Snitzer wrote:
>>> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
>>> __generic_fsdax_supported()") switched from pr_debug() to pr_info().
>>>
>>> The
On Wed, Sep 02 2020 at 12:40pm -0400,
Coly Li wrote:
> On 2020/9/3 00:04, Mike Snitzer wrote:
> > 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
> > __generic_fsdax_supported()") switched from pr_debug() to pr_info().
> >
> > The justification in the commit header is really
On 2020/9/3 00:04, Mike Snitzer wrote:
> 5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
> __generic_fsdax_supported()") switched from pr_debug() to pr_info().
>
> The justification in the commit header is really inadequate. If there
> is a problem that you need to drill in on
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 shouldn't really mess with the readahead size, as that is a VM
> > > concept.
5.9 commit 231609785cbfb ("dax: print error message by pr_info() in
__generic_fsdax_supported()") switched from pr_debug() to pr_info().
The justification in the commit header is really inadequate. If there
is a problem that you need to drill in on, repeat the testing after
enabling the dynamic d
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 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 fro
On 9/1/20 9:57 AM, Christoph Hellwig wrote:
> Hi Jens,
>
> this series removes the revalidate_disk() function, which has been a
> really odd duck in the last years. The prime reason why most people
> use it is because it propagates a size change from the gendisk to
> the block_device structure.
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 f20c902c..ccf0024e 100644
--- a/mpathpers
The return values of dm_get_map, disassemble_map,dm_get_status
and disassemble_status in check_usable_paths were not checked.
Use update_multipath_table/status to instead of them.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
multipath/main.c | 9 +++--
The return values of dm_get_map, disassemble_map in get_mpvec
were not checked. Use update_multipath_table/status to instead
of them.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmpathpersist/mpath_persist.c | 11 +++
1 file changed, 3 insertio
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
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
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
In tests/util.c, we should use assert_non_null to ensure
malloc() returns non-null pointer in both test_strlcpy_5
and test_strlcpy_6 func.
Signed-off-by: Zhiqiang Liu
Signed-off-by: lixiaokeng
Signed-off-by: Linfeilong
---
tests/util.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/test
In assemble_map func, if add_feature fails and mp->features is
default value (NULL), STRDUP(mp->features) will cause a seg-fault.
In addition, f = STRDUP(mp->features) is just used for APPEND().
We can directly pass mp->features to APPEND().
Here, we firstly check whether mp->features is null.
Si
In merge_words func, if REALLOC() fails, the input *dst will
be freed. If so, mpp->hwhandler| mpp->features|mpp->selector
may be set to NULL after calling merge_words func in
disassemble_map func. This may cause accessing freed memory
problem.
Here, we donot free *dst if REALLOC() fails in merge_w
In sysfs_check_holders func, table_name is obtained by calling
dm_mapname func, and then call dm_reassign_table for reassigning
table. However, we donnot check whether dm_mapname func returns
NULL, and then it may cause a segmentation fault in dm_task_set_name.
Here, we will check whether dm_mapna
In main func of kpartx.c, we should check return value of
malloc before using it.
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
---
kpartx/kpartx.c | 4
1 file changed, 4 insertions(+)
diff --git a/kpartx/kpartx.c b/kpartx/kpartx.c
index 98f6176e..2f6dea7c 100644
--- a/kpartx/kpar
In cli_getprkey func, we use MALLOC instead of malloc, and check
the return value of MALLOC.
Signed-off-by: Zhiqiang Liu
Signed-off-by: Lixiaokeng
Signed-off-by: Linfeilong
---
multipathd/cli_handlers.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/multipathd/cli_han
In dm_mapname, dm_task_get_name(dmt) has been called and the return value
has been stored in map. Use map instead of second dm_task_get_name.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/devmapper.c | 2 +-
1 file changed, 1 insertion(+), 1
In mpath_pr_event_handler_fn, we use MALLOC instead of malloc, and check
the return value of MALLOC.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
multipathd/main.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/multipathd/mai
We check the return value of malloc in print_foreign_topology.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
libmultipath/foreign.c | 4
1 file changed, 4 insertions(+)
diff --git a/libmultipath/foreign.c b/libmultipath/foreign.c
index e8f61351..44f3
If dm_get_major_minor failed, log with major and minor should not
be printed to avoid major and minor used before initialization.
Signed-off-by: Lixiaokeng
Signed-off-by: Zhiqiang Liu
Signed-off-by: Linfeilong
---
multipathd/cli_handlers.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletion
49 matches
Mail list logo