• Dmitry Monakhov's avatar
    ext4: do not allow journal_opts for fs w/o journal · 1e381f60
    Dmitry Monakhov authored
    It is appeared that we can pass journal related mount options and such options
    be shown in /proc/mounts
    
    Example:
    #mkfs.ext4 -F /dev/vdb
    #tune2fs -O ^has_journal /dev/vdb
    #mount /dev/vdb /mnt/  -ocommit=20,journal_async_commit
    #cat /proc/mounts  | grep /mnt
     /dev/vdb /mnt ext4 rw,relatime,journal_checksum,journal_async_commit,commit=20,data=ordered 0 0
    
    But options:"journal_checksum,journal_async_commit,commit=20,data=ordered" has
    nothing with reality because there is no journal at all.
    
    This patch disallow following options for journalless configurations:
     - journal_checksum
     - journal_async_commit
     - commit=%ld
     - data={writeback,ordered,journal}
    Signed-off-by: default avatarDmitry Monakhov <dmonakhov@openvz.org>
    Signed-off-by: default avatarTheodore Ts'o <tytso@mit.edu>
    Reviewed-by: default avatarAndreas Dilger <adilger@dilger.ca>
    1e381f60
super.c 150 KB