From: Lukas Czerner Subject: Re: [PATCH] Set the initial TRIM information as TRIMMED Date: Mon, 5 Dec 2011 11:25:38 +0100 (CET) Message-ID: References: <20111201070052.GA29708@july> <4ED7FA81.9090802@redhat.com> Mime-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="8323328-1778763954-1323080742=:4911" Cc: Kyungmin Park , Eric Sandeen , Lukas Czerner , tytso@mit.edu, tm@tao.ma, linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org To: Greg Freemyer Return-path: Received: from mx1.redhat.com ([209.132.183.28]:17396 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755514Ab1LEKZt (ORCPT ); Mon, 5 Dec 2011 05:25:49 -0500 In-Reply-To: Sender: linux-ext4-owner@vger.kernel.org List-ID: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323328-1778763954-1323080742=:4911 Content-Type: TEXT/PLAIN; charset=ISO-8859-1 Content-Transfer-Encoding: 8BIT On Thu, 1 Dec 2011, Greg Freemyer wrote: > On Thu, Dec 1, 2011 at 7:01 PM, Kyungmin Park wrote: > > On 12/2/11, Eric Sandeen wrote: > > > Hi, > > > >> Hm, so if there were freed but un-trimmed blocks at this point, we will > >> never trim them until we free _another_ block in the group, right? ?That > >> might be a reasonable tradeoff, but it is somewhat surprising behavior. > >> > >> i.e. say we do: > >> > >> mount /mnt > >> rm -rf /mnt/very_big_file > >> umount /mnt > > does umount need to force a fitrim if it's available? Please, do not. That will be weird, unexpected and also annoying, because fitrim can take a bit longer depending on the hadrware. So I do not thing doing fitrim at mount/umount time is a good idea. > > >> mount /mnt > >> fitrim /mnt > > That way if umount is clean, then the new logic could kick for the > next mount, but if there was not a clean umount, then in addition to > replaying the journal, the next mount could leave the fitrim info not > initialized. > > I'm sure there are smarter ways to track it. The biggest thing I'm > suggesting is for there to at least be a single boolean "fitrim'ed > state flag for the whole filesystem. that could cleared on mount and > set on a clean umount. The flag makes some sense (if we really need some mechanism like that). But rather than setting it on (mount/umount) time we should set it after the fitrim and clear it after the unlink. Thanks! -Lukas > > Greg > -- > 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 > -- --8323328-1778763954-1323080742=:4911--