diff options
author | Dan Ehrenberg <dehrenberg@chromium.org> | 2015-03-17 10:37:26 -0700 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2015-06-02 11:35:49 +0200 |
commit | 2bf50d42f3a418153d2964ca0f25655177f36445 (patch) | |
tree | 1567f0d7744c6f1ad64a0ebd2b8dbe7b79b4aaf8 /scripts | |
parent | c65b99f046843d2455aa231747b5a07a999a9f3d (diff) |
UBI: block: Dynamically allocate minor numbers
This patch makes ubiblock devices have minor numbers beginning from
0, allocated dynamically independently of the ubi device/volume
number. This property becomes useful because, on 32-bit architectures
with LFS turned off in a userspace program, device minor numbers
over 8 bits cause stat to return -EOVERFLOW. If the device number is
high (>1) due to multiple MTD partitions, such an overflow will occur.
While enabling LFS is clearly a nicer solution, it's often difficult
to turn on in practice globally as many widely distributed packages
don't work with LFS on.
Other storage systems have their own workarounds, with SCSI making
multiple device majors and MMC having a config option for the number
of partitions per device. A completely dynamic minor numbering is
simpler than these. It is unlikely that anyone is depending on a
static minor number since the major is dynamic anyway. In addition,
ubiblock is still relatively new, so now is the time to make such
changes.
Signed-off-by: Dan Ehrenberg <dehrenberg@chromium.org>
Acked-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'scripts')
0 files changed, 0 insertions, 0 deletions