Patchwork document ubiblk's usage of the same ioctl magic as a part of UBI

login
register
mail settings
Submitter David Wagner
Date Aug. 24, 2011, 4:21 p.m.
Message ID <1314202916-6982-1-git-send-email-david.wagner@free-electrons.com>
Download mbox | patch
Permalink /patch/111381/
State New
Headers show

Comments

David Wagner - Aug. 24, 2011, 4:21 p.m.
---
 include/mtd/ubi-user.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
Artem Bityutskiy - Sept. 6, 2011, 4:58 a.m.
On Wed, 2011-08-24 at 18:21 +0200, David Wagner wrote:
> ---
>  include/mtd/ubi-user.h |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
> index 3c41097..7c8bfe3 100644
> --- a/include/mtd/ubi-user.h
> +++ b/include/mtd/ubi-user.h
> @@ -188,6 +188,7 @@
>  /* Set an UBI volume property */
>  #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
>  			       struct ubi_set_vol_prop_req)
> +/* If you add ioctls here, please note that ubiblk uses 'O'/0x10-0x11 */
>  
>  /* Maximum MTD device name length supported by UBI */
>  #define MAX_UBI_MTD_NAME_LEN 127

Let's postpone this patch and the user-space tool until ubiblk is ready
for inclusion. I sent you some comments - the main one is the block
device reference counting and making sure that the underlying UBI volume
does not disappear when you use it.

Patch

diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h
index 3c41097..7c8bfe3 100644
--- a/include/mtd/ubi-user.h
+++ b/include/mtd/ubi-user.h
@@ -188,6 +188,7 @@ 
 /* Set an UBI volume property */
 #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \
 			       struct ubi_set_vol_prop_req)
+/* If you add ioctls here, please note that ubiblk uses 'O'/0x10-0x11 */
 
 /* Maximum MTD device name length supported by UBI */
 #define MAX_UBI_MTD_NAME_LEN 127