lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4F0B1FF8.8010200@redhat.com>
Date:	Mon, 09 Jan 2012 11:12:24 -0600
From:	Eric Sandeen <sandeen@...hat.com>
To:	andrei.popa@...eo.ro
CC:	linux-ext4@...r.kernel.org
Subject: Re: ext4 discard does not apper in /proc/mounts

On 1/7/12 5:23 PM, Andrei Popa wrote:
> Hello,
> 
> ierdnac-hp ~ # cat /etc/fstab |grep discard
> /dev/sda3               /               ext4
> discard,noatime,norelatime,barrier=0,errors=remount-ro,data=writeback
> 0 1
> 
> ierdnac-hp ~ # tune2fs -l /dev/sda3|grep discard
> Default mount options:    journal_data_writeback discard
> 
> ierdnac-hp ~ # cat /proc/mounts |grep write
> /dev/root / ext4 rw,noatime,user_xattr,acl,barrier=0,data=writeback 0 0
> 
> 

What kernel?

If it's a recent kernel, here is the logic which controls whether to show it:

        if (test_opt(sb, DISCARD) && !(def_mount_opts & EXT4_DEFM_DISCARD))
                seq_puts(seq, ",discard");

i.e. if "discard" is in the default mount options for the fs, it is not
shown, by design - although I am not 100% sure why that design decision
was made; that logic was explicitly added here:

commit 8b67f04ab9de5d8f3a71aef72bf02c995a506db5
Author: Theodore Ts'o <tytso@....edu>
Date:   Sun Aug 1 23:14:20 2010 -0400

    ext4: Add mount options in superblock
    
    Allow mount options to be stored in the superblock.  Also add default
    mount option bits for nobarrier, block_validity, discard, and nodelalloc.
    
    Signed-off-by: "Theodore Ts'o" <tytso@....edu>

which contained:

-       if (test_opt(sb, DISCARD))
+       if (test_opt(sb, DISCARD) && !(def_mount_opts & EXT4_DEFM_DISCARD))
                seq_puts(seq, ",discard");

so maybe Ted can speak to the reasoning behind it; I think the general philosophy
is to not show any defaults in /proc/mounts.

Thanks,
-Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