]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Add versioning to the on disk inode which we increment on each
authorSteve Lord <lord@sgi.com>
Wed, 6 Aug 2003 21:17:06 +0000 (21:17 +0000)
committerSteve Lord <lord@sgi.com>
Wed, 6 Aug 2003 21:17:06 +0000 (21:17 +0000)
flush call. This is used during recovery to avoid replaying an
older copy of the inode from the log. We can do this without
versioning the filesystem as the pad space we borrowed was
always zero and will be ignored by old kernels.
Print out the new inode field

db/inode.c
include/xfs_dinode.h
logprint/log_print_all.c

index fa1e4ec5e92a7dfe423f4ede1ff319800516eb2d..e69e39c262af100abc2dfe2ef6561034fa245ffb 100644 (file)
@@ -99,6 +99,7 @@ const field_t inode_core_flds[] = {
          FLD_COUNT, TYP_NONE },
        { "uid", FLDT_UINT32D, OI(COFF(uid)), C1, 0, TYP_NONE },
        { "gid", FLDT_UINT32D, OI(COFF(gid)), C1, 0, TYP_NONE },
+       { "flushiter", FLDT_UINT16D, OI(COFF(flushiter)), C1, 0, TYP_NONE },
        { "atime", FLDT_TIMESTAMP, OI(COFF(atime)), C1, 0, TYP_NONE },
        { "mtime", FLDT_TIMESTAMP, OI(COFF(mtime)), C1, 0, TYP_NONE },
        { "ctime", FLDT_TIMESTAMP, OI(COFF(ctime)), C1, 0, TYP_NONE },
index 89bd040b445a5f49f5271cf1d7bd8960bdf72c6d..0af61bc72bd54ee65669143483b27cc7f8aea1c5 100644 (file)
@@ -72,7 +72,8 @@ typedef struct xfs_dinode_core
        __uint32_t      di_gid;         /* owner's group id */
        __uint32_t      di_nlink;       /* number of links to file */
        __uint16_t      di_projid;      /* owner's project id */
-       __uint8_t       di_pad[10];     /* unused, zeroed space */
+       __uint8_t       di_pad[8];      /* unused, zeroed space */
+       __uint16_t      di_flushiter;   /* incremented on flush */
        xfs_timestamp_t di_atime;       /* time last accessed */
        xfs_timestamp_t di_mtime;       /* time last modified */
        xfs_timestamp_t di_ctime;       /* time created/inode modified */
@@ -89,6 +90,8 @@ typedef struct xfs_dinode_core
        __uint32_t      di_gen;         /* generation number */
 } xfs_dinode_core_t;
 
+#define DI_MAX_FLUSH 0xffff
+
 typedef struct xfs_dinode
 {
        xfs_dinode_core_t       di_core;
index 7e47fe71a93ab5e4936e0cede24634b8fbb754b1..850b1c05d4a7195146ab31277cb2f5a0806c88fb 100644 (file)
@@ -274,6 +274,7 @@ xlog_recover_print_inode_core(
               di->di_uid, di->di_gid, di->di_nlink, (uint)di->di_projid);
        printf("                atime:%d  mtime:%d  ctime:%d\n",
               di->di_atime.t_sec, di->di_mtime.t_sec, di->di_ctime.t_sec);
+       printf("                flushiter:%d\n", di->di_flushiter);
        printf("                size:0x%llx  nblks:0x%llx  exsize:%d  "
             "nextents:%d  anextents:%d\n", (unsigned long long)
               di->di_size, (unsigned long long)di->di_nblocks,