From 8fe81a3d53fbaa1670ece5fb7fd11dd5ae45b8da Mon Sep 17 00:00:00 2001 From: Andreas Dilger Date: Sat, 5 Aug 2006 18:50:22 -0400 Subject: [PATCH] Rename EXT3_EXTENTS_FL to EXT4_EXTENTS_FL and make it visible to the user lsattr will display the EXT4_EXTENTS_FL flag Signed-off-by: Andreas Dilger Signed-off-by: "Theodore Ts'o" --- lib/e2p/ChangeLog | 4 ++++ lib/e2p/pf.c | 1 + lib/ext2fs/ChangeLog | 6 ++++++ lib/ext2fs/ext2_fs.h | 4 ++-- misc/ChangeLog | 4 ++++ misc/filefrag.c | 4 ++-- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/lib/e2p/ChangeLog b/lib/e2p/ChangeLog index 641e7d8..4dfaba7 100644 --- a/lib/e2p/ChangeLog +++ b/lib/e2p/ChangeLog @@ -1,3 +1,7 @@ +2006-08-05 Theodore Tso + + * pf.c: Add support for EXT4_EXTENTS_FL flag. + 2006-05-08 Theodore Tso * feature.c: Add support for EXT2_FEATURE_COMPAT_LAZY_BG feature. diff --git a/lib/e2p/pf.c b/lib/e2p/pf.c index 48d75a9..3e9a7cd 100644 --- a/lib/e2p/pf.c +++ b/lib/e2p/pf.c @@ -44,6 +44,7 @@ static struct flags_name flags_array[] = { { EXT2_INDEX_FL, "I", "Indexed_direcctory" }, { EXT2_NOTAIL_FL, "t", "No_Tailmerging" }, { EXT2_TOPDIR_FL, "T", "Top_of_Directory_Hierarchies" }, + { EXT4_EXTENTS_FL, "e", "Extents" }, { 0, NULL, NULL } }; diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 1ac7e23..0bd5a21 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,9 @@ +2006-08-05 Theodore Tso + + * ext2_fs.h (EXT4_EXTENTS_FL): Rename EXT3_EXTENTS_FL to + EXT4_EXTENTS_FL, and add EXT4_EXTENTS_FL to user visible + flags list. + 2006-07-15 Theodore Tso * ext2fs.h: Remove unneeded #ifdef since EXT2_DYNAMIC_REV is diff --git a/lib/ext2fs/ext2_fs.h b/lib/ext2fs/ext2_fs.h index 1cfbc35..d3e39f2 100644 --- a/lib/ext2fs/ext2_fs.h +++ b/lib/ext2fs/ext2_fs.h @@ -236,10 +236,10 @@ struct ext2_dx_countlimit { #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ #define EXT2_DIRSYNC_FL 0x00010000 /* Synchronous directory modifications */ #define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/ -#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ +#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ -#define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */ +#define EXT2_FL_USER_VISIBLE 0x000BDFFF /* User visible flags */ #define EXT2_FL_USER_MODIFIABLE 0x000080FF /* User modifiable flags */ /* diff --git a/misc/ChangeLog b/misc/ChangeLog index 2d57d56..d489bf1 100644 --- a/misc/ChangeLog +++ b/misc/ChangeLog @@ -1,3 +1,7 @@ +2006-08-05 Theodore Tso + + * filefrag.c: Change EXT3_EXTENTS_FL to EXT4_EXTENTS_FL + 2006-07-15 Theodore Tso * mke2fs.c (PRS): Look up the default inode size in the diff --git a/misc/filefrag.c b/misc/filefrag.c index 5d144ff..0719d4c 100644 --- a/misc/filefrag.c +++ b/misc/filefrag.c @@ -44,7 +44,7 @@ int verbose = 0; #define FIBMAP _IO(0x00,1) /* bmap access */ #define FIGETBSZ _IO(0x00,2) /* get the block size used for bmap */ -#define EXT3_EXTENTS_FL 0x00080000 /* Inode uses extents */ +#define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ #define EXT3_IOC_GETFLAGS _IOR('f', 1, long) static unsigned long get_bmap(int fd, unsigned long block) @@ -126,7 +126,7 @@ static void frag_report(const char *filename) } if (ioctl(fd, EXT3_IOC_GETFLAGS, &flags) < 0) flags = 0; - if (flags & EXT3_EXTENTS_FL) { + if (flags & EXT4_EXTENTS_FL) { printf("File is stored in extents format\n"); is_ext2 = 0; } -- 1.8.3.1