Dear Johannes,
Thank you for your patches.
Am 31.05.23 um 06:58 schrieb Song Liu:
On Tue, May 30, 2023 at 9:25 PM Christoph Hellwig wrote:
To me these look like __bio_add_page candidates, but I guess Song
preferred it this way? It'll add a bit pointless boilerplate code,
but I'm ok with
On Thu, Jun 01, 2023 at 06:20:21AM +0200, Christoph Hellwig wrote:
> On Thu, Jun 01, 2023 at 08:36:59AM +1000, Dave Chinner wrote:
> > We lose adjacent page merging with this change.
>
> This is only used for adding the first folio to a brand new bio,
> so there is nothing to merge with yet at
On Thu, Jun 01, 2023 at 08:36:59AM +1000, Dave Chinner wrote:
> We lose adjacent page merging with this change.
This is only used for adding the first folio to a brand new bio,
so there is nothing to merge with yet at this point.
--
dm-devel mailing list
dm-devel@redhat.com
On Wed, May 31, 2023 at 04:50:42AM -0700, Johannes Thumshirn wrote:
> When the iomap buffered-io code can't add a folio to a bio, it allocates a
> new bio and adds the folio to that one. This is done using bio_add_folio(),
> but doesn't check for errors.
>
> As adding a folio to a newly created
On Thu, May 18 2023 at 6:33P -0400,
Sarthak Kukreti wrote:
> Only call truncate_bdev_range() if the fallocate mode is
> supported. This fixes a bug where data in the pagecache
> could be invalidated if the fallocate() was called on the
> block device with an invalid mode.
>
> Fixes:
On Wed, 2023-05-24 at 18:21 -0500, Benjamin Marzinski wrote:
> need_switch_pathgroup() only checks if the currently used pathgroup
> is
> not the highest priority pathgroup. If it isn't, all multipathd does
> is
> instruct the kernel to switch to the correct pathgroup. However, the
> kernel
On Wed, 2023-05-24 at 18:21 -0500, Benjamin Marzinski wrote:
> When need_switch_pathgroup() is called by deferred_failback_tick(),
> there is a chance that mpp->paths will be NULL, even if there are
> paths
> in the multipath device's pathgroups. Instead check if there are
> multiple pathgroups,
On Wed, 2023-05-24 at 18:21 -0500, Benjamin Marzinski wrote:
> For multipath devices with path group policies other than
> group_by_prio,
> multipathd wasn't updating all the paths' priorities when calling
> need_switch_pathgroup(), even in cases where it likely was necessary.
> When a path just
On Wed, 2023-05-24 at 18:21 -0500, Benjamin Marzinski wrote:
> Make sure that pathgroups that include paths with a prio_UNDEF
> priority
> are properly sorted.
>
> Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
> ---
> tests/pgpolicy.c | 42
On Wed, 2023-05-24 at 18:21 -0500, Benjamin Marzinski wrote:
> When multipath is not set to group_by_prio, different paths in a
> pathgroup can have different priorities. If there is a problem
> getting
> the priority of an active path, its priority will be set to
> PRIO_UNDEF.
> This will change
On Wed, 2023-05-31 at 15:57 +0200, Xose Vazquez Perez wrote:
> ALUA is needed by Hitachi Global-Active Device (GAD):
> https://knowledge.hitachivantara.com/Documents/Management_Software/SVOS/8.1/Global-Active_Device/Overview_of_global-active_device
Thanks, but where exactly did you find this
On Fri, 2023-05-19 at 18:02 -0500, Benjamin Marzinski wrote:
> This patchset is adds a new path grouping policy that can be used
> with
> ALUA devices. The goal is to avoid the temporary incorrect path
> groupings that can happen when paths change priorities.
>
Thanks a lot for doing this. It
On Wed, 31 May 2023 04:50:23 -0700, Johannes Thumshirn wrote:
> We have two functions for adding a page to a bio, __bio_add_page() which is
> used to add a single page to a freshly created bio and bio_add_page() which is
> used to add a page to an existing bio.
>
> While __bio_add_page() is
On Fri, 2023-05-19 at 18:02 -0500, Benjamin Marzinski wrote:
> This allows configuations to use "group_by_tpg" if alua is
> autodetected
> and another policy if it isn't, so they can work with detect_prio.
This is a bit confusing. We might have introduced this kind of
autodetection without
On Fri, 2023-05-19 at 18:02 -0500, Benjamin Marzinski wrote:
> Signed-off-by: Benjamin Marzinski
I wonder if it might make sense for group_by_tpg to mock calls to
getprio (assigning the prio from the path's TPG ID) rather than calling
set_priority() directly.
> ---
> tests/pgpolicy.c | 201
>
On Fri, 2023-05-19 at 18:02 -0500, Benjamin Marzinski wrote:
> copying the value into a passed in buffer doesn't help any of the
> callers of this function. It's just wasted work.
>
> Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
> ---
> libmultipath/dict.c | 6 +-
>
On Fri, 2023-05-19 at 18:02 -0500, Benjamin Marzinski wrote:
> When we group paths by prio and the priority changes, paths can end
> up
> temporarily in the wrong path groups. This usually happens when some
> paths are down, so their priority can't be updated. To avoid this for
> ALUA paths,
On Fri, 2023-05-19 at 18:02 -0500, Benjamin Marzinski wrote:
> Make it possible to easily check a path's target port group.
>
> Signed-off-by: Benjamin Marzinski
Reviewed-by: Martin Wilck
> ---
> libmultipath/print.c | 9 +
> 1 file changed, 9 insertions(+)
>
> diff --git
Remove all unused defines, and just use the expanded versions for
the SCSI disk majors.
I've decided to keep Root_RAM0 even if it could be expanded as there
is a lot of special casing for it in the init code.
Signed-off-by: Christoph Hellwig
---
arch/alpha/kernel/setup.c | 2 +-
Instead of declaring root_device_name as a global variable pass it as an
argument to the functions using it.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c| 29 -
init/do_mounts.h| 14 +++---
init/do_mounts_initrd.c | 11 ++-
3
bool is the most sensible return value for a yes/no return. Also
add __init as this funtion is only called from the early boot code.
Signed-off-by: Christoph Hellwig
Acked-by: Greg Kroah-Hartman
---
drivers/base/dd.c | 6 ++
include/linux/device/driver.h | 2 +-
Split the logic to find the resume device out software_resume and into
a separate helper to start unwindig the convoluted goto logic.
Signed-off-by: Christoph Hellwig
Acked-by: Rafael J. Wysocki
---
kernel/power/hibernate.c | 72 +---
1 file changed, 37
mount_block_root is also used to mount non-block file systems, so give
it a better name.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c| 6 +++---
init/do_mounts.h| 2 +-
init/do_mounts_initrd.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git
software_resume can be called either from an init call in the boot code,
or from sysfs once the system has finished booting, and the two
invocation methods this can't race with each other.
For the latter case we did just parse the suspend device manually, while
the former might not have one.
ALUA is needed by Hitachi Global-Active Device (GAD):
https://knowledge.hitachivantara.com/Documents/Management_Software/SVOS/8.1/Global-Active_Device/Overview_of_global-active_device
Cc: Matthias Rudolph
Cc: Martin Wilck
Cc: Benjamin Marzinski
Cc: Christophe Varoqui
Cc: DM-DEVEL ML
Provide stubs for all the lower level mount helpers, and just switch
on ROOT_DEV in the main function.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 104 +--
1 file changed, 56 insertions(+), 48 deletions(-)
diff --git a/init/do_mounts.c
The root_wait logic is a bit obsfucated right now. Expand it and move it
into a helper.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 32 ++--
1 file changed, 22 insertions(+), 10 deletions(-)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index
Hi all,
this series tries to sort out accumulated mess around the name_to_dev_t
function. This function is intended to allow looking up the dev_t of a
block device based on a name string before the root file systems is
mounted and thus the normal path based lookup is available.
Unfortunately a
Passing call dependent variable in global variables is a huge
antipattern. Fix it up.
Signed-off-by: Christoph Hellwig
Acked-by: Rafael J. Wysocki
---
kernel/power/hibernate.c | 17 ++---
kernel/power/power.h | 3 +--
kernel/power/swap.c | 2 +-
3 files changed, 8
Remove the code that drops the /dev/ prefix from root_device_name, which
is only used for error messages when mounting the root device fails.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 17 ++---
1 file changed, 6 insertions(+), 11 deletions(-)
diff --git
Use the block_device acquired in dm_get_device for the check instead
of doing an extra lookup.
Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Snitzer
---
drivers/md/dm-snap.c | 14 +-
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/drivers/md/dm-snap.c
early_lookup_bdev is supposed to only be called from the early boot
code, but dm_get_device calls it as a general fallback when lookup_bdev
fails, which is problematic because early_lookup_bdev bypasses all normal
path based permission checking, and might cause problems with certain
container
Instead of only clearing root_wait in devt_from_partuuid when the UUID
format was invalid, do that in parse_root_device for all strings that
failed to parse.
Signed-off-by: Christoph Hellwig
---
init/do_mounts.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
diff
dm_init_init is called from early boot code, and thus lookup_bdev
will never succeed. Just open code that call to early_lookup_bdev
instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Mike Snitzer
---
drivers/md/dm-init.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
early_lookup_bdev is supposed to only be called from the early boot
code, but mdtblock_early_get_bdev is called as a general fallback when
lookup_bdev fails, which is problematic because early_lookup_bdev
bypasses all normal path based permission checking, and might cause
problems with certain
Simplify add_device a bit by splitting out the cumbersome early boot logic
into a separate helper.
Signed-off-by: Christoph Hellwig
Reviewed-by: Miquel Raynal
---
drivers/mtd/devices/block2mtd.c | 53 +++--
1 file changed, 30 insertions(+), 23 deletions(-)
diff
On Tue, May 30, 2023 at 04:31:00PM -0400, Demi Marie Obenour wrote:
> This work aims to allow userspace to create and destroy block devices
> in a race-free way, and to allow them to be exposed to other Xen VMs via
> blkback without races.
>
> Changes since v1:
>
> - Several device-mapper fixes
The nfs/cifs/ram special case only needs to be parsed once, and only in
the boot code. Move them out of name_to_dev_t and into
prepare_namespace.
Signed-off-by: Christoph Hellwig
---
Documentation/admin-guide/kernel-parameters.txt | 7 ++-
init/do_mounts.c|
early_lookup_bdev is now only used during the early boot code as it
should, so mark it __init to not waste run time memory on it.
Signed-off-by: Christoph Hellwig
---
block/early-lookup.c | 19 +--
include/linux/blkdev.h | 2 +-
2 files changed, 10 insertions(+), 11
Create a new block/early-lookup.c to keep the early block device lookup
code instead of having this code sit with the early mount code.
Signed-off-by: Christoph Hellwig
---
.../admin-guide/kernel-parameters.txt | 4 +-
block/Makefile| 2 +-
Open code dm_get_dev_t in the only remaining caller, and propagate the
exact error code from lookup_bdev and early_lookup_bdev.
Signed-off-by: Christoph Hellwig
---
drivers/md/dm-table.c | 22 +-
include/linux/device-mapper.h | 2 --
2 files changed, 5
Assign a Root_Generic magic value for UBI/MTD root and handle the root
mounting in mount_root like all other root types. Besides making the
code more clear this also means that UBI/MTD root can be used together
with an initrd (not that anyone should care).
Also factor parsing of the root name
Looks good:
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
resume_store is a sysfs attribute written during normal kernel runtime,
and it should not use the early_lookup_bdev API that bypasses all normal
path based permission checking, and might cause problems with certain
container environments renaming devices.
Switch to lookup_bdev, which does a
name_to_dev_t has a very misleading name, that doesn't make clear
it should only be used by the early init code, and also has a bad
calling convention that doesn't allow returning different kinds of
errors. Rename it to early_lookup_bdev to make the use case clear,
and return an errno, where
blk_lookup_devt is only used by code in early-lookup.c, so move it
there.
printk_all_partitions and it's helper bdevt_str are only used by the
early init code in init/do_mounts.c, so they should go there as well.
Signed-off-by: Christoph Hellwig
---
block/early-lookup.c | 92
Looks good:
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Looks good:
Reviewed-by: Christoph Hellwig
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
The sync request code uses bio_add_page() to add a page to a newly created bio.
bio_add_page() can fail, but the return value is never checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking bio_add_page() as
The floppy code uses bio_add_page() to add a page to a newly created bio.
bio_add_page() can fail, but the return value is never checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking bio_add_page() as
The zonefs superblock reading code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is
never checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking
The raid5 log metadata submission code uses bio_add_page() to add a page
to a newly created bio. bio_add_page() can fail, but the return value is
never checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking
Now that all callers of bio_add_folio() check the return value, mark it as
__must_check.
Reviewed-by: Matthew Wilcox (Oracle)
Signed-off-by: Johannes Thumshirn
---
include/linux/bio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/bio.h
Just like for bio_add_pages() add a no-fail variant for bio_add_folio().
Reviewed-by: Matthew Wilcox (Oracle)
Signed-off-by: Johannes Thumshirn
---
block/bio.c | 8
include/linux/bio.h | 2 ++
2 files changed, 10 insertions(+)
diff --git a/block/bio.c b/block/bio.c
index
alloc_behind_master_bio() can possibly add multiple pages to a bio, but it
is not checking for the return value of bio_add_page() if adding really
succeeded.
Check if the page adding succeeded and if not bail out.
Reviewed-by: Christoph Hellwig
Acked-by: Song Liu
Reviewed-by: Damien Le Moal
The zram writeback code uses bio_add_page() to add a page to a newly
created bio. bio_add_page() can fail, but the return value is never
checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking bio_add_page()
Now that all users of bio_add_page check for the return value, mark
bio_add_page as __must_check.
Reviewed-by: Damien Le Moal
Signed-off-by: Johannes Thumshirn
---
include/linux/bio.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/include/linux/bio.h
The GFS2 superblock reading code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is never
checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking
Check if adding pages to resync bio fails and if bail out.
As the comment above suggests this cannot happen, WARN if it actually
happens. Technically __bio_add_pages() would be sufficient here, but
asserting the pages actually get added to the bio is preferred.
This way we can mark bio_add_pages
Oops I've accidentally re-send v6 instead of v7.
My apologies.
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
The swap code only adds a single page to a newly created bio. So use
__bio_add_page() to add the page which is guaranteed to succeed in this
case.
This brings us closer to marking bio_add_page() as __must_check.
Reviewed-by: Damien Le Moal
Reviewed-by: Christoph Hellwig
Signed-off-by: Johannes
We have two functions for adding a page to a bio, __bio_add_page() which is
used to add a single page to a freshly created bio and bio_add_page() which is
used to add a page to an existing bio.
While __bio_add_page() is expected to succeed, bio_add_page() can fail.
This series converts the
The raid5-ppl submission code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is never
checked. For adding consecutive pages, the return is actually checked and
a new bio is allocated if adding the page fails.
Use __bio_add_page() as adding
dm-zoned uses bio_add_page() for adding a single page to a freshly created
metadata bio.
Use __bio_add_page() instead as adding a single page to a new bio is
always guaranteed to succeed.
This brings us a step closer to marking bio_add_page() __must_check
Reviewed-by: Damien Le Moal
crypt_alloc_buffer() already allocates enough entries in the clone bio's
vector, so adding a page to the bio can't fail. Use __bio_add_page() to
reflect this.
Signed-off-by: Johannes Thumshirn
---
drivers/md/dm-crypt.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
The md-raid superblock writing code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is never
checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking
The JFS IO code uses bio_add_page() to add a page to a newly created bio.
bio_add_page() can fail, but the return value is never checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking bio_add_page() as
The drbd code only adds a single page to a newly created bio. So use
__bio_add_page() to add the page which is guaranteed to succeed in this
case.
This brings us closer to marking bio_add_page() as __must_check.
Reviewed-by: Damien Le Moal
Signed-off-by: Johannes Thumshirn
---
When the iomap buffered-io code can't add a folio to a bio, it allocates a
new bio and adds the folio to that one. This is done using bio_add_folio(),
but doesn't check for errors.
As adding a folio to a newly created bio can't fail, use the newly
introduced bio_add_folio_nofail() function.
The buffer_head submission code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is never
checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
This brings us a step closer to marking
On 5/30/23 23:49, Johannes Thumshirn wrote:
The buffer_head submission code uses bio_add_page() to add a page to a
newly created bio. bio_add_page() can fail, but the return value is never
checked.
Use __bio_add_page() as adding a single page to a newly created bio is
guaranteed to succeed.
71 matches
Mail list logo