From patchwork Thu Dec 1 07:00:52 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Set the initial TRIM information as TRIMMED From: Kyungmin Park X-Patchwork-Id: 128648 Message-Id: <20111201070052.GA29708@july> To: tytso@mit.edu, tm@tao.ma Cc: linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 01 Dec 2011 16:00:52 +0900 From: Kyungmin Park Now trim information doesn't stored at disk so every boot time. it's cleared. and do the trim all disk groups. But assume that it's already trimmed at previous time so don't need to trim it again. So set the intial state as trimmed. Signed-off-by: Kyungmin Park --- -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/ext4/mballoc.c b/fs/ext4/mballoc.c index e2d8be8..97ef342 100644 --- a/fs/ext4/mballoc.c +++ b/fs/ext4/mballoc.c @@ -1098,6 +1098,12 @@ int ext4_mb_init_group(struct super_block *sb, ext4_group_t group) goto err; } mark_page_accessed(page); + + /* + * TRIM information is not stored at disk so set the initial + * state as trimmed. Since previous time it's already trimmed all + */ + EXT4_MB_GRP_SET_TRIMMED(this_grp); err: ext4_mb_put_buddy_page_lock(&e4b); return ret;