From: Li Zefan <lizf@cn.fujitsu.com>
To: Michael Niederle <mniederle@gmx.at>
Cc: linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: crash when mounting subvolume in a subdirectory
Date: Tue, 07 Dec 2010 09:40:23 +0800 [thread overview]
Message-ID: <4CFD9087.5000503@cn.fujitsu.com> (raw)
In-Reply-To: <20101206232724.4bf1ebfc@simplux>
Michael Niederle wrote:
> Hi!
>
> I'm not sure whether this *should* be possible, but I think it *shouldn't*
> crash:
>
> I created a snapshot of the root directory within a subdirectory:
>
> # mount /dev/sde2 /mnt
> # cd /mnt
> # mkdir save
> # btrfs subvolume snapshot . save/snap1
> # umount /mnt
>
> Then I tried to mount the snapshot:
>
> # mount -o subvol=save/snap1 /dev/sde2 /mnt
>
> This inevitably leads to a segfault in the btrfs-driver crashing the whole
> system. I tried this with kernel versions 2.6.32 and 2.6.37.rc4.
>
> If I create the subvolume within the root directory of the btrfs volume
> everything works fine.
>
> I'm using btrfs for nearly a year by now (since the release of 2.6.32) and am
> using subvolumes within subdirectories since then but never tried to directly
> mount one until today, when my main btrfs volume crashed (by a hardware failure
> or due to a bug in 2.6.36 - I don't know).
>
> If you cannot reproduce this behaviour I can try to send you the kernel log
> (not so easy, because the system crashes and I will have to write it down by
> hand).
It's currently not allowed to mount a subvolume which is not created in
the root directory of the default subvolume, so you should have failed
to mount, but you hit a bug..
I've fixed it, and will send out the patch in minutes.
next prev parent reply other threads:[~2010-12-07 1:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-06 22:27 crash when mounting subvolume in a subdirectory Michael Niederle
2010-12-07 1:40 ` Li Zefan [this message]
2010-12-07 1:44 ` C Anthony Risinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4CFD9087.5000503@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=mniederle@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).