svn commit: r223918 - stable/8/sys/ufs/ffs
Kirk McKusick
mckusick at FreeBSD.org
Mon Jul 11 05:16:13 UTC 2011
Author: mckusick
Date: Mon Jul 11 05:16:12 2011
New Revision: 223918
URL: http://svn.freebsd.org/changeset/base/223918
Log:
MFC r223902:
When first creating snapshots, we may free some blocks within it.
These blocks should not have TRIM applied to them.
Submitted by: Kostik Belousov
Modified:
stable/8/sys/ufs/ffs/ffs_alloc.c
Modified: stable/8/sys/ufs/ffs/ffs_alloc.c
==============================================================================
--- stable/8/sys/ufs/ffs/ffs_alloc.c Sun Jul 10 23:47:03 2011 (r223917)
+++ stable/8/sys/ufs/ffs/ffs_alloc.c Mon Jul 11 05:16:12 2011 (r223918)
@@ -2032,7 +2032,11 @@ ffs_blkfree(ump, fs, devvp, bno, size, i
ffs_snapblkfree(fs, devvp, bno, size, inum)) {
return;
}
- if (!ump->um_candelete) {
+ /*
+ * Nothing to delay if TRIM is disabled, or the operation is
+ * performed on the snapshot.
+ */
+ if (!ump->um_candelete || devvp->v_type == VREG) {
ffs_blkfree_cg(ump, fs, devvp, bno, size, inum);
return;
}
More information about the svn-src-stable-8
mailing list