diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-19 12:26:29 -0500 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-12-23 05:23:29 -0500 |
commit | af14a1ad792621942a03e4bd0e5f17b6e177e2e0 (patch) | |
tree | b91e77a8a1a373ca3dfcc84ec0feb243fb74e2e5 /fs/ubifs/ubifs.h | |
parent | d3cf502b6ccee1c52890d42cd18cbc98b7526126 (diff) |
UBIFS: fix available blocks count
Take into account that 2 eraseblocks are never available because
they are reserved for the index. This gives more realistic count
of FS blocks.
To avoid future confusions like this, introduce a constant.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/ubifs.h')
-rw-r--r-- | fs/ubifs/ubifs.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/ubifs/ubifs.h b/fs/ubifs/ubifs.h index f8ef7c1def1f..543e850022eb 100644 --- a/fs/ubifs/ubifs.h +++ b/fs/ubifs/ubifs.h | |||
@@ -63,6 +63,14 @@ | |||
63 | #define SQNUM_WARN_WATERMARK 0xFFFFFFFF00000000ULL | 63 | #define SQNUM_WARN_WATERMARK 0xFFFFFFFF00000000ULL |
64 | #define SQNUM_WATERMARK 0xFFFFFFFFFF000000ULL | 64 | #define SQNUM_WATERMARK 0xFFFFFFFFFF000000ULL |
65 | 65 | ||
66 | /* | ||
67 | * Minimum amount of LEBs reserved for the index. At present the index needs at | ||
68 | * least 2 LEBs: one for the index head and one for in-the-gaps method (which | ||
69 | * currently does not cater for the index head and so excludes it from | ||
70 | * consideration). | ||
71 | */ | ||
72 | #define MIN_INDEX_LEBS 2 | ||
73 | |||
66 | /* Minimum amount of data UBIFS writes to the flash */ | 74 | /* Minimum amount of data UBIFS writes to the flash */ |
67 | #define MIN_WRITE_SZ (UBIFS_DATA_NODE_SZ + 8) | 75 | #define MIN_WRITE_SZ (UBIFS_DATA_NODE_SZ + 8) |
68 | 76 | ||