[Bug 228174] [dump] dump(8) can read garbage and loop forever

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Mon May 14 05:07:57 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228174

--- Comment #3 from Kirk McKusick <mckusick at FreeBSD.org> ---
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 finish.
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 added
as they allow consistent and correct dumps to be made on a live system.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-stable mailing list