From owner-freebsd-fs@freebsd.org Mon May 14 05:07:57 2018 Return-Path: Delivered-To: freebsd-fs@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 2A0FBFCFF21 for ; Mon, 14 May 2018 05:07:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id B04EB742E1 for ; Mon, 14 May 2018 05:07:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 712B7FCFF1F; Mon, 14 May 2018 05:07:56 +0000 (UTC) Delivered-To: fs@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 5D5F6FCFF1D for ; Mon, 14 May 2018 05:07:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E7E6E742C0 for ; Mon, 14 May 2018 05:07:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 3A05C7728 for ; Mon, 14 May 2018 05:07:55 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w4E4v4cx014445 for ; Mon, 14 May 2018 04:57:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w4E4v44K014444 for fs@FreeBSD.org; Mon, 14 May 2018 04:57:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: fs@FreeBSD.org Subject: [Bug 228174] [dump] dump(8) can read garbage and loop forever Date: Mon, 14 May 2018 04:57:04 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: 11.1-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: mckusick@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: stable@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 May 2018 05:07:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D228174 --- Comment #3 from Kirk McKusick --- Taking a snapshot is the same as if you unmounted the filesystem and dumped= it. When you take a snapshot, the following steps are taken: 1) Any new system calls that want to write to the filesystem are suspended. 2) All system calls currently writing to the filesystem are allowed to fini= sh. 3) All dirty blocks are flushed to the filesystem. 4) A snapshot of the fully flushed filesystem is taken. 5) The suspended system calls are awaken, but none of their changes appear = in the snapshot. The dump of the snapshot therefore gets a consistent view of the filesystem. The date of the snapshot is recorded, so that when you later take a level-1 dump (using another snapshot) you get exactlty the changes between the two snapshots. Putting in error checking for every possible inconsistency is a massive undertaking. And the resulting dumps are inconsistent and prone to all sort= of errors when you attempt to restore from them. That is why snapshots were ad= ded as they allow consistent and correct dumps to be made on a live system. --=20 You are receiving this mail because: You are on the CC list for the bug.=