aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-22 04:21:03 -0500
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-31 07:13:24 -0500
commit2edc2025c2583a18eafe5cdbc7deb36e320aaec5 (patch)
treecc722c03e8989ea09341d361a513661629dc9246 /fs
parent6edbfafda682b30ad984964cc432da6fa1c8fab5 (diff)
UBIFS: do not lie about used blocks
Do not force UBIFS return 0 used space when it is empty. It leads to a situation when creating any file immediately produces tens of used blocks, which looks very weird. It is better to be honest and say that some blocks are used even if the FS is empty. And ext2 does the same. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ubifs/budget.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/fs/ubifs/budget.c b/fs/ubifs/budget.c
index 44cff803171a..3715d0114952 100644
--- a/fs/ubifs/budget.c
+++ b/fs/ubifs/budget.c
@@ -766,16 +766,6 @@ long long ubifs_get_free_space(struct ubifs_info *c)
766 min_idx_lebs = c->min_idx_lebs; 766 min_idx_lebs = c->min_idx_lebs;
767 ubifs_assert(min_idx_lebs == ubifs_calc_min_idx_lebs(c)); 767 ubifs_assert(min_idx_lebs == ubifs_calc_min_idx_lebs(c));
768 outstanding = c->budg_data_growth + c->budg_dd_growth; 768 outstanding = c->budg_data_growth + c->budg_dd_growth;
769
770 /*
771 * Force the amount available to the total size reported if the used
772 * space is zero.
773 */
774 if (c->lst.total_used <= UBIFS_INO_NODE_SZ && !outstanding) {
775 spin_unlock(&c->space_lock);
776 return (long long)c->block_cnt << UBIFS_BLOCK_SHIFT;
777 }
778
779 available = ubifs_calc_available(c, min_idx_lebs); 769 available = ubifs_calc_available(c, min_idx_lebs);
780 770
781 /* 771 /*