From: Darrick J. Wong Date: Fri, 5 Oct 2018 02:36:10 +0000 (-0500) Subject: xfs: refactor unmount record write X-Git-Tag: v4.19.0-rc0~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecefbcbfffa527d05342ce159574863e557f8618;p=thirdparty%2Fxfsprogs-dev.git xfs: refactor unmount record write Source kernel commit: 53235f22151ea7229e1251e46e68098bcf74922d Refactor the writing of the unmount record into a separate helper. No functionality changes. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_log_format.h b/libxfs/xfs_log_format.h index 79bb79853..e5f97c69b 100644 --- a/libxfs/xfs_log_format.h +++ b/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