Blame SOURCES/e2fsprogs-1.42.9-chattr-manpage-update.patch

0ef434
commit 272258e1dffe8afb6c9d0b0ba5edc119dbf9f52a
0ef434
Author: Eric Sandeen <sandeen@redhat.com>
0ef434
Date:   Fri Jul 4 23:03:14 2014 -0400
0ef434
0ef434
    e2fsprogs: revise and extend chattr(1) and chattr usage()
0ef434
    
0ef434
    The chattr(1) manpage and chattr usage() output were missing some flags.
0ef434
    
0ef434
    Add those, and make some other minor cosmetic fixes.
0ef434
    
0ef434
    (I've left out the 'B' (EXT2_COMPRBLK_FL) flag, because
0ef434
    it's not actually used anywhere, and I can't figure out
0ef434
    how it differs from 'c' (EXT2_COMPR_FL))
0ef434
    
0ef434
    Also, because the matrix of filesystems & flags is quite large,
0ef434
    refer to filesystem-specific manpages for detailed discussion
0ef434
    of flags supported by those filesystems, rather than trying to
0ef434
    cover it all in this manpage.  I'll send those manpage
0ef434
    updates to the appropriate lists a bit later.
0ef434
    
0ef434
    Signed-off-by: Eric Sandeen <sandeen@redhat.com>
0ef434
    Signed-off-by: Theodore Ts'o <tytso@mit.edu>
0ef434
    Reviewed-by: Andreas Dilger <adilger@dilger.ca>
0ef434
0ef434
diff --git a/misc/chattr.1.in b/misc/chattr.1.in
0ef434
index ce426e8..23b6938 100644
0ef434
--- a/misc/chattr.1.in
0ef434
+++ b/misc/chattr.1.in
0ef434
@@ -21,11 +21,11 @@ changes the file attributes on a Linux file system.
0ef434
 .PP
0ef434
 The format of a symbolic mode is +-=[aAcCdDeijsStTu].
0ef434
 .PP
0ef434
-The operator `+' causes the selected attributes to be added to the
0ef434
-existing attributes of the files; `-' causes them to be removed; and
0ef434
-`=' causes them to be the only attributes that the files have.
0ef434
+The operator '+' causes the selected attributes to be added to the
0ef434
+existing attributes of the files; '-' causes them to be removed; and
0ef434
+'=' causes them to be the only attributes that the files have.
0ef434
 .PP
0ef434
-The letters `aAcCdDeijsStTu' select the new attributes for the files:
0ef434
+The letters 'aAcCdDeijsStTu' select the new attributes for the files:
0ef434
 append only (a),
0ef434
 no atime updates (A),
0ef434
 compressed (c),
0ef434
@@ -47,8 +47,17 @@ but not modified by chattr:
0ef434
 compression error (E),
0ef434
 huge file (h),
0ef434
 indexed directory (I),
0ef434
+inline data (N),
0ef434
 compression raw access (X),
0ef434
 and compressed dirty file (Z).
0ef434
+.PP
0ef434
+Not all flags are supported or utilized by all filesystems; refer to
0ef434
+filesystem-specific man pages such as
0ef434
+.BR btrfs (5),
0ef434
+.BR ext4 (5),
0ef434
+and
0ef434
+.BR xfs (5)
0ef434
+for more filesystem-specific details.
0ef434
 .SH OPTIONS
0ef434
 .TP
0ef434
 .B \-R
0ef434
@@ -63,7 +72,7 @@ Suppress most error messages.
0ef434
 .BI \-v " version"
0ef434
 Set the file's version/generation number.
0ef434
 .SH ATTRIBUTES
0ef434
-A file with the `a' attribute set can only be open in append mode for writing.
0ef434
+A file with the 'a' attribute set can only be open in append mode for writing.
0ef434
 Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE
0ef434
 capability can set or clear this attribute.
0ef434
 .PP
0ef434
@@ -71,7 +80,7 @@ When a file with the 'A' attribute set is accessed, its atime record is
0ef434
 not modified.  This avoids a certain amount of disk I/O for laptop
0ef434
 systems.
0ef434
 .PP
0ef434
-A file with the `c' attribute set is automatically compressed on the disk
0ef434
+A file with the 'c' attribute set is automatically compressed on the disk
0ef434
 by the kernel.  A read from this file returns uncompressed data.  A write to
0ef434
 this file compresses data before storing them on the disk.  Note: please
0ef434
 make sure to read the bugs and limitations section at the end of this
0ef434
@@ -86,13 +95,13 @@ be fully stable.  If the 'C' flag is set on a directory, it will have no
0ef434
 effect on the directory, but new files created in that directory will
0ef434
 the No_COW attribute.)
0ef434
 .PP
0ef434
-A file with the `d' attribute set is not candidate for backup when the
0ef434
+A file with the 'd' attribute set is not candidate for backup when the
0ef434
 .BR dump (8)
0ef434
 program is run.
0ef434
 .PP
0ef434
-When a directory with the `D' attribute set is modified,
0ef434
+When a directory with the 'D' attribute set is modified,
0ef434
 the changes are written synchronously on the disk; this is equivalent to
