Bug 237659

Summary: RFE: add -r option to losetup to create a read-only loop
Product: Red Hat Enterprise Linux 5 Reporter: Daniel Berrangé <berrange>
Component: util-linuxAssignee: Karel Zak <kzak>
Status: CLOSED ERRATA QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.0CC: konradr
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: RHBA-2007-0561 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-11-07 16:37:20 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 211749    
Bug Blocks:    

Description Daniel Berrangé 2007-04-24 15:30:59 UTC
+++ 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 on 2006-10-21 15:09 EST --
Created an attachment (id=139067)
patch adding -r option to losetup


-- Additional comment from kzak on 2006-11-01 09:11 EST --
FC6 seems like better target for this feature. Thanks for your patch.

Comment 1 Daniel Berrangé 2007-04-24 15:33:46 UTC
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 18:39:38 UTC
The patch is very small and not invasive.

Comment 3 RHEL Program Management 2007-06-05 20:29:54 UTC
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 20:51:43 UTC
Repopening and requesting Exception as this is a dependency for the Xen related
issue in bug 225166.

Comment 9 errata-xmlrpc 2007-11-07 16:37:20 UTC
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.

http://rhn.redhat.com/errata/RHBA-2007-0561.html