From: David Chinner <dgc@sgi.com>
To: lkml <linux-kernel@vger.kernel.org>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: [BUG] remount ro on loopback mount leaves unmountable filesystem behind
Date: Tue, 13 May 2008 18:50:47 +1000 [thread overview]
Message-ID: <20080513085047.GY155679365@sgi.com> (raw)
The following steps will leave an unmountable filesystem
behind. This test "works" using ext3 or XFS. XFS version is
as follows replacing steps with ext3 specific commands results
in the same unmountable filesystem problem:
$ mount -t xfs /dev/sdb6 /mnt/scratch
$ mkdir /mnt/scratch/mnt
$ touch /mnt/scratch/img
$ mkfs.xfs -f -d file,name=/mnt/scratch/img,size=1g
$ mount -t xfs -o loop /mnt/scratch/img /mnt/scratch/mnt
All normal up to here. I can unmount everything just fine.
$ umount /mnt/scratch/mnt
$ umount /mnt/scratch
$
Same thing, but remounting the loop filesystem readonly
before unmounting:
$ mount -t xfs /dev/sdb6 /mnt/scratch
$ mkdir /mnt/scratch/mnt
$ touch /mnt/scratch/img
$ mkfs.xfs -f -d file,name=/mnt/scratch/img,size=1g
$ mount -t xfs -o loop /mnt/scratch/img /mnt/scratch/mnt
$ mount -t xfs -o remount,ro /mnt/scratch/img /mnt/scratch/mnt
$ umount /mnt/scratch/mnt
$ umount /mnt/scratch
umount: /mnt/scratch: device is busy
umount: /mnt/scratch: device is busy
$
At this point /mnt/scratch is unmountable. lsof shows no open
references to the filesytem, so it would seem to be a reference
count leak somewhere....
Reproduced on 2.6.25-rc3 on ia64 and x86_64, and UML on
2.6.26-pre-rc1. Found when changing XFSQA test 073 to host
loopback images and mounts mounts on something other than /tmp.
Cheers,
Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group
next reply other threads:[~2008-05-13 8:51 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-13 8:50 David Chinner [this message]
2008-05-13 10:23 ` [BUG] remount ro on loopback mount leaves unmountable filesystem behind Christoph Hellwig
2008-05-13 12:07 ` David Chinner
2008-05-13 12:42 ` Christoph Hellwig
2008-05-13 17:10 ` H. Peter Anvin
2008-05-13 22:55 ` Karel Zak
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=20080513085047.GY155679365@sgi.com \
--to=dgc@sgi.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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