| To: | Jeff Liu <jeff.liu@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 4/9] xfs: Use defines for CRC offsets in all cases |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Thu, 20 Feb 2014 11:27:13 +1100 |
| Cc: | Eric Sandeen <sandeen@xxxxxxxxxx>, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <530463C6.6050509@xxxxxxxxxx> |
| References: | <1392767549-25574-1-git-send-email-sandeen@xxxxxxxxxx> <1392767549-25574-5-git-send-email-sandeen@xxxxxxxxxx> <530463C6.6050509@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Wed, Feb 19, 2014 at 03:56:54PM +0800, Jeff Liu wrote:
> Hi Eric,
>
> I read the previous comments from Dave about using defines for CRC offsets,
> and with a grep search after applying this patch, looks there have another
> two places maybe we should switch them to the macros as well:
>
> fs/xfs/xfs_log.c:
> Do we need a log record crc offset macros for offsetof(struct
> xlog_rec_header, h_crc))?
>
> xfs_dinode.h:
> we added the XFS_DINODE_CRC_OFF, just use it at below routine?
>
> static inline uint xfs_dinode_size(int version)
> {
> if (version == 3)
> return sizeof(struct xfs_dinode);
> return offsetof(struct xfs_dinode, di_crc);
> }
No, that's a different case - it's not being used for determining
the offset of a CRC varaible - it's being used to calculate the size
of the version 2 inode core. Hence it should remain open coded like
because it has a different purpose in life....
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|
| Previous by Date: | Re: [PATCH 1/3] xfs: always do log forces via the workqueue, Dave Chinner |
|---|---|
| Next by Date: | Re: [PATCH v3 06/11] xfs: use and update the finobt on inode allocation, Dave Chinner |
| Previous by Thread: | Re: [PATCH 4/9] xfs: Use defines for CRC offsets in all cases, Jeff Liu |
| Next by Thread: | Re: [PATCH 4/9] xfs: Use defines for CRC offsets in all cases, Jeff Liu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |