Bug 1010709 - e2fsprogs and quota FS feature
e2fsprogs and quota FS feature
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: e2fsprogs (Show other bugs)
19
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Eric Sandeen
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-22 13:27 EDT by Bert DeKnuydt
Modified: 2014-09-18 05:30 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-09-18 05:30:37 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bert DeKnuydt 2013-09-22 13:27:48 EDT
Description of problem:

See bug 880596; we are close to a year further and nothing changed.
For the sake of being pedantic, I'll refile the bug.

e2fsprogs as installed on Fedora 19 is not consistent w.r.t. the
(less and less) new ext4 quota feature.

Version-Release number of selected component (if applicable):

e2fsprogs-1.42.7-2.fc19.x86_64
util-linux-2.23.2-4.fc19.x86_64

How reproducible:

Always.

Steps to Reproduce / Results

1. Manual of mkfs.ext4 talks about 'quota': Create quota inodes etc.etc.
   (unchanged)

2. mkfs.ext4 -O quota /dev/whatever reports
   "Invalid filesystem option set: quota"
   (unchanged)

3. tune2fs -O quota /dev/whatever does not complain and correctly sets
   the feature. Slightly changed, as it now prints 'Warning, feature still
   under development'.  But it does set the option.

4. tune2fs -O ^quota /dev/whatever complains
tune2fs 1.42.7 (21-Jan-2013)
tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/whatever
Couldn't find valid filesystem superblock
   Unchanged.

5. fsck /dev/whatever complains
fsck from util-linux 2.23.2
e2fsck 1.42.7 (21-Jan-2013)
/dev/whatever has unsupported feature(s): quota
e2fsck: Get a newer version of e2fsck!
  Unchanged.

6) debugfs /dev/whatever, then 'features' lists feature quota properly.

7) debugfs -w /dev/whatever refuses to open with
debugfs 1.42.7 (14-May-2012)
/dev/whatever: Filesystem has unsupported read-only feature(s) while opening filesystem

The FS remains mountable though; but not e2fsck-able; a kind of long-fuse time bomb.

Expected results:

1) It should never be possible to set an option, which you cannot unset.
   If it doesn't work yet, you should not be able to set it at all (except
   maybe with --force --I-know-this-will-fail ...).

2) On a meta-level, I'd expect/hope these kind of minor things to be addressed 
   in less than 3 iterations of Fedora.  Otherwise, people might get seriously
   discouraged to report any further bugs ...
Comment 1 Eric Sandeen 2013-09-23 14:50:05 EDT
It seems to be a half-baked option upstream IIRC; I did send some things upstream to try to deal with it.  Let me check on the status of those.

-Eric
Comment 2 Eric Sandeen 2013-09-23 14:51:56 EDT
I thought this commit took care of it, let me see what's going on.

commit 44a2cca35e9292c39bcad38288fdf7a78d6f56af
Author: Eric Sandeen <sandeen@redhat.com>
Date:   Tue Nov 27 12:35:48 2012 -0600

    tune2fs: respect quota config option
    
    If we haven't turned --enable-quota on at config time,
    I don't think tune2fs should know about the feature either.
    
    Today we can actually tune2fs -O quota even if not
    configured on, and then the rest of the tools will
    refuse to touch it:
    
    # tune2fs -O quota /dev/sda1
    # tune2fs -O ^quota /dev/whatever complains
    tune2fs 1.42.3 (14-May-2012)
    tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1
    # fsck /dev/sda1
    fsck from util-linux 2.21.2
    e2fsck 1.42.3 (14-May-2012)
    /dev/sda1 has unsupported feature(s): quota
    e2fsck: Get a newer version of e2fsck!
    
    Ok, so turn it off?
    # tune2fs -O ^quota /dev/whatever complains
    tune2fs 1.42.3 (14-May-2012)
    tune2fs: Filesystem has unsupported read-only feature(s) while trying to open /dev/sda1
    
    Nope.  Debugfs?  Nope.
    
    # debugfs -w /dev/sda1
    debugfs 1.42.3 (14-May-2012)
    /dev/sda1: Filesystem has unsupported read-only feature(s) while opening filesystem
    
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
    Reported-by: Bert DeKnuydt <Bert.Deknuydt@esat.kuleuven.be>
    Addresses-Red-Hat-Bugzilla: #880596
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Comment 3 Eric Sandeen 2013-09-23 19:37:52 EDT
(In reply to Bert DeKnuydt from comment #0)

> 1. Manual of mkfs.ext4 talks about 'quota': Create quota inodes etc.etc.
>    (unchanged)

Ok, so that's because Ted never picked up my docs patch.  I'll re-ping on that.

It's "only" been on the list since last November, and now I've sent a 2nd ping.  :(

> 2. mkfs.ext4 -O quota /dev/whatever reports
>    "Invalid filesystem option set: quota"
>    (unchanged)

which is correct, since the quota config option is not enabled in fedora

> 3. tune2fs -O quota /dev/whatever does not complain and correctly sets
>    the feature. Slightly changed, as it now prints 'Warning, feature still
>    under development'.  But it does set the option.

I get:

# tune2fs -O quota fsfile 
tune2fs 1.42.7 (21-Jan-2013)
Setting filesystem feature 'quota' not supported.
# rpm -q e2fsprogs
e2fsprogs-1.42.7-2.fc19.x86_64

which is correct.  Are you sure you've tested the right e2fsprogs?

So the other points aren't so important; if we can never set the option, other tools not understanding the option is fine.

It seems half-baked and off by default so in Fedora we should just config it off & pretend it doesn't exist...

> 
> Expected results:
> 
> 1) It should never be possible to set an option, which you cannot unset.

I think I fixed that when you filed the first bug; docs are still wrong though.

> 2) On a meta-level, I'd expect/hope these kind of minor things to be
> addressed 
>    in less than 3 iterations of Fedora.  Otherwise, people might get
> seriously
>    discouraged to report any further bugs ...

