2008-03-21 13:06:18

by Christoph Hellwig

[permalink] [raw]
Subject: Why is the rewritten ramdisk driver called brd instad of rd

Any reason why the rewritten ramdisk driver has a new name? It's for
all matters an inplace replacement of the old rd driver so it should
be called rd.c / rd.ko to not confused instaler/developers/etc.


2008-06-03 11:10:07

by Jan Engelhardt

[permalink] [raw]
Subject: Re: Why is the rewritten ramdisk driver called brd instad of rd


On Wednesday 2008-05-28 08:11, Nick Piggin wrote:

>On Tue, May 27, 2008 at 11:28:00AM +0200, Petr Tesarik wrote:
>> On Fri, 2008-03-21 at 14:05 +0100, Christoph Hellwig wrote:
>> > Any reason why the rewritten ramdisk driver has a new name? It's for
>> > all matters an inplace replacement of the old rd driver so it should
>> > be called rd.c / rd.ko to not confused instaler/developers/etc.
>>
>> I think it's because the old rd played some dirty tricks with the page
>> cache, while the reworked one is a straightforward implementation of a
>> normal _b_lock device -> hence the "b".
>>
>> No guarantee of correctness.
>
>Yeah it was a rwrite from scratch and it lived with the rd.c code for
>a while (although maybe never in mainline). I guess it might be good
>idea to rename it back to rd?

Just add a MODULE_ALIAS("rd").

2008-06-04 15:18:53

by Nick Piggin

[permalink] [raw]
Subject: Re: Why is the rewritten ramdisk driver called brd instad of rd

On Tue, Jun 03, 2008 at 01:09:55PM +0200, Jan Engelhardt wrote:
>
> On Wednesday 2008-05-28 08:11, Nick Piggin wrote:
>
> >On Tue, May 27, 2008 at 11:28:00AM +0200, Petr Tesarik wrote:
> >> On Fri, 2008-03-21 at 14:05 +0100, Christoph Hellwig wrote:
> >> > Any reason why the rewritten ramdisk driver has a new name? It's for
> >> > all matters an inplace replacement of the old rd driver so it should
> >> > be called rd.c / rd.ko to not confused instaler/developers/etc.
> >>
> >> I think it's because the old rd played some dirty tricks with the page
> >> cache, while the reworked one is a straightforward implementation of a
> >> normal _b_lock device -> hence the "b".
> >>
> >> No guarantee of correctness.
> >
> >Yeah it was a rwrite from scratch and it lived with the rd.c code for
> >a while (although maybe never in mainline). I guess it might be good
> >idea to rename it back to rd?
>
> Just add a MODULE_ALIAS("rd").

Couldn't hurt... shall we merge this, then?


Alias brd to rd in the hope of helping legacy users. Suggested by Jan.

Signed-off-by: Nick Piggin <[email protected]>
---
Index: linux-2.6/drivers/block/brd.c
===================================================================
--- linux-2.6.orig/drivers/block/brd.c 2008-06-05 00:51:53.000000000 +1000
+++ linux-2.6/drivers/block/brd.c 2008-06-05 00:52:43.000000000 +1000
@@ -397,6 +397,7 @@ module_param(max_part, int, 0);
MODULE_PARM_DESC(max_part, "Maximum number of partitions per RAM disk");
MODULE_LICENSE("GPL");
MODULE_ALIAS_BLOCKDEV_MAJOR(RAMDISK_MAJOR);
+MODULE_ALIAS("rd");

#ifndef MODULE
/* Legacy boot options - nonmodular */