diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-03-26 06:51:21 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2009-03-26 10:36:20 -0400 |
commit | 963f0cf6d116d83c558a8efe9045c1c5ad7aed34 (patch) | |
tree | 43937f0d742bfac7dfc1a00bae8f72e98dc87425 /fs/ubifs/ubifs.h | |
parent | fcabb3479e2b15abfd2d2ef5363295f16e98b2d7 (diff) |
UBIFS: add R/O compatibility
Now UBIFS is supported by u-boot. If we ever decide to change the
media format, then people will have to upgrade their u-boots to
mount new format images. However, very often it is possible to
preserve R/O forward-compatibility, even though the write
forward-compatibility is not preserved.
This patch introduces a new super-block field which stores the
R/O compatibility version.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Acked-by: Adrian Hunter <Adrian.Hunter@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index a53b9a6df2be..0a8341e14088 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -934,6 +934,7 @@ struct ubifs_debug_info; | |||
934 | * by @commit_sem | 934 | * by @commit_sem |
935 | * @cnt_lock: protects @highest_inum and @max_sqnum counters | 935 | * @cnt_lock: protects @highest_inum and @max_sqnum counters |
936 | * @fmt_version: UBIFS on-flash format version | 936 | * @fmt_version: UBIFS on-flash format version |
937 | * @ro_compat_version: R/O compatibility version | ||
937 | * @uuid: UUID from super block | 938 | * @uuid: UUID from super block |
938 | * | 939 | * |
939 | * @lhead_lnum: log head logical eraseblock number | 940 | * @lhead_lnum: log head logical eraseblock number |
@@ -966,6 +967,7 @@ struct ubifs_debug_info; | |||
966 | * recovery) | 967 | * recovery) |
967 | * @bulk_read: enable bulk-reads | 968 | * @bulk_read: enable bulk-reads |
968 | * @default_compr: default compression algorithm (%UBIFS_COMPR_LZO, etc) | 969 | * @default_compr: default compression algorithm (%UBIFS_COMPR_LZO, etc) |
970 | * @rw_incompat: the media is not R/W compatible | ||
969 | * | 971 | * |
970 | * @tnc_mutex: protects the Tree Node Cache (TNC), @zroot, @cnext, @enext, and | 972 | * @tnc_mutex: protects the Tree Node Cache (TNC), @zroot, @cnext, @enext, and |
971 | * @calc_idx_sz | 973 | * @calc_idx_sz |
@@ -1179,6 +1181,7 @@ struct ubifs_info { | |||
1179 | unsigned long long cmt_no; | 1181 | unsigned long long cmt_no; |
1180 | spinlock_t cnt_lock; | 1182 | spinlock_t cnt_lock; |
1181 | int fmt_version; | 1183 | int fmt_version; |
1184 | int ro_compat_version; | ||
1182 | unsigned char uuid[16]; | 1185 | unsigned char uuid[16]; |
1183 | 1186 | ||
1184 | int lhead_lnum; | 1187 | int lhead_lnum; |
@@ -1207,6 +1210,7 @@ struct ubifs_info { | |||
1207 | unsigned int no_chk_data_crc:1; | 1210 | unsigned int no_chk_data_crc:1; |
1208 | unsigned int bulk_read:1; | 1211 | unsigned int bulk_read:1; |
1209 | unsigned int default_compr:2; | 1212 | unsigned int default_compr:2; |
1213 | unsigned int rw_incompat:1; | ||
1210 | 1214 | ||
1211 | struct mutex tnc_mutex; | 1215 | struct mutex tnc_mutex; |
1212 | struct ubifs_zbranch zroot; | 1216 | struct ubifs_zbranch zroot; |