Re: [RFC] [PATCH] ext3 nanosecond timestamps
Johann Lombardi <[email protected]>
| Newsgroups | gmane.comp.file-systems.ext2.devel |
|---|---|
| Message-ID | <20060621203805.GA11185@lombardij> |
Hi Andreas,
> +#define EXT3_INODE_SET_XTIME(xtime, extra_xtime, inode, raw_inode) \
> +do { \
> + (raw_inode)->xtime = cpu_to_le32((inode)->xtime.tv_sec); \
> + \
> + if (offsetof(typeof(*raw_inode), extra_xtime) - \
> + offsetof(typeof(*raw_inode), i_extra_isize) + \
> + sizeof((raw_inode)->extra_xtime) <= (raw_inode)->i_extra_isize) \
> + (raw_inode)->extra_xtime = \
> + cpu_to_le32((sizeof((inode)->xtime.tv_sec) > 4 ? \
> + ((__u64)(inode)->xtime.tv_sec >> 32) : 0)|\
> + (((inode)->xtime.tv_nsec << 2) & \
> + EXT3_NSEC_MASK)); \
> +} while (0)
> +
> +#define EXT3_INODE_GET_XTIME(xtime, extra_xtime, inode, raw_inode) \
> +do { \
> + (inode)->xtime.tv_sec = le32_to_cpu((raw_inode)->xtime); \
> + \
> + if (offsetof(typeof(*raw_inode), extra_xtime) - \
> + offsetof(typeof(*raw_inode), i_extra_isize) + \
> + sizeof((raw_inode)->extra_xtime) <= (raw_inode)->i_extra_isize) { \
> + if (sizeof((inode)->xtime.tv_sec) > 4) \
> + (inode)->xtime.tv_sec |= \
> + (__u64)(le32_to_cpu((raw_inode)->extra_xtime) &\
> + EXT3_EPOCH_MASK) << 32; \
> + (inode)->xtime.tv_nsec = \
> + (le32_to_cpu((raw_inode)->extra_xtime) & \
> + EXT3_NSEC_MASK) >> 2; \
> + } \
> +} while (0)
Both of these macros directly use raw_inode->i_extra_isize.
Shouldn't it be le16_to_cpu(raw_inode->i_extra_isize) instead?
Johann
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=107521&bid=248729&dat=121642