summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_inode.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2021-03-29 11:11:40 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-04-07 14:37:03 -0700
commit13d2c10b05d8e67cb9b4c2d1d4a09a906148a72e (patch)
tree582381231aeb2c1f8933cce50408dd2c676bf609 /fs/xfs/xfs_inode.h
parentceaf603c7024d3c021803a3e90e893feda8d76e2 (diff)
xfs: move the di_size field to struct xfs_inode
In preparation of removing the historic icinode struct, move the on-disk size 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>
Diffstat (limited to 'fs/xfs/xfs_inode.h')
-rw-r--r--fs/xfs/xfs_inode.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/xfs/xfs_inode.h b/fs/xfs/xfs_inode.h
index 5eb1327b4409..592ac6d18b92 100644
--- a/fs/xfs/xfs_inode.h
+++ b/fs/xfs/xfs_inode.h
@@ -54,6 +54,7 @@ typedef struct xfs_inode {
/* Miscellaneous state. */
unsigned long i_flags; /* see defined flags below */
uint64_t i_delayed_blks; /* count of delay alloc blks */
+ xfs_fsize_t i_disk_size; /* number of bytes in file */
prid_t i_projid; /* owner's project id */
struct xfs_icdinode i_d; /* most of ondisk inode */
@@ -88,7 +89,7 @@ static inline xfs_fsize_t XFS_ISIZE(struct xfs_inode *ip)
{
if (S_ISREG(VFS_I(ip)->i_mode))
return i_size_read(VFS_I(ip));
- return ip->i_d.di_size;
+ return ip->i_disk_size;
}
/*
@@ -102,7 +103,7 @@ xfs_new_eof(struct xfs_inode *ip, xfs_fsize_t new_size)
if (new_size > i_size || new_size < 0)
new_size = i_size;
- return new_size > ip->i_d.di_size ? new_size : 0;
+ return new_size > ip->i_disk_size ? new_size : 0;
}
/*