On Wed 04-08-10 15:44:35, Lukas Czerner wrote: > Walk through each allocation group and trim all free extents. It can be > invoked through TRIM ioctl on the file system. The main idea is to > provide a way to trim the whole file system if needed, since some SSD's > may suffer from performance loss after the whole device was filled (it > does not mean that fs is full!). > > It search fro free extents in each allocation group. When the free > extent is found, blocks are marked as used in the buddy bitmap and then > trimmed. Afterwards these blocks are marked as free in per-group buddy > bitmap. > > Since fstrim is a long operation it is good to have an ability to interrupt > it by a signal. This was added by Dmitry Monakhov. Thanks Dimitry. > > Signed-off-by: Lukas Czerner <lczerner@xxxxxxxxxx> > Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx> This patch looks OK as well. Just one question: > + ret = sb_issue_discard(sb, discard_block, count); > + if (ret == EOPNOTSUPP) { ^^ Here should be -EOPNOTSUPP, or generally a check that ret < 0 would be better as -EIO or so can be returned as well. The same comment actually applies for the ext3 patch. Honza -- Jan Kara <jack@xxxxxxx> SUSE Labs, CR -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html