Re: [PATCH 09/15] xfs: remove timestamps from incore inode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 17, 2016 at 06:20:46PM +1100, Dave Chinner wrote:
> From: Dave Chinner <dchinner@xxxxxxxxxx>
> 
> Source kernel commit 3987848c7c2be112e03c82d03821b044f1c0edec
> 
> The struct xfs_inode has two copies of the current timestamps in it,
> one in the vfs inode and one in the struct xfs_icdinode. Now that we
> no longer log the struct xfs_icdinode directly, we don't need to
> keep the timestamps in this structure. instead we can copy them
> straight out of the VFS inode when formatting the inode log item or
> the on-disk inode.
> 
> This reduces the struct xfs_inode in size by 24 bytes.
> 
> Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
> Reviewed-by: Brian Foster <bfoster@xxxxxxxxxx>
> Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Dave Chinner <david@xxxxxxxxxxxxx>
> ---
>  db/check.c               | 106 +++++++++++++++++++++++------------------------
>  include/xfs_inode.h      |  16 ++++++-
>  libxfs/libxfs_api_defs.h |   4 +-
>  libxfs/util.c            |  17 ++++----
>  libxfs/xfs_inode_buf.c   |  91 ++++++++++++++++++++++++++++++++++------
>  libxfs/xfs_inode_buf.h   |   9 ++--
>  libxfs/xfs_rtbitmap.c    |   2 +-
>  mkfs/proto.c             |   2 +-
>  8 files changed, 162 insertions(+), 85 deletions(-)
> 
...
> diff --git a/mkfs/proto.c b/mkfs/proto.c
> index 21960d5..72a1576 100644
> --- a/mkfs/proto.c
> +++ b/mkfs/proto.c
> @@ -653,7 +653,7 @@ rtinit(
>  	mp->m_sb.sb_rbmino = rbmip->i_ino;
>  	rbmip->i_d.di_size = mp->m_sb.sb_rbmblocks * mp->m_sb.sb_blocksize;
>  	rbmip->i_d.di_flags = XFS_DIFLAG_NEWRTBM;
> -	*(__uint64_t *)&rbmip->i_d.di_atime = 0;
> +	*(__uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0;

FYI, this bit causes a NULL dereference because we've switched to using
mp->m_rbmip instead of rbmip, and mp->m_rbmip is not initialized until
just below. I assume this can be fixed in-tree...

Brian

>  	libxfs_trans_log_inode(tp, rbmip, XFS_ILOG_CORE);
>  	libxfs_log_sb(tp);
>  	mp->m_rbmip = rbmip;
> -- 
> 2.7.0
> 
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux