Bug 845311

Summary: mkfs.ext3 should be able to set ext_attr feature
Product: Red Hat Enterprise Linux 5 Reporter: Eryu Guan <eguan>
Component: e2fsprogsAssignee: Eric Sandeen <esandeen>
Status: CLOSED NOTABUG QA Contact: Eryu Guan <eguan>
Severity: low Docs Contact:
Priority: low    
Version: 5.9CC: sct
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-02 17:05:26 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Eryu Guan 2012-08-02 15:45:50 UTC
Description of problem:

(I'm not sure if it's really a bug)

mkfs.ext3 couldn't set ext_attr feature flag at mkfs time, but mkfs.ext4 could

[root@ibm-x3550m3-06 mount]# mkfs -t ext3 -O ext_attr /dev/sdb1
mke2fs 1.39 (29-May-2006)
Invalid filesystem option set: ext_attr

[root@ibm-x3550m3-06 mount]# mkfs -t ext4 -O ext_attr /dev/sdb1 >/dev/null 2>&1
[root@ibm-x3550m3-06 mount]# echo $?
0

On the other hand, kernel will set ext_attr flag when writing to ext3 fs
[root@ibm-x3550m3-06 mount]# mkfs -t ext3 /dev/sdb1 >/dev/null 2>&1
# Feature list has no ext_attr right after mkfs.ext3
[root@ibm-x3550m3-06 mount]# dumpe2fs -h /dev/sdb1 | grep "Filesystem features"
dumpe2fs 1.39 (29-May-2006)
Filesystem features:      has_journal resize_inode dir_index filetype sparse_super large_file
[root@ibm-x3550m3-06 mount]# mount /dev/sdb1 /mnt/ext3
[root@ibm-x3550m3-06 mount]# touch /mnt/ext3/testfile
[root@ibm-x3550m3-06 mount]# umount /dev/sdb1
# ext_attr is in feature list after touch testfile
[root@ibm-x3550m3-06 mount]# dumpe2fs -h /dev/sdb1 | grep "Filesystem features"
dumpe2fs 1.39 (29-May-2006)
Filesystem features:      has_journal ext_attr resize_inode dir_index filetype sparse_super large_file
[root@ibm-x3550m3-06 mount]#


Seems we need the following patch

commit 0d1de232a81354a89fdcd1df77531dec07685e2f
Author: Theodore Ts'o <tytso>
Date:   Sun Jan 27 19:38:46 2008 -0500

    Create filesystems with the ext_attr feature by default

    Since recent kernels have a tendency to set this feature willy-nilly,
    let's just enable by default.  It's only very old kernels that don't
    support it any more.

    Signed-off-by: "Theodore Ts'o" <tytso>

Version-Release number of selected component (if applicable):
e2fsprogs-1.39-34.el5_8.1

How reproducible:
always

Steps to Reproduce:
1. see description
2.
3.
  
Actual results:
mkfs -t ext3 -O ext_attr /dev/sdb1 fails

Expected results:
mkfs -t ext3 -O ext_attr /dev/sdb1 succeeds

Additional info:

Comment 1 Eric Sandeen 2012-08-02 17:05:26 UTC
I don't see that this is a bug, it's just changed behavior.

Is there any reason to address this in RHEL5?  I don't see one, but if I'm missing something please re-open.