From: Stanislav Brabec <sbrabec@suse.cz>
To: Al Viro <viro@ZenIV.linux.org.uk>,
"Austin S. Hemmelgarn" <ahferroin7@gmail.com>
Cc: linux-kernel@vger.kernel.org, Jens Axboe <axboe@kernel.dk>,
Btrfs BTRFS <linux-btrfs@vger.kernel.org>,
David Sterba <dsterba@suse.cz>,
Valdis.Kletnieks@vt.edu
Subject: Re: loop subsystem corrupted after mounting multiple btrfs sub-volumes
Date: Tue, 12 Apr 2016 20:38:26 +0200 [thread overview]
Message-ID: <570D40A2.7030209@suse.cz> (raw)
In-Reply-To: <20160226203010.GD17997@ZenIV.linux.org.uk>
On Feb 26, 2016 at 21:30 Al Viro wrote:
> Sigh... sys_mount() (mount_bdev(), actually) has no way to tell if two
> loop devices refer to the same underlying object. As far as it's
> concerned, you are asking to mount a completely unrelated block device.
> Which just happens to see the data (living in separate pagecache, even)
> modified behind its back (with some delay) after it gets written to another
> device. Filesystem drivers generally don't like when something is screwing
> the underlying data, to put it mildly...
>
I wrote a loop device reuse patch for mount -oloop.
[PATCH 0/3] btrfs-safe implementation of -oloop
http://marc.info/?l=util-linux-ng&m=146048532307963&w=2
[PATCH 1/3] libmount: Re-organize is_mounted_same_loopfile()
http://marc.info/?l=util-linux-ng&m=146048535907971&w=2
[PATCH 2/3] libmount: reuse existing loop device
http://marc.info/?l=util-linux-ng&m=146048537807980&w=2
[PATCH 3/3] mount: Handle EROFS before calling mount() syscall
http://marc.info/?l=util-linux-ng&m=146048542007990&w=2
However it works for me, there are still some controversial issues
described in [PATCH 0/3].
These patches will hide corruption of kernel loop control structures
mentioned earlier in this thread and in most cases prevent data
corruption.
--
Best Regards / S pozdravem,
Stanislav Brabec
software developer
---------------------------------------------------------------------
SUSE LINUX, s. r. o. e-mail: sbrabec@suse.com
Lihovarská 1060/12 tel: +49 911 7405384547
190 00 Praha 9 fax: +420 284 084 001
Czech Republic http://www.suse.cz/
PGP: 830B 40D5 9E05 35D8 5E27 6FA3 717C 209F A04F CD76
next prev parent reply other threads:[~2016-04-12 18:38 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <56CF5490.7040102@suse.cz>
2016-02-26 12:33 ` loop subsystem corrupted after mounting multiple btrfs sub-volumes Austin S. Hemmelgarn
2016-02-26 15:50 ` Stanislav Brabec
2016-02-26 16:39 ` Austin S. Hemmelgarn
2016-02-26 17:07 ` Stanislav Brabec
2016-02-26 18:22 ` Austin S. Hemmelgarn
2016-02-26 19:31 ` Stanislav Brabec
2016-02-26 17:53 ` Al Viro
2016-02-26 19:12 ` Stanislav Brabec
2016-02-26 20:05 ` Austin S. Hemmelgarn
2016-02-26 20:30 ` Al Viro
2016-02-26 20:36 ` Austin S. Hemmelgarn
2016-02-26 21:00 ` Stanislav Brabec
2016-02-26 22:00 ` Valdis.Kletnieks
2016-02-29 14:56 ` Stanislav Brabec
2016-03-01 13:44 ` Ming Lei
2016-04-12 18:38 ` Stanislav Brabec [this message]
2016-02-26 20:37 ` Stanislav Brabec
2016-02-26 21:03 ` Al Viro
2016-02-26 21:36 ` Stanislav Brabec
2016-02-26 21:45 ` Al Viro
2016-02-29 13:11 ` Austin S. Hemmelgarn
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=570D40A2.7030209@suse.cz \
--to=sbrabec@suse.cz \
--cc=Valdis.Kletnieks@vt.edu \
--cc=ahferroin7@gmail.com \
--cc=axboe@kernel.dk \
--cc=dsterba@suse.cz \
--cc=linux-btrfs@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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).