diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-04 18:35:38 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-04 18:35:38 -0400 |
| commit | 370d2662d569f22ac3d598cd4475617cd910c759 (patch) | |
| tree | 127b1cd120174be71ce74488694a48df6c87571e /include | |
| parent | d15fee814d8d30bbb4859ef8fef7a1f96327635b (diff) | |
| parent | d56030ac25d383218045c5d87e98e0494d6af3ad (diff) | |
Merge tag 'upstream-3.15-rc1' of git://git.infradead.org/linux-ubifs
Pull ubifs updates from Artem Bityutskiy:
"This pull request includes the 'ubiblock' driver which provides R/O
block access to UBI volumes. It is useful for those who want to use
squashfs on top of raw flash devices. UBI will provide bit-flip
handling and wear-levelling in this case (e.g., if there are other UBI
volumes with R/W UBIFS too).
The driver is actually pretty small and it is part of the UBI kernel
subsystem. Delivered by Ezequiel Garcia, along with a piece of
documentation on the MTD web site and the user-space tool for creating
and removing block devices"
* tag 'upstream-3.15-rc1' of git://git.infradead.org/linux-ubifs:
UBI: block: Remove __initdata from ubiblock_param_ops
UBI: make UBI_IOCVOLCRBLK take a parameter for future usage
UBI: rename block device ioctls
UBI: block: Use ENOSYS as return value when CONFIG_UBIBLOCK=n
UBI: block: Add CONFIG_BLOCK dependency
UBI: block: Use 'u64' for the 64-bit dividend
UBI: block: Mark init-only symbol as __initdata
UBI: block: do not use term "attach"
UBI: R/O block driver on top of UBI volumes
Diffstat (limited to 'include')
| -rw-r--r-- | include/uapi/mtd/ubi-user.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/uapi/mtd/ubi-user.h b/include/uapi/mtd/ubi-user.h index 723c324590c1..1927b0d78a99 100644 --- a/include/uapi/mtd/ubi-user.h +++ b/include/uapi/mtd/ubi-user.h | |||
| @@ -134,6 +134,16 @@ | |||
| 134 | * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be | 134 | * used. A pointer to a &struct ubi_set_vol_prop_req object is expected to be |
| 135 | * passed. The object describes which property should be set, and to which value | 135 | * passed. The object describes which property should be set, and to which value |
| 136 | * it should be set. | 136 | * it should be set. |
| 137 | * | ||
| 138 | * Block devices on UBI volumes | ||
| 139 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 140 | * | ||
| 141 | * To create a R/O block device on top of an UBI volume the %UBI_IOCVOLCRBLK | ||
| 142 | * should be used. A pointer to a &struct ubi_blkcreate_req object is expected | ||
| 143 | * to be passed, which is not used and reserved for future usage. | ||
| 144 | * | ||
| 145 | * Conversely, to remove a block device the %UBI_IOCVOLRMBLK should be used, | ||
| 146 | * which takes no arguments. | ||
| 137 | */ | 147 | */ |
| 138 | 148 | ||
| 139 | /* | 149 | /* |
| @@ -191,6 +201,10 @@ | |||
| 191 | /* Set an UBI volume property */ | 201 | /* Set an UBI volume property */ |
| 192 | #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ | 202 | #define UBI_IOCSETVOLPROP _IOW(UBI_VOL_IOC_MAGIC, 6, \ |
| 193 | struct ubi_set_vol_prop_req) | 203 | struct ubi_set_vol_prop_req) |
| 204 | /* Create a R/O block device on top of an UBI volume */ | ||
| 205 | #define UBI_IOCVOLCRBLK _IOW(UBI_VOL_IOC_MAGIC, 7, struct ubi_blkcreate_req) | ||
| 206 | /* Remove the R/O block device */ | ||
| 207 | #define UBI_IOCVOLRMBLK _IO(UBI_VOL_IOC_MAGIC, 8) | ||
| 194 | 208 | ||
| 195 | /* Maximum MTD device name length supported by UBI */ | 209 | /* Maximum MTD device name length supported by UBI */ |
| 196 | #define MAX_UBI_MTD_NAME_LEN 127 | 210 | #define MAX_UBI_MTD_NAME_LEN 127 |
| @@ -420,4 +434,12 @@ struct ubi_set_vol_prop_req { | |||
| 420 | __u64 value; | 434 | __u64 value; |
| 421 | } __packed; | 435 | } __packed; |
| 422 | 436 | ||
| 437 | /** | ||
| 438 | * struct ubi_blkcreate_req - a data structure used in block creation requests. | ||
| 439 | * @padding: reserved for future, not used, has to be zeroed | ||
| 440 | */ | ||
| 441 | struct ubi_blkcreate_req { | ||
| 442 | __s8 padding[128]; | ||
| 443 | } __packed; | ||
| 444 | |||
| 423 | #endif /* __UBI_USER_H__ */ | 445 | #endif /* __UBI_USER_H__ */ |
