From 53235f22151ea7229e1251e46e68098bcf74922d Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Fri, 20 Jul 2018 09:28:39 -0700 Subject: xfs: refactor unmount record write Refactor the writing of the unmount record into a separate helper. No functionality changes. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- fs/xfs/libxfs/xfs_log_format.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'fs/xfs/libxfs') diff --git a/fs/xfs/libxfs/xfs_log_format.h b/fs/xfs/libxfs/xfs_log_format.h index 79bb79853c9f..e5f97c69b320 100644 --- a/fs/xfs/libxfs/xfs_log_format.h +++ b/fs/xfs/libxfs/xfs_log_format.h @@ -77,6 +77,19 @@ static inline uint xlog_get_cycle(char *ptr) #define XLOG_UNMOUNT_TYPE 0x556e /* Un for Unmount */ +/* + * Log item for unmount records. + * + * The unmount record used to have a string "Unmount filesystem--" in the + * data section where the "Un" was really a magic number (XLOG_UNMOUNT_TYPE). + * We just write the magic number now; see xfs_log_unmount_write. + */ +struct xfs_unmount_log_format { + uint16_t magic; /* XLOG_UNMOUNT_TYPE */ + uint16_t pad1; + uint32_t pad2; /* may as well make it 64 bits */ +}; + /* Region types for iovec's i_type */ #define XLOG_REG_TYPE_BFORMAT 1 #define XLOG_REG_TYPE_BCHUNK 2 -- cgit v1.2.1