diff options
author | Matthew L. Creech <mlcreech@gmail.com> | 2011-05-05 16:33:20 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2011-05-16 07:12:14 -0400 |
commit | 9f58d3503a1368673609db1962e4a584261b62eb (patch) | |
tree | 9b31f7f6f6c8513d80b5e807f029d225c9be9b25 /fs/ubifs/ubifs.h | |
parent | e11602ea3e43392904db7a579dc990062ebb7151 (diff) |
UBIFS: add a superblock flag for free space fix-up
The 'space_fixup' flag can be set in the superblock of a new filesystem by
mkfs.ubifs to indicate that any eraseblocks with free space remaining should be
fixed-up the first time it's mounted (after which the flag is un-set). This
means that the UBIFS image has been flashed by a "dumb" flasher and the free
space has been actually programmed (writing all 0xFFs), so this free space
cannot be used. UBIFS fixes the free space up by re-writing the contents of all
LEBs with free space using the atomic LEB change UBI operation.
Artem: improved commit message, add some more commentaries to the code.
Signed-off-by: Matthew L. Creech <mlcreech@gmail.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index a2f9d4e3519f..8e27553e9655 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -1014,6 +1014,7 @@ struct ubifs_debug_info; | |||
1014 | * @cmt_wq: wait queue to sleep on if the log is full and a commit is running | 1014 | * @cmt_wq: wait queue to sleep on if the log is full and a commit is running |
1015 | * | 1015 | * |
1016 | * @big_lpt: flag that LPT is too big to write whole during commit | 1016 | * @big_lpt: flag that LPT is too big to write whole during commit |
1017 | * @space_fixup: flag indicating that free space in LEBs needs to be cleaned up | ||
1017 | * @no_chk_data_crc: do not check CRCs when reading data nodes (except during | 1018 | * @no_chk_data_crc: do not check CRCs when reading data nodes (except during |
1018 | * recovery) | 1019 | * recovery) |
1019 | * @bulk_read: enable bulk-reads | 1020 | * @bulk_read: enable bulk-reads |
@@ -1253,6 +1254,7 @@ struct ubifs_info { | |||
1253 | wait_queue_head_t cmt_wq; | 1254 | wait_queue_head_t cmt_wq; |
1254 | 1255 | ||
1255 | unsigned int big_lpt:1; | 1256 | unsigned int big_lpt:1; |
1257 | unsigned int space_fixup:1; | ||
1256 | unsigned int no_chk_data_crc:1; | 1258 | unsigned int no_chk_data_crc:1; |
1257 | unsigned int bulk_read:1; | 1259 | unsigned int bulk_read:1; |
1258 | unsigned int default_compr:2; | 1260 | unsigned int default_compr:2; |