Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jul 2017 07:11:29 +0000 (UTC)
From:      Konstantin Belousov <kib@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r321040 - head/sys/ufs/ffs
Message-ID:  <201707160711.v6G7BTa4010300@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kib
Date: Sun Jul 16 07:11:29 2017
New Revision: 321040
URL: https://svnweb.freebsd.org/changeset/base/321040

Log:
  A followup to r320453, correct removal of the blocks from UFS snapshots.
  
  Tested by:	pho
  PR:    220693
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/sys/ufs/ffs/ffs_alloc.c

Modified: head/sys/ufs/ffs/ffs_alloc.c
==============================================================================
--- head/sys/ufs/ffs/ffs_alloc.c	Sun Jul 16 00:25:00 2017	(r321039)
+++ head/sys/ufs/ffs/ffs_alloc.c	Sun Jul 16 07:11:29 2017	(r321040)
@@ -2603,7 +2603,8 @@ ffs_getcg(fs, devvp, cg, bpp, cgpp)
 
 	*bpp = NULL;
 	*cgpp = NULL;
-	error = bread(devvp, fsbtodb(fs, cgtod(fs, cg)),
+	error = bread(devvp, devvp->v_type == VREG ?
+	    fragstoblks(fs, cgtod(fs, cg)) : fsbtodb(fs, cgtod(fs, cg)),
 	    (int)fs->fs_cgsize, NOCRED, &bp);
 	if (error != 0)
 		return (error);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201707160711.v6G7BTa4010300>