From owner-svn-src-head@freebsd.org Mon Jun 11 20:38:34 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 714451018374; Mon, 11 Jun 2018 20:38:34 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 0E0F97CC56; Mon, 11 Jun 2018 20:38:32 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C221C206AC; Mon, 11 Jun 2018 20:38:31 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w5BKcVWK077702; Mon, 11 Jun 2018 20:38:31 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w5BKcVPc077696; Mon, 11 Jun 2018 20:38:31 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201806112038.w5BKcVPc077696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Mon, 11 Jun 2018 20:38:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r334980 - in head: . sbin/dump X-SVN-Group: head X-SVN-Commit-Author: imp X-SVN-Commit-Paths: in head: . sbin/dump X-SVN-Commit-Revision: 334980 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.26 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Jun 2018 20:38:34 -0000 Author: imp Date: Mon Jun 11 20:38:30 2018 New Revision: 334980 URL: https://svnweb.freebsd.org/changeset/base/334980 Log: Revert size limits. The size limits came from a flawed understanding of dump records. The real issue was that dump was bogusly interpreting c_count sometimes. r334978 fixes that. Modified: head/UPDATING head/sbin/dump/dump.8 head/sbin/dump/main.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Mon Jun 11 20:38:26 2018 (r334979) +++ head/UPDATING Mon Jun 11 20:38:30 2018 (r334980) @@ -32,13 +32,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12.x IS SLOW: "ln -s 'abort:false,junk:false' /etc/malloc.conf".) -20180611: - A bug in dump has been found where it can incorrectly dump filesystems - with more than 512k inodes and produce corrupted dump images. r334968 - closes the door by not dumping filesystems with more than 512k inodes. - While older dumps may 'work' the image they produce may or may not be - readable depending on many factors. - 20180530: The kernel / userland interface for devinfo changed, so you'll need a new kernel and userland as a pair for it to work (rebuilding Modified: head/sbin/dump/dump.8 ============================================================================== --- head/sbin/dump/dump.8 Mon Jun 11 20:38:26 2018 (r334979) +++ head/sbin/dump/dump.8 Mon Jun 11 20:38:30 2018 (r334980) @@ -566,8 +566,3 @@ This will be fixed in a later version of .Fx . Presently, it works if you set it setuid (like it used to be), but this might constitute a security risk. -.Pp -It is not possible to safely dump filesystems that use more than -524288 inodes. -.Nm -refuses to dump any filesystem that has more than 524288 inodes. Modified: head/sbin/dump/main.c ============================================================================== --- head/sbin/dump/main.c Mon Jun 11 20:38:26 2018 (r334979) +++ head/sbin/dump/main.c Mon Jun 11 20:38:30 2018 (r334980) @@ -100,7 +100,7 @@ main(int argc, char *argv[]) struct fstab *dt; char *map, *mntpt; int ch, mode, mntflags; - int i, ret, anydirskipped, c_count, bflag = 0, Tflag = 0, honorlevel = 1; + int i, ret, anydirskipped, bflag = 0, Tflag = 0, honorlevel = 1; int just_estimate = 0; ino_t maxino; char *tmsg; @@ -452,9 +452,6 @@ main(int argc, char *argv[]) quit("TP_BSIZE (%d) is not a power of 2", TP_BSIZE); maxino = sblock->fs_ipg * sblock->fs_ncg; mapsize = roundup(howmany(maxino, CHAR_BIT), TP_BSIZE); - c_count = howmany(mapsize * sizeof(char), TP_BSIZE); - if (c_count > TP_NINDIR) - quit("fs is too large for dump!"); usedinomap = (char *)calloc((unsigned) mapsize, sizeof(char)); dumpdirmap = (char *)calloc((unsigned) mapsize, sizeof(char)); dumpinomap = (char *)calloc((unsigned) mapsize, sizeof(char));