Bug 237659 - RFE: add -r option to losetup to create a read-only loop
RFE: add -r option to losetup to create a read-only loop
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: util-linux (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karel Zak
Ben Levenson
: Reopened
Depends On: 211749
  Show dependency treegraph
Reported: 2007-04-24 11:30 EDT by Daniel Berrange
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2007-0561
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-11-07 11:37:20 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2007-04-24 11:30:59 EDT
+++ This bug was initially created as a clone of Bug #211749 +++

Current losetup supports creating RO loops: the set_loop has an argument that
requests and returns the open mode, and the function also checks if the
filesystem the file resides on is mounted read-only.

But there is no way to specify the RO mode from the command line. The attached
patch adds a new -r option.

-- Additional comment from l_rocha@yahoo.com on 2006-10-21 15:09 EST --
Created an attachment (id=139067)
patch adding -r option to losetup

-- Additional comment from kzak@redhat.com on 2006-11-01 09:11 EST --
FC6 seems like better target for this feature. Thanks for your patch.
Comment 1 Daniel Berrange 2007-04-24 11:33:46 EDT
The -r  capability is needed by Xen to allow us to attach a read-only ISO image
from a read-write NFS share to a local loop device. Without the -r option,
losetup fails with -EACCESS. The -r flag is already supported in Fedora Core 6 /
Fedora 7 and thus we're using it in Fedora Xen block device hotplug scripts.
Comment 2 Karel Zak 2007-04-24 14:39:38 EDT
The patch is very small and not invasive.
Comment 3 RHEL Product and Program Management 2007-06-05 16:29:54 EDT
This request was evaluated by Red Hat Product Management for
inclusion in a Red Hat Enterprise Linux release.  Since this
bugzilla is in a component that is not approved for the current
release, it has been closed with resolution deferred.  You may
reopen this bugzilla for consideration in the next release.
Comment 4 Daniel Riek 2007-06-05 16:51:43 EDT
Repopening and requesting Exception as this is a dependency for the Xen related
issue in bug 225166.
Comment 9 errata-xmlrpc 2007-11-07 11:37:20 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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