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

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