ubifs: Allow ubifsmount volume reference by number
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
UBI can mount volumes by name or number The current code forces you to name the volume by prepending every name with "ubi:".
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
Quoted 11 lines · Joe Hershberger
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:
* oubiX_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
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
Hi Vikram,
Quoted 13 lines · Vikram Narayanan
Quoted 11 lines · Joe Hershberger
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:
* oubiX_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.
Quoted 5 lines
Quoted 1 line
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
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
Hi Joe,
Quoted 19 lines · Joe Hershberger
Hi Vikram,
Quoted 16 lines · Vikram Narayanan
Quoted 12 lines · Joe Hershberger
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:
* oubiX_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.
Quoted 7 lines
Quoted 2 lines
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,
Quoted 1 line
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
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
Hi Vikram,
Quoted 38 lines · Vikram Narayanan
Hi Joe,
Quoted 24 lines · Joe Hershberger
Hi Vikram,
Quoted 19 lines · Vikram Narayanan
Quoted 13 lines · Joe Hershberger
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:
* oubiX_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.
Quoted 8 lines
Quoted 2 lines
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).
Quoted 6 lines
If that is the case, then the one can create the partition using the below command,
Quoted 1 line
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.
Quoted 2 lines
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
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
Quoted 46 lines · Joe Hershberger
Hi Vikram,
Quoted 43 lines · Vikram Narayanan
Hi Joe,
Quoted 24 lines · Joe Hershberger
Hi Vikram,
Quoted 19 lines · Vikram Narayanan
Quoted 13 lines · Joe Hershberger
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:
* oubiX_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.
Quoted 8 lines
Quoted 2 lines
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,
Quoted 1 line
ubi createvol<vol name>
Quoted 7 lines
Quoted 1 line
<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?
Quoted 5 lines
Quoted 3 lines
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.
Quoted 1 line
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
PATCH 1/1 ubifs: Allow ubifsmount volume reference by number
Hi Vikram,
Quoted 52 lines · Vikram Narayanan
Quoted 51 lines · Joe Hershberger
Hi Vikram,
Quoted 46 lines · Vikram Narayanan
Hi Joe,
Quoted 38 lines · Joe Hershberger
Hi Vikram,
Quoted 18 lines · Vikram Narayanan
Quoted 14 lines · Joe Hershberger
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:
* oubiX_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.Quoted 7 lines
Quoted 1 line
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).
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
If that is the case, then the one can create the partition using the below
command,Quoted 1 line
ubi createvol<vol name>
<vol name> can be any of the 4 methods listed above.
This is wrong.
Quoted 12 lines
Quoted 5 lines
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
Quoted 7 lines
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".
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
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
Quoted 8 lines
Yes. I meant prepended. sorry.
Quoted 1 line
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
Quoted 10 lines · Joe Hershberger
UBI can mount volumes by name or number The current code forces you to name the volume by prepending every name with "ubi:".
Quoted 1 line
From
fs/ubifs/super.c* There are several ways to specify UBI volumes when mounting UBIFS:
* oubiX_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.
Quoted 5 lines
Now any name passed in any of the above forms are allowed.
Also update the configs that referenced ubifsmount.
Signed-off-by Joe Hershberger <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>
Quoted 10 lines · Joe Hershberger
UBI can mount volumes by name or number The current code forces you to name the volume by prepending every name with "ubi:".
Quoted 1 line
From
fs/ubifs/super.c* There are several ways to specify UBI volumes when mounting UBIFS:
* oubiX_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.
Quoted 5 lines
Now any name passed in any of the above forms are allowed.
Also update the configs that referenced ubifsmount.
Signed-off-by Joe Hershberger <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
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>