[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <E9EB058B-97B5-4CF8-951E-48258E1754BD@dilger.ca>
Date: Thu, 10 Feb 2011 13:50:14 -0800
From: Andreas Dilger <adilger@...ger.ca>
To: Tao Ma <tm@....ma>
Cc: "linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>,
Andreas Dilger <adilger.kernel@...ger.ca>,
Lukas Czerner <lczerner@...hat.com>
Subject: Re: [PATCH 4/4 v2] ext4: Speed up FITRIM by recording flags in ext4_group_info.
On 2011-02-09, at 23:33, Tao Ma <tm@....ma> wrote:
> After I delete some big image files and re-run the trim,
> it is still much faster than iterating the whole disk.
> /dev/sdb2 108G 25G 78G 24% /mnt/ext4
>
> [root@...u-tm test]# time ./ftrim /mnt/ext4/a
> real 0m0.513s
> user 0m0.000s
> sys 0m0.069s
Excellent results.
> +#define EXT4_GROUP_INFO_NEED_INIT_BIT 0
> +#define EXT4_GROUP_INFO_WAS_TRIMMED_BIT 1
>
> #define EXT4_MB_GRP_NEED_INIT(grp) \
> (test_bit(EXT4_GROUP_INFO_NEED_INIT_BIT, &((grp)->bb_state)))
> +#define EXT4_MB_GRP_HAS_BEEN_TRIMMED(grp) \
For consistency, it would be better to call this:
EXT4_MB_GRP_WAS_TRIMMED(grp)
And also add and use:
EXT4_MB_GRP_SET_TRIMMED(grp)
And
EXT4_MB_GRP_CLEAR_TRIMMED(grp)
>
In the code. Then you can add Reviewed-by: on this patch.
Cheers, Andreas
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists