Red Hat Bugzilla – Bug 839466
ext4: ext4 driver should reject nonsensical mount options for ext2 and ext3
Last modified: 2015-11-19 14:57:09 EST
Description of problem: mount ext3 with ext4-only mount options should fail eg. mount -t ext3 -o journal_checksum $dev $mnt mount -t ext2 -o commit=10 $dev $mnt I go through the mount manpage and made a list of mount options that should be rejected. (I may miss some options, this is what I can find in the manpage) ext3: journal_checksum journal_async_commit inode_readahead=n stripe=n delalloc/nodelalloc max_batch_time=usec/min_batch_time=usec journal_ioprio=prio (0-7) auto_da_alloc/noauto_da_alloc discard/nodiscard block_validity/noblock_validity dioread_lock/dioread_nolock i_version ext2: All options listed in ext3 section journal=update norecovery/noload data={journal|ordered|writeback} barrier=0 / barrier=1 commit=nrsec abort Version-Release number of selected component (if applicable): kernel-3.3.0-0.19.el7
Hi Carlos, Yes, I saw some of the mount options were rejected when mounting ext2. But not all the options listed in comment 0 are rejected. Do we have a well-defined acceptable option list for ext2 and ext3? If no do we want to work out one? Test on ext2 and results are as below now, kenrel-3.10.0-51.el7 journal_checksum PASS journal_async_commit PASS inode_readahead_blks=32 FAIL(mount should fail, but passed) stripe=4 FAIL(mount should fail, but passed) delalloc PASS nodelalloc PASS max_batch_time=5 FAIL(mount should fail, but passed) min_batch_time=5 FAIL(mount should fail, but passed) journal_ioprio=5 FAIL(mount should fail, but passed) auto_da_alloc FAIL(mount should fail, but passed) noauto_da_alloc FAIL(mount should fail, but passed) discard FAIL(mount should fail, but passed) nodiscard FAIL(mount should fail, but passed) block_validity FAIL(mount should fail, but passed) noblock_validity FAIL(mount should fail, but passed) dioread_lock PASS dioread_nolock PASS i_version FAIL(mount should fail, but passed) journal=update PASS journal=11 FAIL(mount should fail, but passed) journal_dev=/dev/loop0 PASS norecovery PASS noload PASS data=journal PASS data=ordered PASS data=writeback PASS barrier=1 FAIL(mount should fail, but passed) barrier FAIL(mount should fail, but passed) nobarrier FAIL(mount should fail, but passed) commit=5 FAIL(mount should fail, but passed) abort FAIL(mount should fail, but passed) Thanks, Eryu
Hi Eryu. Thanks, this is a good report of options you guys are testing :) Although some of these options I believe that should be kept available to all Ext versions, like discard, I agree some of them like barrier on ext2 should be rejected, since these controls how journal commit ordering. But some of them, like 'discard' looks reasonable to have them enabled for any Ext version. Anyway, let me talk with upstream folks and I get back to you. Thanks again for this report
This request was resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you have further questions about the request.
The comment above is incorrect. The correct version is bellow. I'm sorry for any inconvenience. --------------------------------------------------------------- This request was NOT resolved in Red Hat Enterprise Linux 7.0. Contact your manager or support representative in case you need to escalate this bug.
I agree that options like discard block_validity are reasonable to keep on ext2/3, but the following two options are journal related mount options, I think ext2 should reject them. journal_ioprio=5 FAIL(mount should fail, but passed) journal=11 FAIL(mount should fail, but passed) And I'll update the test case to mark the following options as accepted, so they won't fail the test anymore(left journal_ioprio and journa=11 untouched for now, will update test when there's a final decision) inode_readahead_blks=32 FAIL(mount should fail, but passed) stripe=4 FAIL(mount should fail, but passed) max_batch_time=5 FAIL(mount should fail, but passed) min_batch_time=5 FAIL(mount should fail, but passed) auto_da_alloc FAIL(mount should fail, but passed) noauto_da_alloc FAIL(mount should fail, but passed) discard FAIL(mount should fail, but passed) nodiscard FAIL(mount should fail, but passed) block_validity FAIL(mount should fail, but passed) noblock_validity FAIL(mount should fail, but passed) i_version FAIL(mount should fail, but passed) barrier=1 FAIL(mount should fail, but passed) barrier FAIL(mount should fail, but passed) nobarrier FAIL(mount should fail, but passed) commit=5 FAIL(mount should fail, but passed) abort FAIL(mount should fail, but passed)
I agree with you Eryu, there is no reason to keep journal options with ext2 filesystems, I'll try to send a patch upstream disabling these options for ext2 filesystems, and see what happens, and I let you know.
Patch(es) available on kernel-3.10.0-313.el7
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-2152.html