Bug 17872 - ext4 does not honour chattr +s attribute
Summary: ext4 does not honour chattr +s attribute
Status: RESOLVED WILL_NOT_FIX
Alias: None
Product: File System
Classification: Unclassified
Component: ext4 (show other bugs)
Hardware: All Linux
: P1 enhancement
Assignee: fs_ext4@kernel-bugs.osdl.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-06 02:35 UTC by Rob Fortune
Modified: 2012-11-05 14:24 UTC (History)
2 users (show)

See Also:
Kernel Version: 2.6.34
Tree: Mainline
Regression: No


Attachments

Description Rob Fortune 2010-09-06 02:35:14 UTC
According to the man page setting this attribute will cause the files blocks to be zero'd if it is deleted. It says it does this for ext2 and ext3 and does not mention ext4, so I've marked it as "enhancement" though I think this is really a bug.

Because it doesn't zero the blocks.
Comment 1 Andreas Dilger 2010-09-06 02:55:05 UTC
Please read the man page carefully:

       When  a  file  with  the  ‘s’ attribute set is deleted, its blocks are
       zeroed and written back to the disk.  Note: please make sure  to  read
       the bugs and limitations section at the end of this document.
       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

:
:
BUGS AND LIMITATIONS
       The ‘c’, ’s’,  and ‘u’ attributes are not honored by the ext2 and ext3
                                             ^^^
       filesystems  as  implemented  in  the  current mainline Linux kernels.
       These attributes may be implemented in future versions of the ext2 and
       ext3 filesystems.


I agree it is a bug that the _man_page_ doesn't also mention ext4 as NOT zeroing out blocks when "+s" is used.

It makes me wonder why these "features" are mentioned in the man page at all, since it never worked and there is no plan to make it work.  Since this question comes up on a regular basis, it makes me wonder if it would be better to just remove mention of these options until they are actually implemented.  When they ARE implemented, they should list explicitly which filesystems DO support those features, rather than redirecting to the end of the document.
Comment 2 Rob Fortune 2010-09-06 03:12:10 UTC
My bad for missing the not. Your comment is spot on, mentioning non-existent features is pointless. It should be done the way you suggested.
Comment 3 Rob Fortune 2010-09-06 03:12:30 UTC
Pointless and confusing.
Comment 4 Rob Fortune 2010-09-06 03:16:43 UTC
And apologies for the spammy third reply but a three to five pass random wipe before zeroing them would be a much better feature than just zeroing them anyway.

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