This is in preparation for the y2038 changes for the vfs. vfs inode timestamps overflow after 2038.
This abstracts the timestamp representation so that any logic to convert between the struct inode timestamps and other interfaces can be placed here.
The plan is to globally change all references to these types through macros only. So when the actually internal representation changes, it will be transparent everywhere outside of the macros.
The internal representation changes will support larger timestamp range.
Signed-off-by: Deepa Dinamani deepa.kernel@gmail.com --- include/linux/fs.h | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/include/linux/fs.h b/include/linux/fs.h index 14ffad4..ab8799c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -679,6 +679,11 @@ struct inode { void *i_private; /* fs or device private pointer */ };
+#define FS_INODE_SET_XTIME(xtime, inode, ts) \ + ((inode)->i_##xtime = (ts)) +#define FS_INODE_GET_XTIME(xtime, inode) \ + ((inode)->i_##xtime) + static inline int inode_unhashed(struct inode *inode) { return hlist_unhashed(&inode->i_hash);