diff options
-rw-r--r-- | lib/e2p/ChangeLog | 5 | ||||
-rw-r--r-- | lib/e2p/pf.c | 3 | ||||
-rw-r--r-- | lib/ext2fs/ChangeLog | 4 | ||||
-rw-r--r-- | lib/ext2fs/ext2_fs.h | 3 | ||||
-rw-r--r-- | misc/ChangeLog | 4 | ||||
-rw-r--r-- | misc/chattr.1.in | 16 | ||||
-rw-r--r-- | misc/chattr.c | 5 |
7 files changed, 32 insertions, 8 deletions
diff --git a/lib/e2p/ChangeLog b/lib/e2p/ChangeLog index 905e2b1c..9df2ee49 100644 --- a/lib/e2p/ChangeLog +++ b/lib/e2p/ChangeLog @@ -1,3 +1,8 @@ +2002-06-15 Theodore Ts'o <tytso@mit.edu> + + * pf.c: Changed "compressed dirty flag" from 'D' to 'Z'. Add + dirsync flag and assign it 'D'. + 2002-03-08 Theodore Tso <tytso@mit.edu> * Release of E2fsprogs 1.27 diff --git a/lib/e2p/pf.c b/lib/e2p/pf.c index d9aab290..a540c734 100644 --- a/lib/e2p/pf.c +++ b/lib/e2p/pf.c @@ -28,13 +28,14 @@ static struct flags_name flags_array[] = { { EXT2_SECRM_FL, "s", "Secure_Deletion" }, { EXT2_UNRM_FL, "u" , "Undelete" }, { EXT2_SYNC_FL, "S", "Synchronous_Updates" }, + { EXT2_DIRSYNC_FL, "D", "Synchronous_Directory_Updates" }, { EXT2_IMMUTABLE_FL, "i", "Immutable" }, { EXT2_APPEND_FL, "a", "Append_Only" }, { EXT2_NODUMP_FL, "d", "No_Dump" }, { EXT2_NOATIME_FL, "A", "No_Atime" }, { EXT2_COMPR_FL, "c", "Compression_Requested" }, { EXT2_COMPRBLK_FL, "B", "Compressed_File" }, - { EXT2_DIRTY_FL, "D", "Compressed_Dirty_File" }, + { EXT2_DIRTY_FL, "Z", "Compressed_Dirty_File" }, { EXT2_NOCOMPR_FL, "X", "Compression_Raw_Access" }, { EXT2_ECOMPR_FL, "E", "Compression_Error" }, { EXT3_JOURNAL_DATA_FL, "j", "Journaled_Data" }, diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 0b31f830..b84275a5 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,7 @@ +2002-06-15 Theodore Ts'o <tytso@mit.edu> + + * ext2_fs.h (EXT2_DIRSYNC_FL): Add new file. + 2002-06-09 Andreas Dilger <adilger@clusterfs.com> * ext2_fs.h: Add macros for maximum block/inode counts: diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index 766afd74..c47b59b4 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -225,9 +225,10 @@ struct ext2_dx_countlimit { #define EXT2_IMAGIC_FL 0x00002000 #define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */ #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ +#define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */ #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ -#define EXT2_FL_USER_VISIBLE 0x0000DFFF /* User visible flags */ +#define EXT2_FL_USER_VISIBLE 0x0001DFFF /* User visible flags */ #define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */ /* diff --git a/misc/ChangeLog b/misc/ChangeLog index 0a972d02..e2dc6ad5 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,7 @@ +2002-06-15 Theodore Ts'o <tytso@mit.edu> + + * chattr.c: Applied patch from Andrew to support the dirsync flag. + 2002-05-22 Andreas Dilger <adilger@clusterfs.com> * mke2fs.c (set_fs_defaults): make the default inode ratio at most diff --git a/misc/chattr.1.in b/misc/chattr.1.in index 82f054bb..be645752 100644 --- a/misc/chattr.1.in +++ b/misc/chattr.1.in @@ -19,16 +19,16 @@ chattr \- change file attributes on a Linux second extended file system .B chattr changes the file attributes on a Linux second extended file system. .PP -The format of a symbolic mode is +-=[ASacdistu]. +The format of a symbolic mode is +-=[ASacDdistu]. .PP The operator `+' causes the selected attributes to be added to the existing attributes of the files; `-' causes them to be removed; and `=' causes them to be the only attributes that the files have. .PP -The letters `ASacdijsu' select the new attributes for the files: -don't update atime (A), synchronous updates (S), append only (a), -compressed (c), no dump (d), immutable (i), data journalling (j), -secure deletion (s), and undeletable (u). +The letters `ASacDdijsu' select the new attributes for the files: +don't update atime (A), synchronous updates (S), synchronous directory +updates (D), append only (a), compressed (c), no dump (d), immutable (i), +data journalling (j), secure deletion (s), and undeletable (u). .SH OPTIONS .TP .B \-R @@ -74,6 +74,10 @@ When a file with the `S' attribute set is modified, the changes are written synchronously on the disk; this is equivalent to the `sync' mount option applied to a subset of the files. .PP +When a directory with the `D' attribute set is modified, +the changes are written synchronously on the disk; this is equivalent to +the `dirsync' mount option applied to a subset of the files. +.PP A file with the 't' attribute will not have a partial block fragment at the of the file merged with other files (for those filesystems which support tail-merging). This is necessary for applications such as LILO @@ -92,6 +96,8 @@ by the kernel filesystem code. These attributes will be implemented in a future ext2 fs version. .PP The `j' option is only useful if the filesystem is mounted as ext3. +.PP +The `D' option is only useful on Linux kernel 2.5.19 and later. .SH AVAILABILITY .B chattr is part of the e2fsprogs package and is available from diff --git a/misc/chattr.c b/misc/chattr.c index 96977e98..467e6bad 100644 --- a/misc/chattr.c +++ b/misc/chattr.c @@ -78,7 +78,7 @@ static void fatal_error(const char * fmt_string, int errcode) exit (errcode); } -#define usage() fatal_error(_("usage: %s [-RV] [-+=AacdijsSu] [-v version] files...\n"), \ +#define usage() fatal_error(_("usage: %s [-RV] [-+=AacDdijsSu] [-v version] files...\n"), \ 1) struct flags_char { @@ -89,6 +89,7 @@ struct flags_char { static const struct flags_char flags_array[] = { { EXT2_NOATIME_FL, 'A' }, { EXT2_SYNC_FL, 'S' }, + { EXT2_DIRSYNC_FL, 'D' }, { EXT2_APPEND_FL, 'a' }, { EXT2_COMPR_FL, 'c' }, { EXT2_NODUMP_FL, 'd' }, @@ -218,6 +219,8 @@ static void change_attributes (const char * name) print_flags (stdout, flags, 0); printf ("\n"); } + if (!S_ISDIR(st.st_mode)) + flags &= ~EXT2_DIRSYNC_FL; if (fsetflags (name, flags) == -1) com_err (program_name, errno, _("while setting flags on %s"), name); |