0ef434
-the `dirsync' mount option applied to a subset of the files.
0ef434
+the 'dirsync' mount option applied to a subset of the files.
0ef434
 .PP
0ef434
 The 'e' attribute indicates that the file is using extents for mapping
0ef434
 the blocks on disk.  It may not be removed using
0ef434
@@ -112,7 +121,7 @@ is (or at one time was) larger than 2TB.  It may not be set or reset using
0ef434
 although it can be displayed by
0ef434
 .BR lsattr (1).
0ef434
 .PP
0ef434
-A file with the `i' attribute cannot be modified: it cannot be deleted or
0ef434
+A file with the 'i' attribute cannot be modified: it cannot be deleted or
0ef434
 renamed, no link can be created to this file and no data can be written
0ef434
 to the file.  Only the superuser or a process possessing the
0ef434
 CAP_LINUX_IMMUTABLE capability can set or clear this attribute.
0ef434
@@ -123,7 +132,7 @@ is being indexed using hashed trees.  It may not be set or reset using
0ef434
 although it can be displayed by
0ef434
 .BR lsattr (1).
0ef434
 .PP
0ef434
-A file with the `j' attribute has all of its data written to the ext3
0ef434
+A file with the 'j' attribute has all of its data written to the ext3
0ef434
 or ext4 journal before being written to the file itself, if the filesystem
0ef434
 is mounted with the "data=ordered" or "data=writeback" options.  When the
0ef434
 filesystem is mounted with the "data=journal" option all file data
0ef434
@@ -131,13 +140,19 @@ is already journalled and this attribute has no effect.  Only
0ef434
 the superuser or a process possessing the CAP_SYS_RESOURCE
0ef434
 capability can set or clear this attribute.
0ef434
 .PP
0ef434
-When a file with the `s' attribute set is deleted, its blocks are zeroed
0ef434
+A file with the 'N' attribute set indicates that the file has data
0ef434
+stored inline, within the inode itself. It may not be set or reset using
0ef434
+.BR chattr (1),
0ef434
+although it can be displayed by
0ef434
+.BR lsattr (1).
0ef434
+.PP
0ef434
+When a file with the 's' attribute set is deleted, its blocks are zeroed
0ef434
 and written back to the disk.  Note: please make sure to read the bugs
0ef434
 and limitations section at the end of this document.
0ef434
 .PP
0ef434
-When a file with the `S' attribute set is modified,
0ef434
+When a file with the 'S' attribute set is modified,
0ef434
 the changes are written synchronously on the disk; this is equivalent to
0ef434
-the `sync' mount option applied to a subset of the files.
0ef434
+the 'sync' mount option applied to a subset of the files.
0ef434
 .PP
0ef434
 A file with the 't' attribute will not have a partial block fragment at
0ef434
 the end of the file merged with other files (for those filesystems which
0ef434
@@ -156,13 +171,13 @@ and /home/mary are placed into separate block groups.  For directories
0ef434
 where this attribute is not set, the Orlov block allocator will try to
0ef434
 group subdirectories closer together where possible.
0ef434
 .PP
0ef434
-When a file with the `u' attribute set is deleted, its contents are
0ef434
+When a file with the 'u' attribute set is deleted, its contents are
0ef434
 saved.  This allows the user to ask for its undeletion.  Note: please
0ef434
 make sure to read the bugs and limitations section at the end of this
0ef434
 document.
0ef434
 .PP
0ef434
 The 'X' attribute is used by the experimental compression patches to
0ef434
-indicate that a raw contents of a compressed file can be accessed
0ef434
+indicate that the raw contents of a compressed file can be accessed
0ef434
 directly.  It currently may not be set or reset using
0ef434
 .BR chattr (1),
0ef434
 although it can be displayed by
0ef434
@@ -179,16 +194,19 @@ although it can be displayed by
0ef434
 was written by Remy Card <Remy.Card@linux.org>.  It is currently being
0ef434
 maintained by Theodore Ts'o <tytso@alum.mit.edu>.
0ef434
 .SH BUGS AND LIMITATIONS
0ef434
-The `c', 's',  and `u' attributes are not honored
0ef434
+The 'c', 's',  and 'u' attributes are not honored
0ef434
 by the ext2, ext3, and ext4 filesystems as implemented in the current
0ef434
 mainline Linux kernels.
0ef434
 .PP
0ef434
-The `j' option is only useful if the filesystem is mounted as ext3 or ext4.
0ef434
+The 'j' option is only useful if the filesystem is mounted as ext3 or ext4.
0ef434
 .PP
0ef434
-The `D' option is only useful on Linux kernel 2.5.19 and later.
0ef434
+The 'D' option is only useful on Linux kernel 2.5.19 and later.
0ef434
 .SH AVAILABILITY
0ef434
 .B chattr
0ef434
 is part of the e2fsprogs package and is available from
0ef434
 http://e2fsprogs.sourceforge.net.
0ef434
 .SH SEE ALSO
0ef434
-.BR lsattr (1)
0ef434
+.BR lsattr (1),
0ef434
+.BR btrfs (5),
0ef434
+.BR ext4 (5),
0ef434
+.BR xfs (5).
0ef434
diff --git a/misc/chattr.c b/misc/chattr.c
0ef434
index d5a6a61..f130108 100644
0ef434
--- a/misc/chattr.c
0ef434
+++ b/misc/chattr.c
0ef434
@@ -83,7 +83,7 @@ static unsigned long sf;
0ef434
 static void usage(void)
0ef434
 {
0ef434
 	fprintf(stderr,
0ef434
-		_("Usage: %s [-RVf] [-+=aAcCdDeijsSu] [-v version] files...\n"),
0ef434
+		_("Usage: %s [-RVf] [-+=aAcCdDeijsStTu] [-v version] files...\n"),
0ef434
 		program_name);
0ef434
 	exit(1);
0ef434
 }