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

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