Re: [PATCH 07/11] xfs: convert struct xfs_timestamp to union

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

 



On Sat, Aug 22, 2020 at 08:18:30AM +0100, Christoph Hellwig wrote:
> On Thu, Aug 20, 2020 at 07:12:15PM -0700, Darrick J. Wong wrote:
> > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > 
> > Convert the xfs_timestamp struct to a union so that we can overload it
> > in the next patch.
> > 
> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> > Reviewed-by: Amir Goldstein <amir73il@xxxxxxxxx>
> > ---
> >  fs/xfs/libxfs/xfs_format.h     |   16 +++++++++-------
> >  fs/xfs/libxfs/xfs_inode_buf.c  |    4 ++--
> >  fs/xfs/libxfs/xfs_inode_buf.h  |    4 ++--
> >  fs/xfs/libxfs/xfs_log_format.h |   16 +++++++++-------
> >  fs/xfs/scrub/inode.c           |    2 +-
> >  fs/xfs/xfs_inode_item.c        |    6 +++---
> >  fs/xfs/xfs_ondisk.h            |    4 ++--
> >  7 files changed, 28 insertions(+), 24 deletions(-)
> > 
> > 
> > diff --git a/fs/xfs/libxfs/xfs_format.h b/fs/xfs/libxfs/xfs_format.h
> > index 1f3a2be6c396..772113db41aa 100644
> > --- a/fs/xfs/libxfs/xfs_format.h
> > +++ b/fs/xfs/libxfs/xfs_format.h
> > @@ -856,9 +856,11 @@ struct xfs_agfl {
> >   * Inode timestamps consist of signed 32-bit counters for seconds and
> >   * nanoseconds; time zero is the Unix epoch, Jan  1 00:00:00 UTC 1970.
> >   */
> > -struct xfs_timestamp {
> > -	__be32		t_sec;		/* timestamp seconds */
> > -	__be32		t_nsec;		/* timestamp nanoseconds */
> > +union xfs_timestamp {
> > +	struct {
> > +		__be32		t_sec;		/* timestamp seconds */
> > +		__be32		t_nsec;		/* timestamp nanoseconds */
> > +	};
> >  };
> 
> Wouldn't it make sense to merge the typedef removal patch into this
> one to avoid touching all the users twice?

Will fix.  I wasn't sure if people would howl about making both changes
at once, and it's easier to combine two patches. ;)

--D



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux