public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
@ 2012-11-02  2:54 Joe Hershberger
  2012-11-05 16:43 ` Vikram Narayanan
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Joe Hershberger @ 2012-11-02  2:54 UTC (permalink / raw)
  To: u-boot

UBI can mount volumes by name or number  The current code forces you
to name the volume by prepending every name with "ubi:".

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

* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
  2012-11-02  2:54 [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number Joe Hershberger
@ 2012-11-05 16:43 ` Vikram Narayanan
  2012-11-05 16:49   ` Joe Hershberger
  2013-03-04 21:27 ` [U-Boot] " Tom Rini
  2013-03-04 21:27 ` Tom Rini
  2 siblings, 1 reply; 9+ messages in thread
From: Vikram Narayanan @ 2012-11-05 16:43 UTC (permalink / raw)
  To: u-boot

On 11/2/2012 8:24 AM, Joe Hershberger wrote:
> UBI can mount volumes by name or number  The current code forces you
> to name the volume by prepending every name with "ubi:".
>
>  From fs/ubifs/super.c
>   * There are several ways to specify UBI volumes when mounting UBIFS:
>   * o ubiX_Y    - UBI device number X, volume Y;
>   * o ubiY      - UBI device number 0, volume Y;
>   * o ubiX:NAME - mount UBI device X, volume with name NAME;
>   * o ubi:NAME  - mount UBI device 0, volume with name NAME.
>
> Now any name passed in any of the above forms are allowed.

What exactly are we gaining from this naming compared to the default?
In what way the old naming affects the end user?

Regards,
Vikram

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

* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
  2012-11-05 16:43 ` Vikram Narayanan
@ 2012-11-05 16:49   ` Joe Hershberger
  2012-11-05 17:36     ` Vikram Narayanan
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2012-11-05 16:49 UTC (permalink / raw)
  To: u-boot

Hi Vikram,

On Mon, Nov 5, 2012 at 10:43 AM, Vikram Narayanan <vikram186@gmail.com> wrote:
>
> On 11/2/2012 8:24 AM, Joe Hershberger wrote:
>>
>> UBI can mount volumes by name or number  The current code forces you
>> to name the volume by prepending every name with "ubi:".
>>
>>  From fs/ubifs/super.c
>>   * There are several ways to specify UBI volumes when mounting UBIFS:
>>   * o ubiX_Y    - UBI device number X, volume Y;
>>   * o ubiY      - UBI device number 0, volume Y;
>>   * o ubiX:NAME - mount UBI device X, volume with name NAME;
>>   * o ubi:NAME  - mount UBI device 0, volume with name NAME.
>>
>> Now any name passed in any of the above forms are allowed.
>
>
> What exactly are we gaining from this naming compared to the default?
> In what way the old naming affects the end user?

The reason I needed this change is so that I could specify the volume
by number in a script instead of being forced to know the name.  In
Linux you can use the volume number using the format above (it's the
same code).

-Joe

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

* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
  2012-11-05 16:49   ` Joe Hershberger
@ 2012-11-05 17:36     ` Vikram Narayanan
  2012-11-05 18:18       ` Joe Hershberger
  0 siblings, 1 reply; 9+ messages in thread
From: Vikram Narayanan @ 2012-11-05 17:36 UTC (permalink / raw)
  To: u-boot

Hi Joe,

On 11/5/2012 10:19 PM, Joe Hershberger wrote:
> Hi Vikram,
>
> On Mon, Nov 5, 2012 at 10:43 AM, Vikram Narayanan<vikram186@gmail.com>  wrote:
>>
>> On 11/2/2012 8:24 AM, Joe Hershberger wrote:
>>>
>>> UBI can mount volumes by name or number  The current code forces you
>>> to name the volume by prepending every name with "ubi:".
>>>
>>>   From fs/ubifs/super.c
>>>    * There are several ways to specify UBI volumes when mounting UBIFS:
>>>    * o ubiX_Y    - UBI device number X, volume Y;
>>>    * o ubiY      - UBI device number 0, volume Y;
>>>    * o ubiX:NAME - mount UBI device X, volume with name NAME;
>>>    * o ubi:NAME  - mount UBI device 0, volume with name NAME.
>>>
>>> Now any name passed in any of the above forms are allowed.
>>
>>
>> What exactly are we gaining from this naming compared to the default?
>> In what way the old naming affects the end user?
>
> The reason I needed this change is so that I could specify the volume
> by number in a script instead of being forced to know the name.  In
> Linux you can use the volume number using the format above (it's the
> same code).

If that is the case, then the one can create the partition using the 
below command,

 > ubi createvol <vol name>

<vol name> can be any of the 4 methods listed above.

and the prefix "ubi:" will be appended in the environment which is 
expected by kernel for mounting. Right?

~Vikram

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

* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
  2012-11-05 17:36     ` Vikram Narayanan
@ 2012-11-05 18:18       ` Joe Hershberger
  2012-11-05 18:41         ` Vikram Narayanan
  0 siblings, 1 reply; 9+ messages in thread
From: Joe Hershberger @ 2012-11-05 18:18 UTC (permalink / raw)
  To: u-boot

Hi Vikram,

On Mon, Nov 5, 2012 at 11:36 AM, Vikram Narayanan <vikram186@gmail.com> wrote:
> Hi Joe,
>
>
> On 11/5/2012 10:19 PM, Joe Hershberger wrote:
>>
>> Hi Vikram,
>>
>> On Mon, Nov 5, 2012 at 10:43 AM, Vikram Narayanan<vikram186@gmail.com>
>> wrote:
>>>
>>>
>>> On 11/2/2012 8:24 AM, Joe Hershberger wrote:
>>>>
>>>>
>>>> UBI can mount volumes by name or number  The current code forces you
>>>> to name the volume by prepending every name with "ubi:".
>>>>
>>>>   From fs/ubifs/super.c
>>>>    * There are several ways to specify UBI volumes when mounting UBIFS:
>>>>    * o ubiX_Y    - UBI device number X, volume Y;
>>>>    * o ubiY      - UBI device number 0, volume Y;
>>>>    * o ubiX:NAME - mount UBI device X, volume with name NAME;
>>>>    * o ubi:NAME  - mount UBI device 0, volume with name NAME.
>>>>
>>>> Now any name passed in any of the above forms are allowed.
>>>
>>>
>>>
>>> What exactly are we gaining from this naming compared to the default?
>>> In what way the old naming affects the end user?
>>
>>
>> The reason I needed this change is so that I could specify the volume
>> by number in a script instead of being forced to know the name.  In
>> Linux you can use the volume number using the format above (it's the
>> same code).
>
>
> If that is the case, then the one can create the partition using the below
> command,
>
>> ubi createvol <vol name>
>
> <vol name> can be any of the 4 methods listed above.

I believe that is incorrect.  <vol name> is literally the name that
can be used in the form "ubiX:<vol name>".  It doesn't make sense to
use the above forms when creating the volume.  The ubi index is
already set by calling ubi part <mtd partition>.  The volume index is
simply the next volume in that ubi.

> and the prefix "ubi:" will be appended in the environment which is expected
> by kernel for mounting. Right?

I assume you meant prepended.  Please expand on what you are saying
here.  What environment variable?  Prepended by what / who?  Yes, the
kernel command line expects a full name in one of the 4 forms above.

-Joe

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

* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
  2012-11-05 18:18       ` Joe Hershberger
@ 2012-11-05 18:41         ` Vikram Narayanan
  2012-11-05 18:49           ` Joe Hershberger
  0 siblings, 1 reply; 9+ messages in thread
From: Vikram Narayanan @ 2012-11-05 18:41 UTC (permalink / raw)
  To: u-boot

On 11/5/2012 11:48 PM, Joe Hershberger wrote:
> Hi Vikram,
>
> On Mon, Nov 5, 2012 at 11:36 AM, Vikram Narayanan<vikram186@gmail.com>  wrote:
>> Hi Joe,
>>
>>
>> On 11/5/2012 10:19 PM, Joe Hershberger wrote:
>>>
>>> Hi Vikram,
>>>
>>> On Mon, Nov 5, 2012 at 10:43 AM, Vikram Narayanan<vikram186@gmail.com>
>>> wrote:
>>>>
>>>>
>>>> On 11/2/2012 8:24 AM, Joe Hershberger wrote:
>>>>>
>>>>>
>>>>> UBI can mount volumes by name or number  The current code forces you
>>>>> to name the volume by prepending every name with "ubi:".
>>>>>
>>>>>    From fs/ubifs/super.c
>>>>>     * There are several ways to specify UBI volumes when mounting UBIFS:
>>>>>     * o ubiX_Y    - UBI device number X, volume Y;
>>>>>     * o ubiY      - UBI device number 0, volume Y;
>>>>>     * o ubiX:NAME - mount UBI device X, volume with name NAME;
>>>>>     * o ubi:NAME  - mount UBI device 0, volume with name NAME.
>>>>>
>>>>> Now any name passed in any of the above forms are allowed.
>>>>
>>>>
>>>>
>>>> What exactly are we gaining from this naming compared to the default?
>>>> In what way the old naming affects the end user?
>>>
>>>
>>> The reason I needed this change is so that I could specify the volume
>>> by number in a script instead of being forced to know the name.  In
>>> Linux you can use the volume number using the format above (it's the
>>> same code).
>>
>>
>> If that is the case, then the one can create the partition using the below
>> command,
>>
>>> ubi createvol<vol name>
>>
>> <vol name>  can be any of the 4 methods listed above.
>
> I believe that is incorrect.<vol name>  is literally the name that
> can be used in the form "ubiX:<vol name>".  It doesn't make sense to
> use the above forms when creating the volume.  The ubi index is
> already set by calling ubi part<mtd partition>.  The volume index is
> simply the next volume in that ubi.

say I've an mtdpartition by the name "filesystem"

ubi part filesystem
ubi createvol rootfs

If I invoke the above commands, I'll have a ubi volume with a name 
rootfs with the complete size of (filesystem - metadata).

When passing bootargs to the kernel I'd give the root as
root=ubi0:rootfs

Why should this be wrong?

>
>> and the prefix "ubi:" will be appended in the environment which is expected
>> by kernel for mounting. Right?
>
> I assume you meant prepended.  Please expand on what you are saying

Yes. I meant prepended. sorry.

> here.  What environment variable?  Prepended by what / who?  Yes, the

Prepended by the string "ubi:" as you've done in this patch for some 
configs.

~Vikram

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

* [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number
  2012-11-05 18:41         ` Vikram Narayanan
@ 2012-11-05 18:49           ` Joe Hershberger
  0 siblings, 0 replies; 9+ messages in thread
From: Joe Hershberger @ 2012-11-05 18:49 UTC (permalink / raw)
  To: u-boot

Hi Vikram,

On Mon, Nov 5, 2012 at 12:41 PM, Vikram Narayanan <vikram186@gmail.com> wrote:
> On 11/5/2012 11:48 PM, Joe Hershberger wrote:
>>
>> Hi Vikram,
>>
>> On Mon, Nov 5, 2012 at 11:36 AM, Vikram Narayanan<vikram186@gmail.com>
>> wrote:
>>>
>>> Hi Joe,
>>>
>>>
>>> On 11/5/2012 10:19 PM, Joe Hershberger wrote:
>>>>
>>>>
>>>> Hi Vikram,
>>>>
>>>> On Mon, Nov 5, 2012 at 10:43 AM, Vikram Narayanan<vikram186@gmail.com>
>>>> wrote:
>>>>>
>>>>>
>>>>>
>>>>> On 11/2/2012 8:24 AM, Joe Hershberger wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>> UBI can mount volumes by name or number  The current code forces you
>>>>>> to name the volume by prepending every name with "ubi:".
>>>>>>
>>>>>>    From fs/ubifs/super.c
>>>>>>     * There are several ways to specify UBI volumes when mounting
>>>>>> UBIFS:
>>>>>>     * o ubiX_Y    - UBI device number X, volume Y;
>>>>>>     * o ubiY      - UBI device number 0, volume Y;
>>>>>>     * o ubiX:NAME - mount UBI device X, volume with name NAME;
>>>>>>     * o ubi:NAME  - mount UBI device 0, volume with name NAME.
>>>>>>
>>>>>> Now any name passed in any of the above forms are allowed.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> What exactly are we gaining from this naming compared to the default?
>>>>> In what way the old naming affects the end user?
>>>>
>>>>
>>>>
>>>> The reason I needed this change is so that I could specify the volume
>>>> by number in a script instead of being forced to know the name.  In
>>>> Linux you can use the volume number using the format above (it's the
>>>> same code).
>>>
>>>
>>>
>>> If that is the case, then the one can create the partition using the
>>> below
>>> command,
>>>
>>>> ubi createvol<vol name>
>>>
>>>
>>> <vol name>  can be any of the 4 methods listed above.

This is wrong.

>> I believe that is incorrect.<vol name>  is literally the name that
>> can be used in the form "ubiX:<vol name>".  It doesn't make sense to
>> use the above forms when creating the volume.  The ubi index is
>> already set by calling ubi part<mtd partition>.  The volume index is
>> simply the next volume in that ubi.
>
>
> say I've an mtdpartition by the name "filesystem"
>
> ubi part filesystem
> ubi createvol rootfs
>
> If I invoke the above commands, I'll have a ubi volume with a name rootfs
> with the complete size of (filesystem - metadata).
>
> When passing bootargs to the kernel I'd give the root as
> root=ubi0:rootfs
>
> Why should this be wrong?

This sequence of commands isn't wrong.  What you claimed above is
wrong: "<vol name>  can be any of the 4 methods listed above".

>>
>>> and the prefix "ubi:" will be appended in the environment which is
>>> expected
>>> by kernel for mounting. Right?
>>
>>
>> I assume you meant prepended.  Please expand on what you are saying
>
>
> Yes. I meant prepended. sorry.
>
>
>> here.  What environment variable?  Prepended by what / who?  Yes, the
>
>
> Prepended by the string "ubi:" as you've done in this patch for some
> configs.

Ok... the whole point of this patch is to change the behavior of the
ubifsmount command.  This makes the ubifsmount command take the same
form as the kernel command line does.  This patch has nothing to do
with the ubi createvol command.

-Joe

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

* [U-Boot] ubifs: Allow ubifsmount volume reference by number
  2012-11-02  2:54 [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number Joe Hershberger
  2012-11-05 16:43 ` Vikram Narayanan
@ 2013-03-04 21:27 ` Tom Rini
  2013-03-04 21:27 ` Tom Rini
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2013-03-04 21:27 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 01, 2012 at 04:54:18PM -0000, Joe Hershberger wrote:

> UBI can mount volumes by name or number  The current code forces you
> to name the volume by prepending every name with "ubi:".
> 
> >From fs/ubifs/super.c
>  * There are several ways to specify UBI volumes when mounting UBIFS:
>  * o ubiX_Y    - UBI device number X, volume Y;
>  * o ubiY      - UBI device number 0, volume Y;
>  * o ubiX:NAME - mount UBI device X, volume with name NAME;
>  * o ubi:NAME  - mount UBI device 0, volume with name NAME.
> 
> Now any name passed in any of the above forms are allowed.
> 
> Also update the configs that referenced ubifsmount.
> 
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130304/9d7bb6ea/attachment.pgp>

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

* [U-Boot] ubifs: Allow ubifsmount volume reference by number
  2012-11-02  2:54 [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number Joe Hershberger
  2012-11-05 16:43 ` Vikram Narayanan
  2013-03-04 21:27 ` [U-Boot] " Tom Rini
@ 2013-03-04 21:27 ` Tom Rini
  2 siblings, 0 replies; 9+ messages in thread
From: Tom Rini @ 2013-03-04 21:27 UTC (permalink / raw)
  To: u-boot

On Thu, Nov 01, 2012 at 04:54:18PM -0000, Joe Hershberger wrote:

> UBI can mount volumes by name or number  The current code forces you
> to name the volume by prepending every name with "ubi:".
> 
> >From fs/ubifs/super.c
>  * There are several ways to specify UBI volumes when mounting UBIFS:
>  * o ubiX_Y    - UBI device number X, volume Y;
>  * o ubiY      - UBI device number 0, volume Y;
>  * o ubiX:NAME - mount UBI device X, volume with name NAME;
>  * o ubi:NAME  - mount UBI device 0, volume with name NAME.
> 
> Now any name passed in any of the above forms are allowed.
> 
> Also update the configs that referenced ubifsmount.
> 
> Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130304/1569d918/attachment.pgp>

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

end of thread, other threads:[~2013-03-04 21:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-02  2:54 [U-Boot] [PATCH] ubifs: Allow ubifsmount volume reference by number Joe Hershberger
2012-11-05 16:43 ` Vikram Narayanan
2012-11-05 16:49   ` Joe Hershberger
2012-11-05 17:36     ` Vikram Narayanan
2012-11-05 18:18       ` Joe Hershberger
2012-11-05 18:41         ` Vikram Narayanan
2012-11-05 18:49           ` Joe Hershberger
2013-03-04 21:27 ` [U-Boot] " Tom Rini
2013-03-04 21:27 ` Tom Rini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox