[Ocfs2-tools-commits] mfasheh commits r1211 - in trunk: debugfs.ocfs2 libocfs2 libocfs2/include
svn-commits@oss.oracle.com
svn-commits at oss.oracle.com
Wed Jul 5 16:02:24 CDT 2006
Author: mfasheh
Signed-off-by: jlbec
Signed-off-by: smushran
Date: 2006-07-05 16:02:23 -0500 (Wed, 05 Jul 2006)
New Revision: 1211
Modified:
trunk/debugfs.ocfs2/dump.c
trunk/libocfs2/include/ocfs2_fs.h
trunk/libocfs2/inode.c
Log:
Add minimal support for the new file attributes field:
- ocfs2_fs.h sync with mainline
- libocfs2 now knows how to swap ocfs2_dinode->i_attr
- teach debugfs.ocfs2 how to print i_attr
Signed-off-by: jlbec
Signed-off-by: smushran
Modified: trunk/debugfs.ocfs2/dump.c
===================================================================
--- trunk/debugfs.ocfs2/dump.c 2006-07-05 19:21:14 UTC (rev 1210)
+++ trunk/debugfs.ocfs2/dump.c 2006-07-05 21:02:23 UTC (rev 1211)
@@ -181,7 +181,8 @@
fprintf(out, "\tFS Generation: %u (0x%x)\n", in->i_fs_generation,
in->i_fs_generation);
- fprintf(out, "\tType: %s Flags: %s\n", str, flags->str);
+ fprintf(out, "\tType: %s Attr: 0x%x Flags: %s\n", str, in->i_attr,
+ flags->str);
pw = getpwuid(in->i_uid);
gr = getgrgid(in->i_gid);
Modified: trunk/libocfs2/include/ocfs2_fs.h
===================================================================
--- trunk/libocfs2/include/ocfs2_fs.h 2006-07-05 19:21:14 UTC (rev 1210)
+++ trunk/libocfs2/include/ocfs2_fs.h 2006-07-05 21:02:23 UTC (rev 1211)
@@ -114,7 +114,27 @@
#define OCFS2_CHAIN_FL (0x00000400) /* Chain allocator */
#define OCFS2_DEALLOC_FL (0x00000800) /* Truncate log */
+/* Inode attributes, keep in sync with EXT2 */
+#define OCFS2_SECRM_FL (0x00000001) /* Secure deletion */
+#define OCFS2_UNRM_FL (0x00000002) /* Undelete */
+#define OCFS2_COMPR_FL (0x00000004) /* Compress file */
+#define OCFS2_SYNC_FL (0x00000008) /* Synchronous updates */
+#define OCFS2_IMMUTABLE_FL (0x00000010) /* Immutable file */
+#define OCFS2_APPEND_FL (0x00000020) /* writes to file may only append */
+#define OCFS2_NODUMP_FL (0x00000040) /* do not dump file */
+#define OCFS2_NOATIME_FL (0x00000080) /* do not update atime */
+#define OCFS2_DIRSYNC_FL (0x00010000) /* dirsync behaviour (directories only) */
+
+#define OCFS2_FL_VISIBLE (0x000100FF) /* User visible flags */
+#define OCFS2_FL_MODIFIABLE (0x000100FF) /* User modifiable flags */
+
/*
+ * ioctl commands
+ */
+#define OCFS2_IOC_GETFLAGS _IOR('f', 1, long)
+#define OCFS2_IOC_SETFLAGS _IOW('f', 2, long)
+
+/*
* Journal Flags (ocfs2_dinode.id1.journal1.i_flags)
*/
#define OCFS2_JOURNAL_DIRTY_FL (0x00000001) /* Journal needs recovery */
@@ -399,7 +419,9 @@
__le32 i_atime_nsec;
__le32 i_ctime_nsec;
__le32 i_mtime_nsec;
-/*70*/ __le64 i_reserved1[9];
+ __le32 i_attr;
+ __le32 i_reserved1;
+/*70*/ __le64 i_reserved2[8];
/*B8*/ union {
__le64 i_pad1; /* Generic way to refer to this
64bit union */
Modified: trunk/libocfs2/inode.c
===================================================================
--- trunk/libocfs2/inode.c 2006-07-05 19:21:14 UTC (rev 1210)
+++ trunk/libocfs2/inode.c 2006-07-05 21:02:23 UTC (rev 1211)
@@ -169,6 +169,7 @@
di->i_atime_nsec = bswap_32(di->i_atime_nsec);
di->i_ctime_nsec = bswap_32(di->i_ctime_nsec);
di->i_mtime_nsec = bswap_32(di->i_mtime_nsec);
+ di->i_attr = bswap_32(di->i_attr);
}
static int has_extents(struct ocfs2_dinode *di)
More information about the Ocfs2-tools-commits
mailing list