Date: Mon, 11 Jul 2011 05:16:13 +0000 (UTC) From: Kirk McKusick <mckusick@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r223918 - stable/8/sys/ufs/ffs Message-ID: <201107110516.p6B5GDdY076670@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201107110516.p6B5GDdY076670>