diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-08-22 11:23:22 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2008-08-31 10:21:40 -0400 |
commit | 9bbb5726efb64e2cfed42f6eec07db80cd87e63b (patch) | |
tree | e7c0a28fff531ef34bb35448479e6bbcaeffe1f9 /fs/ubifs/super.c | |
parent | 131130b9a1e6e523c64b34137b14f88ae1382a6a (diff) |
UBIFS: introduce LEB overhead
This is a preparational patch for the following statfs()
report fix.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r-- | fs/ubifs/super.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index 1018053519e6..be23fd3cfd84 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -530,6 +530,12 @@ static int init_constants_early(struct ubifs_info *c) | |||
530 | c->dead_wm = ALIGN(MIN_WRITE_SZ, c->min_io_size); | 530 | c->dead_wm = ALIGN(MIN_WRITE_SZ, c->min_io_size); |
531 | c->dark_wm = ALIGN(UBIFS_MAX_NODE_SZ, c->min_io_size); | 531 | c->dark_wm = ALIGN(UBIFS_MAX_NODE_SZ, c->min_io_size); |
532 | 532 | ||
533 | /* | ||
534 | * Calculate how many bytes would be wasted at the end of LEB if it was | ||
535 | * fully filled with data nodes of maximum size. This is used in | ||
536 | * calculations when reporting free space. | ||
537 | */ | ||
538 | c->leb_overhead = c->leb_size % UBIFS_MAX_DATA_NODE_SZ; | ||
533 | return 0; | 539 | return 0; |
534 | } | 540 | } |
535 | 541 | ||