Re: [PATCH 09/16] initrd: remove the BLKFLSBUF call in handle_initrd

2020-07-07 Thread Christoph Hellwig
On Thu, Jul 02, 2020 at 08:40:31PM -0700, H. Peter Anvin wrote:
> On 2020-06-15 05:53, Christoph Hellwig wrote:
> > BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole
> > ramdisk, which was completely different behavior compared to all other
> > drivers.  But this magic overload got removed in commit ff26956875c2
> > ("brd: remove support for BLKFLSBUF"), so this call is entirely
> > pointless now.
> > 
> > Signed-off-by: Christoph Hellwig 
> 
> Does *anyone* use initrd as opposed to initramfs anymore? It would seem
> like a good candidate for deprecation/removal.

I thought about that as well.  I think deprecating it at least is a good
idea and can add a patch doing that to the next version.


Re: [PATCH 09/16] initrd: remove the BLKFLSBUF call in handle_initrd

2020-07-03 Thread hpa
On July 3, 2020 5:18:48 PM PDT, antlists  wrote:
>On 03/07/2020 04:40, H. Peter Anvin wrote:
>> On 2020-06-15 05:53, Christoph Hellwig wrote:
>>> BLKFLSBUF used to be overloaded for the ramdisk driver to free the
>whole
>>> ramdisk, which was completely different behavior compared to all
>other
>>> drivers.  But this magic overload got removed in commit ff26956875c2
>>> ("brd: remove support for BLKFLSBUF"), so this call is entirely
>>> pointless now.
>>>
>>> Signed-off-by: Christoph Hellwig 
>> 
>> Does *anyone* use initrd as opposed to initramfs anymore? It would
>seem
>> like a good candidate for deprecation/removal.
>> 
>Reading the gentoo mailing list, it seems there's a fair few people who
>
>don't use initramfs. I get the impression they don't use initrd either,
>
>though.
>
>I don't know too much about booting without an initramfs - I switched 
>ages ago - so what is possible and what they're actually doing, I don't
>
>know.
>
>Cheers,
>Wol

Not using any init userspace at all is an entirely different issue.
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


Re: [PATCH 09/16] initrd: remove the BLKFLSBUF call in handle_initrd

2020-07-03 Thread antlists

On 03/07/2020 04:40, H. Peter Anvin wrote:

On 2020-06-15 05:53, Christoph Hellwig wrote:

BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole
ramdisk, which was completely different behavior compared to all other
drivers.  But this magic overload got removed in commit ff26956875c2
("brd: remove support for BLKFLSBUF"), so this call is entirely
pointless now.

Signed-off-by: Christoph Hellwig 


Does *anyone* use initrd as opposed to initramfs anymore? It would seem
like a good candidate for deprecation/removal.

Reading the gentoo mailing list, it seems there's a fair few people who 
don't use initramfs. I get the impression they don't use initrd either, 
though.


I don't know too much about booting without an initramfs - I switched 
ages ago - so what is possible and what they're actually doing, I don't 
know.


Cheers,
Wol


Re: [PATCH 09/16] initrd: remove the BLKFLSBUF call in handle_initrd

2020-07-02 Thread H. Peter Anvin
On 2020-06-15 05:53, Christoph Hellwig wrote:
> BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole
> ramdisk, which was completely different behavior compared to all other
> drivers.  But this magic overload got removed in commit ff26956875c2
> ("brd: remove support for BLKFLSBUF"), so this call is entirely
> pointless now.
> 
> Signed-off-by: Christoph Hellwig 

Does *anyone* use initrd as opposed to initramfs anymore? It would seem
like a good candidate for deprecation/removal.

-hpa



[PATCH 09/16] initrd: remove the BLKFLSBUF call in handle_initrd

2020-06-15 Thread Christoph Hellwig
BLKFLSBUF used to be overloaded for the ramdisk driver to free the whole
ramdisk, which was completely different behavior compared to all other
drivers.  But this magic overload got removed in commit ff26956875c2
("brd: remove support for BLKFLSBUF"), so this call is entirely
pointless now.

Signed-off-by: Christoph Hellwig 
---
 init/do_mounts_initrd.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/init/do_mounts_initrd.c b/init/do_mounts_initrd.c
index d72beda824aa79..e4f88e9e1c0839 100644
--- a/init/do_mounts_initrd.c
+++ b/init/do_mounts_initrd.c
@@ -115,21 +115,12 @@ static void __init handle_initrd(void)
if (!error)
printk("okay\n");
else {
-   int fd = ksys_open("/dev/root.old", O_RDWR, 0);
if (error == -ENOENT)
printk("/initrd does not exist. Ignored.\n");
else
printk("failed\n");
printk(KERN_NOTICE "Unmounting old root\n");
ksys_umount("/old", MNT_DETACH);
-   printk(KERN_NOTICE "Trying to free ramdisk memory ... ");
-   if (fd < 0) {
-   error = fd;
-   } else {
-   error = ksys_ioctl(fd, BLKFLSBUF, 0);
-   ksys_close(fd);
-   }
-   printk(!error ? "okay\n" : "failed\n");
}
 }
 
-- 
2.26.2