When first creating snapshots, we may free some blocks within it.

These blocks should not have TRIM applied to them.

Submitted by: Kostik Belousov
This commit is contained in:
mckusick 2011-07-10 05:34:49 +00:00
parent fd05bc36dc
commit 0196d96292

View File

@ -2038,7 +2038,11 @@ ffs_blkfree(ump, fs, devvp, bno, size, inum, vtype, dephd)
ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) { ffs_snapblkfree(fs, devvp, bno, size, inum, vtype, dephd)) {
return; 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, dephd); ffs_blkfree_cg(ump, fs, devvp, bno, size, inum, dephd);
return; return;
} }