summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/misc.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-07-25 13:38:51 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-08-13 10:37:28 +0200
commitb364b41aeb0289be402be83eebca92eb90bfcb8b (patch)
tree8bec0a45617f30e24b112b66973ac3eac72da834 /fs/ubifs/misc.h
parentUBIFS: print pid in dump function (diff)
downloadlinux-b364b41aeb0289be402be83eebca92eb90bfcb8b.tar.xz
linux-b364b41aeb0289be402be83eebca92eb90bfcb8b.zip
UBIFS: reserve more space for index
At the moment UBIFS reserves twice old index size space for the index. But this is not enough in some cases, because if the indexing node are very fragmented and there are many small gaps, while the dirty index has big znodes - in-the-gaps method would fail. Thus, reserve trise as more, in which case we are guaranteed that we can commit in any case. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs/ubifs/misc.h')
-rw-r--r--fs/ubifs/misc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h
index cd83ffc8101c..87dabf9fe742 100644
--- a/fs/ubifs/misc.h
+++ b/fs/ubifs/misc.h
@@ -308,7 +308,7 @@ static inline long long ubifs_reported_space(const struct ubifs_info *c,
{
int divisor, factor;
- divisor = UBIFS_MAX_DATA_NODE_SZ + (c->max_idx_node_sz << 1);
+ divisor = UBIFS_MAX_DATA_NODE_SZ + (c->max_idx_node_sz * 3);
factor = UBIFS_MAX_DATA_NODE_SZ - UBIFS_DATA_NODE_SZ;
do_div(free, divisor);