diff options
author | David Woodhouse <dwmw2@infradead.org> | 2006-05-18 19:28:49 -0400 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2006-05-18 19:28:49 -0400 |
commit | aef9ab47841af45888d950baa6448072cc70bdd5 (patch) | |
tree | 79545ddc225f64bc38fa04525ac4125c86202cb8 /fs/jffs2/os-linux.h | |
parent | f6a673b3f4f93c1c50e1b18f29254b0531b722a8 (diff) |
[JFFS2] Support new device nodes
Device node major/minor numbers are just stored in the payload of a single
data node. Just extend that to 4 bytes and use new_encode_dev() for it.
We only use the 4-byte format if we _need_ to, if !old_valid_dev(foo).
This preserves backwards compatibility with older code as much as
possible. If we do make devices with major or minor numbers above 255, and
then mount the file system with the old code, it'll just read the first
two bytes and get the numbers wrong. If it comes to garbage-collect it,
it'll then write back those wrong numbers. But that's about the best we
can expect.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'fs/jffs2/os-linux.h')
-rw-r--r-- | fs/jffs2/os-linux.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/jffs2/os-linux.h b/fs/jffs2/os-linux.h index d307cf548625..a10eb03ac95b 100644 --- a/fs/jffs2/os-linux.h +++ b/fs/jffs2/os-linux.h | |||
@@ -31,9 +31,7 @@ struct kvec; | |||
31 | #define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode) | 31 | #define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode) |
32 | #define JFFS2_F_I_UID(f) (OFNI_EDONI_2SFFJ(f)->i_uid) | 32 | #define JFFS2_F_I_UID(f) (OFNI_EDONI_2SFFJ(f)->i_uid) |
33 | #define JFFS2_F_I_GID(f) (OFNI_EDONI_2SFFJ(f)->i_gid) | 33 | #define JFFS2_F_I_GID(f) (OFNI_EDONI_2SFFJ(f)->i_gid) |
34 | 34 | #define JFFS2_F_I_RDEV(f) (OFNI_EDONI_2SFFJ(f)->i_rdev) | |
35 | #define JFFS2_F_I_RDEV_MIN(f) (iminor(OFNI_EDONI_2SFFJ(f))) | ||
36 | #define JFFS2_F_I_RDEV_MAJ(f) (imajor(OFNI_EDONI_2SFFJ(f))) | ||
37 | 35 | ||
38 | #define ITIME(sec) ((struct timespec){sec, 0}) | 36 | #define ITIME(sec) ((struct timespec){sec, 0}) |
39 | #define I_SEC(tv) ((tv).tv_sec) | 37 | #define I_SEC(tv) ((tv).tv_sec) |