]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: move the di_flushiter field to struct xfs_inode
authorChristoph Hellwig <hch@lst.de>
Wed, 30 Jun 2021 22:33:57 +0000 (18:33 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Wed, 30 Jun 2021 22:33:57 +0000 (18:33 -0400)
Source kernel commit: 965e0a1ad273ba61a8040220ef8ec09c9d065875

In preparation of removing the historic icinode struct, move the
flushiter field into the containing xfs_inode structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_inode.h
libxfs/xfs_inode_buf.c
libxfs/xfs_inode_buf.h
repair/phase6.c

index 056ac104f5a6820660efa2bf7af4f2cb4240db1c..d7168d087705b14d841554653ca50a099dd3a306 100644 (file)
@@ -83,6 +83,7 @@ typedef struct xfs_inode {
        prid_t                  i_projid;       /* owner's project id */
        xfs_extlen_t            i_extsize;      /* basic/minimum extent size */
        xfs_extlen_t            i_cowextsize;   /* basic cow extent size */
+       uint16_t                i_flushiter;    /* incremented on flush */
        struct xfs_icdinode     i_d;            /* most of ondisk inode */
 
        xfs_extnum_t            i_cnextents;    /* # of extents in cow fork */
index 3ab25420876e731f127513cfce54cf8c47cf86f9..252ff3d631bbcb2a94609e02ba457f9582d836cf 100644 (file)
@@ -190,7 +190,7 @@ xfs_inode_from_disk(
         * inode. If the inode is unused, mode is zero and we shouldn't mess
         * with the uninitialized part of it.
         */
-       to->di_flushiter = be16_to_cpu(from->di_flushiter);
+       ip->i_flushiter = be16_to_cpu(from->di_flushiter);
        inode->i_generation = be32_to_cpu(from->di_gen);
        inode->i_mode = be16_to_cpu(from->di_mode);
        if (!inode->i_mode)
@@ -324,7 +324,7 @@ xfs_inode_to_disk(
                to->di_flushiter = 0;
        } else {
                to->di_version = 2;
-               to->di_flushiter = cpu_to_be16(from->di_flushiter);
+               to->di_flushiter = cpu_to_be16(ip->i_flushiter);
        }
 }
 
index 77d250dbe9684813ae00bba12b477588d2f6a041..e41a11bef044369a22bd04334d0a01ab15a64422 100644 (file)
@@ -16,7 +16,6 @@ struct xfs_dinode;
  * format specific structures at the appropriate time.
  */
 struct xfs_icdinode {
-       uint16_t        di_flushiter;   /* incremented on flush */
        uint8_t         di_forkoff;     /* attr fork offs, <<3 for 64b align */
        uint16_t        di_flags;       /* random flags, XFS_DIFLAG_... */
 
index 29606b0298d660126c5dd2e6dcb3d89532a6add0..252cd24aa4eed7f904ab205b22eac1263be0ad7b 100644 (file)
@@ -446,6 +446,7 @@ reset_inode_fields(struct xfs_inode *ip)
        ip->i_nblocks = 0;
        ip->i_extsize = 0;
        ip->i_cowextsize = 0;
+       ip->i_flushiter = 0;
 }
 
 static void