Author: kib Date: Sat Jan 5 21:42:14 2013 New Revision: 245072 URL: http://svnweb.freebsd.org/changeset/base/245072
Log: Do not round up the size of the UFS filesystem to the fragment size when comparing its size with the size of the media, to determine if the last disk block is unused. Submitted by: Andreas Longwitz <[email protected]> Reviewed by: pjd MFC after: 2 weeks Modified: head/sbin/geom/class/journal/geom_journal_ufs.c Modified: head/sbin/geom/class/journal/geom_journal_ufs.c ============================================================================== --- head/sbin/geom/class/journal/geom_journal_ufs.c Sat Jan 5 21:05:16 2013 (r245071) +++ head/sbin/geom/class/journal/geom_journal_ufs.c Sat Jan 5 21:42:14 2013 (r245072) @@ -70,9 +70,9 @@ g_journal_ufs_using_last_sector(const ch fs = read_superblock(prov); if (fs == NULL) return (0); - /* 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); + /* Provider size in 512 bytes blocks. */ + psize = g_get_mediasize(prov) / DEV_BSIZE; + /* File system size in 512 bytes blocks. */ + fssize = fsbtodb(fs, fs->fs_size); + return (psize <= fssize); } _______________________________________________ [email protected] mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "[email protected]"
