Bug 725867 - Can't remount loopback mount read-only
Summary: Can't remount loopback mount read-only
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 15
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-26 19:27 UTC by Daniel Drake
Modified: 2011-08-25 07:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-25 07:40:17 UTC
Type: ---


Attachments (Terms of Use)

Description Daniel Drake 2011-07-26 19:27:47 UTC
In Fedora 14, the test case below worked fine. In Fedora 15, it fails. I think this is due to the change to have /etc/mtab as a symlink to /proc/mounts.

# dd if=/dev/zero of=fs.img bs=1M count=20
# mkfs.ext4 fs.img
# mkdir mountpt
# mount -o loop fs.img mountpt

Now try to remount it read-only:

# mount -o remount,ro mountpt
mount: /home/dsd/tmpdisk/mountpt not mounted already, or bad option

(On Fedora 14 no error was returned and the mount became read-only)

When the error occurs, dmesg says:
[ 5495.860391] EXT4-fs (loop0): Unrecognized mount option "seclabel" or missing value

Here is the corresponding entry from /proc/mounts:
/dev/loop0 /home/dsd/tmpdisk/mountpt ext4 rw,seclabel,relatime,barrier=1,data=ordered 0 0

Digging further, it looks like this was fixed upstream (via bug #676630). Locally, I have added these 2 commits to 2.6.38.8-36.fc15:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=ff36fe2c845cab2102e4826c1ffa0a6ebf487c65
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=026eb167ae77244458fa4b4b9fc171209c079ba7

The resultant scratch-build is here: http://koji.fedoraproject.org/koji/taskinfo?taskID=3231906

I am now running this kernel and can confirm that those 2 commits solve the issue. Please could they be added to the next F15 kernel?

This issue is hit by olpc-os-builder which tries to remount a loopback mount. It would be great to have it fixed. Thanks!

Comment 1 Daniel Drake 2011-08-25 07:40:17 UTC
Now fixed with the 2.6.40 kernel. Thanks!


Note You need to log in before you can comment on or make changes to this bug.