found 612809 btrfs-tools/0.19+20101101-1
quit

Hi,

Alan Chandler wrote:

> This bug seems to have got a whole lot worse by the last upgrade to my
> system because now I am thrown into maintenance mode with root mounted
> read-only.

Ran into this today (in a VM I hadn't upgraded for a while); looks
like it was caused by

  * Removing fsck.btrfs symlink to circumvent that btrfsck doesn't
    support -a.

in version 0.19-11.  Which makes sense --- btrfsck doesn't know how to
repair filesystems with guidance from the user yet, so it certainly
can't automatically repair them.

Still, I believe it would be best to allow btrfsck to act as fsck when
the filesystem is not broken.  Would some script along these lines
make sense?

        #!/bin/sh
        # fsck.btrfs - Wrapper for btrfsck to work around the latter's
        # lack of support for "-a".

        shell_quote () {
                # Wrap stdin in single-quotes,
                # quoting embedded single-quotes as '\''.

                sed -e "s/'/'\\\\''/g" \
                    -e "s/.*/'&'/"
        }

        args=
        while test "${1+set}"
        do
                if test "$1" = -a
                then
                        echo >&2 'warning: btrfsck cannot repair filesystem 
corruption!'
                else
                        args="$args $(printf "%s\n" "$1" | shell_quote)"
                fi
                shift
        done
        eval "exec btrfsck $args"

Thanks,
Jonathan



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to