On Wed, Nov 25, 2015 at 12:01:49AM +0100, Christoph Anton Mitterer wrote:
> On Tue, 2015-11-24 at 22:33 +0000, Hugo Mills wrote:
> > whereas a read-only mount of a journalling FS _must_ modify the disk
> > data after an unclean shitdown, in order to be useful (because the FS
> > isn't consistent without the journal replay).
> I've always considered that rather a bug,... or at least a very
> annoying handling in ext*
> If I specify "read-only" than nothing should ever be written.
> If that's not possible because of an unclean shutdown and a journal
> that needs to be replayed, the mount should (without any further
> special option) rather fail then mount it pseudo-read-only.

   At one point, I _think_, btrfs did replay the log tree
unconditionally, even on a RO mount, but it doesn't any more. There
was certainly some discussion on the point. It's actually quite handy
sometimes -- if you have a corrupt log tree, you can check it by
mounting RO (when it works) and RW (when it fails because the log tree
is broken), and the do btrfs-zero-log to clear it.

   For the record, this is about the only good use for btrfs-zero-log.
It doesn't magically fix anything else. (Yes, this is another futile
attempt at killing the persistent "btrfs-zero-log fixes everything"
meme that's been doing the rounds for the last few years).

   Hugo.

-- 
Hugo Mills             | Never underestimate the bandwidth of a Volvo filled
hugo@... carfax.org.uk | with backup tapes.
http://carfax.org.uk/  |
PGP: E2AB1DE4          |

Attachment: signature.asc
Description: Digital signature

Reply via email to