From 922b2d7f7d234ac9e6563b8d5f1db960f075efd6 Mon Sep 17 00:00:00 2001 From: "Matthew L. Creech" Date: Thu, 5 May 2011 16:33:20 -0400 Subject: [PATCH] --- yaml --- r: 250460 b: refs/heads/master c: 9f58d3503a1368673609db1962e4a584261b62eb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/ubifs/debug.c | 2 ++ trunk/fs/ubifs/sb.c | 1 + trunk/fs/ubifs/ubifs-media.h | 2 ++ trunk/fs/ubifs/ubifs.h | 2 ++ 5 files changed, 8 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 2e4f822b8791..d4460a3d8a62 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e11602ea3e43392904db7a579dc990062ebb7151 +refs/heads/master: 9f58d3503a1368673609db1962e4a584261b62eb diff --git a/trunk/fs/ubifs/debug.c b/trunk/fs/ubifs/debug.c index b5ba2ea5b626..f46d77e9f031 100644 --- a/trunk/fs/ubifs/debug.c +++ b/trunk/fs/ubifs/debug.c @@ -316,6 +316,8 @@ void dbg_dump_node(const struct ubifs_info *c, const void *node) printk(KERN_DEBUG "\tflags %#x\n", sup_flags); printk(KERN_DEBUG "\t big_lpt %u\n", !!(sup_flags & UBIFS_FLG_BIGLPT)); + printk(KERN_DEBUG "\t space_fixup %u\n", + !!(sup_flags & UBIFS_FLG_SPACE_FIXUP)); printk(KERN_DEBUG "\tmin_io_size %u\n", le32_to_cpu(sup->min_io_size)); printk(KERN_DEBUG "\tleb_size %u\n", diff --git a/trunk/fs/ubifs/sb.c b/trunk/fs/ubifs/sb.c index cad60b51f7c4..93d69289d6f4 100644 --- a/trunk/fs/ubifs/sb.c +++ b/trunk/fs/ubifs/sb.c @@ -617,6 +617,7 @@ int ubifs_read_superblock(struct ubifs_info *c) c->vfs_sb->s_time_gran = le32_to_cpu(sup->time_gran); memcpy(&c->uuid, &sup->uuid, 16); c->big_lpt = !!(sup_flags & UBIFS_FLG_BIGLPT); + c->space_fixup = !!(sup_flags & UBIFS_FLG_SPACE_FIXUP); /* Automatically increase file system size to the maximum size */ c->old_leb_cnt = c->leb_cnt; diff --git a/trunk/fs/ubifs/ubifs-media.h b/trunk/fs/ubifs/ubifs-media.h index b922f03c31ae..e24380cf46ed 100644 --- a/trunk/fs/ubifs/ubifs-media.h +++ b/trunk/fs/ubifs/ubifs-media.h @@ -408,9 +408,11 @@ enum { * Superblock flags. * * UBIFS_FLG_BIGLPT: if "big" LPT model is used if set + * UBIFS_FLG_SPACE_FIXUP: first-mount "fixup" of free space within LEBs needed */ enum { UBIFS_FLG_BIGLPT = 0x02, + UBIFS_FLG_SPACE_FIXUP = 0x04, }; /** diff --git a/trunk/fs/ubifs/ubifs.h b/trunk/fs/ubifs/ubifs.h index a2f9d4e3519f..8e27553e9655 100644 --- a/trunk/fs/ubifs/ubifs.h +++ b/trunk/fs/ubifs/ubifs.h @@ -1014,6 +1014,7 @@ struct ubifs_debug_info; * @cmt_wq: wait queue to sleep on if the log is full and a commit is running * * @big_lpt: flag that LPT is too big to write whole during commit + * @space_fixup: flag indicating that free space in LEBs needs to be cleaned up * @no_chk_data_crc: do not check CRCs when reading data nodes (except during * recovery) * @bulk_read: enable bulk-reads @@ -1253,6 +1254,7 @@ struct ubifs_info { wait_queue_head_t cmt_wq; unsigned int big_lpt:1; + unsigned int space_fixup:1; unsigned int no_chk_data_crc:1; unsigned int bulk_read:1; unsigned int default_compr:2;