I think they were.  Can you re-check?
Comment 4 Bert DeKnuydt 2013-09-24 13:52:17 EDT
Hi Eric,

We both are right and wrong ... Took me some time to figure out this one:  

You tried with 'tune2fs -O quota',  'dash Oh',  but I get the
error with 'tune2fs -Q usrquota', 'dash Kjoo'.

So it looks like the fix blocks the quota option when one tries to set
it with '-O quota' but not , but when set with '-Q usrquota', as stated
in the man page. 

[root@fulla tmp]# fallocate -l 10M test.img

[root@fulla tmp]# mkfs.ext4 test.img 
mke2fs 1.42.7 (21-Jan-2013)
test.img is not a block special device.
Proceed anyway? (y,n) y
Discarding device blocks: done                            
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
2560 inodes, 10240 blocks
512 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=10485760
2 block groups
8192 blocks per group, 8192 fragments per group
1280 inodes per group
Superblock backups stored on blocks: 
        8193

Allocating group tables: done                            
Writing inode tables: done                            
Creating journal (1024 blocks): done
Writing superblocks and filesystem accounting information: done

[root@fulla tmp]# tune2fs -O quota test.img 
tune2fs 1.42.7 (21-Jan-2013)
Setting filesystem feature 'quota' not supported.

[root@fulla tmp]# tune2fs -Q usrquota test.img 
tune2fs 1.42.7 (21-Jan-2013)

Warning: the quota feature is still under development
See https://ext4.wiki.kernel.org/index.php/Quota for more information

--> Now the quota option flag _is_ set, with all associated problems.

So my bug report above is not completely correct: it should have stated 
'-Q usrquota,grpquota'. But the bug itself is still there.

Thanks for picking this up though.

B.
Comment 5 Eric Sandeen 2013-09-24 15:47:09 EDT
(In reply to Bert DeKnuydt from comment #4)
> Hi Eric,
> 
> We both are right and wrong ... Took me some time to figure out this one:  
> 
> You tried with 'tune2fs -O quota',  'dash Oh',  but I get the
> error with 'tune2fs -Q usrquota', 'dash Kjoo'.
> 
> So it looks like the fix blocks the quota option when one tries to set
> it with '-O quota' but not , but when set with '-Q usrquota', as stated
> in the man page. 

Gah.  Sorry.  Ok, same fix needs to go for that, then.  Stupid knobs.  ;)
I'll send it upstream.

> [root@fulla tmp]# tune2fs -O quota test.img 
> tune2fs 1.42.7 (21-Jan-2013)
> Setting filesystem feature 'quota' not supported.
> 
> [root@fulla tmp]# tune2fs -Q usrquota test.img 
> tune2fs 1.42.7 (21-Jan-2013)

:(

Got it.  I'll fix that up too.  *sigh* why do we have 2 ways to do it.  :(
Comment 6 Eric Sandeen 2013-09-24 15:48:26 EDT
FWIW, the first bug you filed didn't mention the -Q problem.  ;)

-Eric
Comment 7 Eric Sandeen 2014-07-16 21:48:10 EDT
Upstream seems fixed, FWIW, after

d82445e tune2fs: more respect for quota config option
f5589f4 mke2fs: remove quota docs if not configured in
44a2cca tune2fs: respect quota config option


[sandeen@sandeen e2fsprogs]$ misc/tune2fs -O quota test.img
tune2fs 1.43-WIP (09-Jul-2014)
Setting filesystem feature 'quota' not supported.
[sandeen@sandeen e2fsprogs]$ misc/tune2fs -Q usrquota test.img
tune2fs 1.43-WIP (09-Jul-2014)
misc/tune2fs: invalid option -- 'Q'

Do you have a particular need for this fix in fedora, or should I just close this upstream/rawhide?
Comment 8 Eric Sandeen 2014-07-16 21:51:24 EDT
Actually, as of 1.42.11 in rawhide all the options work... hohum.  Seems that I just waited it out.  ;)

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