* [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking
@ 2024-01-11 6:22 David Disseldorp
2024-01-11 6:45 ` Christoph Hellwig
2024-01-11 9:30 ` Christian Brauner
0 siblings, 2 replies; 5+ messages in thread
From: David Disseldorp @ 2024-01-11 6:22 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel, linux-kernel, David Disseldorp
If initrd_start cpio extraction fails, CONFIG_BLK_DEV_RAM triggers
fallback to initrd.image handling via populate_initrd_image().
The populate_initrd_image() call follows successful extraction of any
built-in cpio archive at __initramfs_start, but currently performs
built-in archive extraction a second time.
Prior to commit b2a74d5f9d446 ("initramfs: remove clean_rootfs"),
the second built-in initramfs unpack call was used to repopulate entries
removed by clean_rootfs(), but it's no longer necessary now the contents
of the previous extraction are retained.
Signed-off-by: David Disseldorp <ddiss@suse.de>
---
init/initramfs.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/init/initramfs.c b/init/initramfs.c
index 8d0fd946cdd2b..2edd3007a6857 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -669,8 +669,6 @@ static void __init populate_initrd_image(char *err)
struct file *file;
loff_t pos = 0;
- unpack_to_rootfs(__initramfs_start, __initramfs_size);
-
printk(KERN_INFO "rootfs image is not initramfs (%s); looks like an initrd\n",
err);
file = filp_open("/initrd.image", O_WRONLY | O_CREAT, 0700);
--
2.35.3
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking
2024-01-11 6:22 [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking David Disseldorp
@ 2024-01-11 6:45 ` Christoph Hellwig
2024-01-11 8:15 ` David Disseldorp
2024-01-11 9:30 ` Christian Brauner
1 sibling, 1 reply; 5+ messages in thread
From: Christoph Hellwig @ 2024-01-11 6:45 UTC (permalink / raw)
To: David Disseldorp; +Cc: Christoph Hellwig, linux-fsdevel, linux-kernel
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking
2024-01-11 6:45 ` Christoph Hellwig
@ 2024-01-11 8:15 ` David Disseldorp
2024-01-11 9:31 ` Christian Brauner
0 siblings, 1 reply; 5+ messages in thread
From: David Disseldorp @ 2024-01-11 8:15 UTC (permalink / raw)
To: Christoph Hellwig, Christian Brauner; +Cc: linux-fsdevel, linux-kernel
On Thu, 11 Jan 2024 07:45:40 +0100, Christoph Hellwig wrote:
> Reviewed-by: Christoph Hellwig <hch@lst.de>
Thanks Christoph.
I don't think there's a regular tree for queueing initramfs changes.
Christian: would the vfs queue be appropriate?
Cheers, David
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking
2024-01-11 8:15 ` David Disseldorp
@ 2024-01-11 9:31 ` Christian Brauner
0 siblings, 0 replies; 5+ messages in thread
From: Christian Brauner @ 2024-01-11 9:31 UTC (permalink / raw)
To: David Disseldorp; +Cc: Christoph Hellwig, linux-fsdevel, linux-kernel
On Thu, Jan 11, 2024 at 07:15:10PM +1100, David Disseldorp wrote:
> On Thu, 11 Jan 2024 07:45:40 +0100, Christoph Hellwig wrote:
>
> > Reviewed-by: Christoph Hellwig <hch@lst.de>
>
> Thanks Christoph.
> I don't think there's a regular tree for queueing initramfs changes.
> Christian: would the vfs queue be appropriate?
Certainly. I've picked it up now. You should receive a thank you message
in a minute.
Thanks for making me aware of this!
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking
2024-01-11 6:22 [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking David Disseldorp
2024-01-11 6:45 ` Christoph Hellwig
@ 2024-01-11 9:30 ` Christian Brauner
1 sibling, 0 replies; 5+ messages in thread
From: Christian Brauner @ 2024-01-11 9:30 UTC (permalink / raw)
To: David Disseldorp
Cc: Christian Brauner, linux-fsdevel, linux-kernel, Christoph Hellwig
On Thu, 11 Jan 2024 17:22:40 +1100, David Disseldorp wrote:
> If initrd_start cpio extraction fails, CONFIG_BLK_DEV_RAM triggers
> fallback to initrd.image handling via populate_initrd_image().
> The populate_initrd_image() call follows successful extraction of any
> built-in cpio archive at __initramfs_start, but currently performs
> built-in archive extraction a second time.
>
> Prior to commit b2a74d5f9d446 ("initramfs: remove clean_rootfs"),
> the second built-in initramfs unpack call was used to repopulate entries
> removed by clean_rootfs(), but it's no longer necessary now the contents
> of the previous extraction are retained.
>
> [...]
Applied to the vfs.misc branch of the vfs/vfs.git tree.
Patches in the vfs.misc branch should appear in linux-next soon.
Please report any outstanding bugs that were missed during review in a
new review to the original patch series allowing us to drop it.
It's encouraged to provide Acked-bys and Reviewed-bys even though the
patch has now been applied. If possible patch trailers will be updated.
Note that commit hashes shown below are subject to change due to rebase,
trailer updates or similar. If in doubt, please check the listed branch.
tree: https://git.kernel.org/pub/scm/linux/kernel/git/vfs/vfs.git
branch: vfs.misc
[1/1] initramfs: remove duplicate built-in __initramfs_start unpacking
https://git.kernel.org/vfs/vfs/c/822b1a28fc5f
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-11 9:31 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-11 6:22 [PATCH] initramfs: remove duplicate built-in __initramfs_start unpacking David Disseldorp
2024-01-11 6:45 ` Christoph Hellwig
2024-01-11 8:15 ` David Disseldorp
2024-01-11 9:31 ` Christian Brauner
2024-01-11 9:30 ` Christian Brauner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).