Bug 517650

Summary: ext4 allows ro->rw transitions of filesystems w/ features that can't be mounted rw
Product: Red Hat Enterprise Linux 6 Reporter: Eric Sandeen <esandeen>
Component: kernelAssignee: Eric Sandeen <esandeen>
Status: CLOSED CURRENTRELEASE QA Contact: Igor Zhang <yugzhang>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0CC: dwu, snagar, yugzhang
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: kernel-2.6.32-1.el6 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-15 14:24:27 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:

Description Eric Sandeen 2009-08-15 16:44:39 UTC
Many checks in ext4_fill_super are checking for ro-compat features etc - for example, HUGE_FILES filesystems are denied rw mounts on a 32-bit box w/o LBD.

However, these tests aren't enforced on a ro->rw remount transition.  This could potentially be bad, esp. as the normal boot process does a remount in this manner.

The tests probably need to be moved to a separate helper function that can be called by both the mount & remount paths.  And in any case, ext4_fill_super could use some refactoring at 676 lines.

Comment 2 Eric Sandeen 2009-08-16 22:10:46 UTC
Sent a patch upstream for this:

http://marc.info/?l=linux-ext4&m=125045416001117&w=2

Comment 3 Eric Sandeen 2009-09-25 15:35:16 UTC
Upstream now:

commit a13fb1a4533f26c1e2b0204d5283b696689645af
Author: Eric Sandeen <sandeen>
Date:   Tue Aug 18 00:20:23 2009 -0400

    ext4: Add feature set check helper for mount & remount paths
    
    A user reported that although his root ext4 filesystem was mounting
    fine, other filesystems would not mount, with the:
    
    "Filesystem with huge files cannot be mounted RDWR without CONFIG_LBDAF"
    
    error on his 32-bit box built without CONFIG_LBDAF.  This is because
    the test at mount time for this situation was not being re-checked
    on remount, and the normal boot process makes an ro->rw transition,
    so this was being missed.
    
    Refactor to make a common helper function to test the filesystem
    features against the type of mount request (RO vs. RW) so that we
    stay consistent.
    
    Addresses Red-Hat-Bugzilla: #517650
    
    Signed-off-by: Eric Sandeen <sandeen>
    Signed-off-by: "Theodore Ts'o" <tytso>

Comment 4 Eric Sandeen 2009-12-01 22:59:10 UTC
The patch in comment #3 is in 2.6.32, so setting MODIFIED.

Comment 6 Igor Zhang 2010-09-30 08:59:01 UTC
Sanity Check in kernel-2.6.32-73.el6 and the code is there actually.

Comment 7 releng-rhel@redhat.com 2010-11-15 14:24:27 UTC
Red Hat Enterprise Linux 6.0 is now available and should resolve
the problem described in this bug report. This report is therefore being closed
with a resolution of CURRENTRELEASE. You may reopen this bug report if the
solution does not work for you.