All of lore.kernel.org
 help / color / mirror / Atom feed
* [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions
@ 2021-02-22 23:10 John Stultz
  2021-02-23  6:31 ` Christoph Hellwig
  0 siblings, 1 reply; 4+ messages in thread
From: John Stultz @ 2021-02-22 23:10 UTC (permalink / raw)
  To: Christoph Hellwig, Tejun Heo, Jens Axboe, David Anderson
  Cc: linux-block, lkml, Todd Kjos, Amit Pundir, Alistair Delva

Hey all,
  After updating to Linus' HEAD today I found my db845c board wouldn't
boot to android with the error below.

I was able to bisect the boot regression down to "block: add a
disk_uevent helper":
  https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=bc359d03c7ec1bf3b86d03bafaf6bbb21e6414fd

And have validated that reverting that change seems to get things working again.

I don't really know the dynamic partition DM details well, so any tips
as to what might be going wrong here would be appreciated!

thanks
-john

[   25.782268] init: [libfs_mgr]Skipping mounting '/dev/block/dm-0'
[   25.788373] init: [libfs_mgr]Failed to open '/dev/block/dm-0': No
such file or directory
[   25.796579] init:
[libfs_mgr]__mount(source=/dev/block/dm-0(missing),target=/system,type=ext4)=-1:
No such file or directory
[   25.807978] init: Failed to mount /system: No such file or directory
[   25.814466] init: Failed to mount required partitions early ...
[   25.820757] init: InitFatalReboot: signal 6
[   25.833635] init: #00 pc 00000000003936a8  /init
(UnwindStackCurrent::UnwindFromContext(unsigned long, void*)+96)
[   25.844001] init: #01 pc 00000000002f1df0  /init
(android::init::InitFatalReboot(int)+208)
[   25.852340] init: #02 pc 00000000002f21d8  /init
(android::init::InstallRebootSignalHandlers()::$_22::__invoke(int)+32)
[   25.863211] init: #03 pc 000000000000053c  [vdso:0000007f97c34000]
[   25.869449] init: #04 pc 000000000045ffb0  /init (abort+176)
[   25.875163] init: #05 pc 00000000002f714c  /init
(android::init::InitAborter(char const*)+44)
[   25.883760] init: #06 pc 000000000034dc98  /init
(android::base::SetAborter(std::__1::function<void (char
const*)>&&)::$_3::__invoke(char const*)+80)
[   25.897241] init: #07 pc 000000000034d840  /init
(android::base::LogMessage::~LogMessage()+360)
[   25.906002] init: #08 pc 00000000002e93a8  /init
(android::init::FirstStageMain(int, char**)+6648)
[   25.915039] init: #09 pc 000000000045ee58  /init
(__real_libc_init(void*, void (*)(), int (*)(int, char**, char**),
structors_array_t const*, bionic_tc)
[   25.929411] init: Reboot ending, jumping to kernel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions
  2021-02-22 23:10 [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions John Stultz
@ 2021-02-23  6:31 ` Christoph Hellwig
  2021-02-23 22:39   ` John Stultz
  2021-02-23 22:41   ` Jens Axboe
  0 siblings, 2 replies; 4+ messages in thread
From: Christoph Hellwig @ 2021-02-23  6:31 UTC (permalink / raw)
  To: John Stultz
  Cc: Christoph Hellwig, Tejun Heo, Jens Axboe, David Anderson,
	linux-block, lkml, Todd Kjos, Amit Pundir, Alistair Delva

Please try the patch below:

---
From 85943345b41ec04f5a9e92dfad85b0fb24e2d2eb Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Tue, 23 Feb 2021 07:28:22 +0100
Subject: block: don't skip empty device in in disk_uevent

Restore the previous behavior by using the correct flag for the whole device
("part0").

Fixes: 99dfc43ecbf6 ("block: use ->bi_bdev for bio based I/O accounting")
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 block/genhd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/genhd.c b/block/genhd.c
index dbb92e24ef65ed..fcc530164b5ab4 100644
--- a/block/genhd.c
+++ b/block/genhd.c
@@ -476,7 +476,7 @@ void disk_uevent(struct gendisk *disk, enum kobject_action action)
 	struct disk_part_iter piter;
 	struct block_device *part;
 
-	disk_part_iter_init(&piter, disk, DISK_PITER_INCL_PART0);
+	disk_part_iter_init(&piter, disk, DISK_PITER_INCL_EMPTY_PART0);
 	while ((part = disk_part_iter_next(&piter)))
 		kobject_uevent(bdev_kobj(part), action);
 	disk_part_iter_exit(&piter);
-- 
2.29.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions
  2021-02-23  6:31 ` Christoph Hellwig
@ 2021-02-23 22:39   ` John Stultz
  2021-02-23 22:41   ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: John Stultz @ 2021-02-23 22:39 UTC (permalink / raw)
  To: Christoph Hellwig
  Cc: Tejun Heo, Jens Axboe, David Anderson, linux-block, lkml,
	Todd Kjos, Amit Pundir, Alistair Delva

On Mon, Feb 22, 2021 at 10:31 PM Christoph Hellwig <hch@lst.de> wrote:
>
> Please try the patch below:
>
> ---
> From 85943345b41ec04f5a9e92dfad85b0fb24e2d2eb Mon Sep 17 00:00:00 2001
> From: Christoph Hellwig <hch@lst.de>
> Date: Tue, 23 Feb 2021 07:28:22 +0100
> Subject: block: don't skip empty device in in disk_uevent
>
> Restore the previous behavior by using the correct flag for the whole device
> ("part0").
>
> Fixes: 99dfc43ecbf6 ("block: use ->bi_bdev for bio based I/O accounting")
> Reported-by: John Stultz <john.stultz@linaro.org>
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Yes, this seems to fix the problem! Thank you so much!
Tested-by: John Stultz <john.stultz@linaro.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions
  2021-02-23  6:31 ` Christoph Hellwig
  2021-02-23 22:39   ` John Stultz
@ 2021-02-23 22:41   ` Jens Axboe
  1 sibling, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2021-02-23 22:41 UTC (permalink / raw)
  To: Christoph Hellwig, John Stultz
  Cc: Tejun Heo, David Anderson, linux-block, lkml, Todd Kjos,
	Amit Pundir, Alistair Delva

Applied, thanks.

-- 
Jens Axboe


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-02-23 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-22 23:10 [REGRESSION] "add a disk_uevent helper" breaks booting Andorid w/ dynamic partitions John Stultz
2021-02-23  6:31 ` Christoph Hellwig
2021-02-23 22:39   ` John Stultz
2021-02-23 22:41   ` Jens Axboe

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.