[Midnightbsd-cvs] src [8639] trunk/sbin/geom/class/journal/geom_journal_ufs.c: do not round up the size of the UFS filesystem to the fragment size when comparing tis size with the size of the media to determine if the last block is unused.

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sun Sep 25 14:17:36 EDT 2016


Revision: 8639
          http://svnweb.midnightbsd.org/src/?rev=8639
Author:   laffer1
Date:     2016-09-25 14:17:36 -0400 (Sun, 25 Sep 2016)
Log Message:
-----------
do not round up the size of the UFS filesystem to the fragment size when comparing tis size with the size of the media to determine if the last block is unused.

Modified Paths:
--------------
    trunk/sbin/geom/class/journal/geom_journal_ufs.c

Modified: trunk/sbin/geom/class/journal/geom_journal_ufs.c
===================================================================
--- trunk/sbin/geom/class/journal/geom_journal_ufs.c	2016-09-25 18:16:04 UTC (rev 8638)
+++ trunk/sbin/geom/class/journal/geom_journal_ufs.c	2016-09-25 18:17:36 UTC (rev 8639)
@@ -73,6 +73,6 @@
 	/* Provider size in 512 bytes blocks. */
 	psize = g_get_mediasize(prov) / DEV_BSIZE;
 	/* File system size in 512 bytes blocks. */
-	fssize = fsbtodb(fs, dbtofsb(fs, psize));
-	return (psize == fssize);
+	fssize = fsbtodb(fs, fs->fs_size);
+	return (psize <= fssize);
 }



More information about the Midnightbsd-cvs mailing list