Date: Sat, 5 Jan 2013 21:42:15 +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: r245072 - head/sbin/geom/class/journal Message-ID: <201301052142.r05LgFiZ073905@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 <longwitz@incore.de> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201301052142.r05LgFiZ073905>