mirror of https://github.com/torvalds/linux.git
xfs: remove the xlog_rec_header_t typedef
There are almost no users of the typedef left, kill it and switch the remaining users to use the underlying struct. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
fe985b910e
commit
ef1e275638
|
|
@ -136,7 +136,7 @@ struct xlog_rec_ext_header {
|
||||||
#define XLOG_REC_EXT_SIZE \
|
#define XLOG_REC_EXT_SIZE \
|
||||||
offsetofend(struct xlog_rec_ext_header, xh_cycle_data)
|
offsetofend(struct xlog_rec_ext_header, xh_cycle_data)
|
||||||
|
|
||||||
typedef struct xlog_rec_header {
|
struct xlog_rec_header {
|
||||||
__be32 h_magicno; /* log record (LR) identifier : 4 */
|
__be32 h_magicno; /* log record (LR) identifier : 4 */
|
||||||
__be32 h_cycle; /* write cycle of log : 4 */
|
__be32 h_cycle; /* write cycle of log : 4 */
|
||||||
__be32 h_version; /* LR version : 4 */
|
__be32 h_version; /* LR version : 4 */
|
||||||
|
|
@ -174,7 +174,7 @@ typedef struct xlog_rec_header {
|
||||||
|
|
||||||
__u8 h_reserved[184];
|
__u8 h_reserved[184];
|
||||||
struct xlog_rec_ext_header h_ext[];
|
struct xlog_rec_ext_header h_ext[];
|
||||||
} xlog_rec_header_t;
|
};
|
||||||
|
|
||||||
#ifdef __i386__
|
#ifdef __i386__
|
||||||
#define XLOG_REC_SIZE offsetofend(struct xlog_rec_header, h_size)
|
#define XLOG_REC_SIZE offsetofend(struct xlog_rec_header, h_size)
|
||||||
|
|
|
||||||
|
|
@ -2578,9 +2578,9 @@ xlog_state_get_iclog_space(
|
||||||
struct xlog_ticket *ticket,
|
struct xlog_ticket *ticket,
|
||||||
int *logoffsetp)
|
int *logoffsetp)
|
||||||
{
|
{
|
||||||
int log_offset;
|
int log_offset;
|
||||||
xlog_rec_header_t *head;
|
struct xlog_rec_header *head;
|
||||||
xlog_in_core_t *iclog;
|
struct xlog_in_core *iclog;
|
||||||
|
|
||||||
restart:
|
restart:
|
||||||
spin_lock(&log->l_icloglock);
|
spin_lock(&log->l_icloglock);
|
||||||
|
|
|
||||||
|
|
@ -190,8 +190,8 @@ xlog_bwrite(
|
||||||
*/
|
*/
|
||||||
STATIC void
|
STATIC void
|
||||||
xlog_header_check_dump(
|
xlog_header_check_dump(
|
||||||
xfs_mount_t *mp,
|
struct xfs_mount *mp,
|
||||||
xlog_rec_header_t *head)
|
struct xlog_rec_header *head)
|
||||||
{
|
{
|
||||||
xfs_debug(mp, "%s: SB : uuid = %pU, fmt = %d",
|
xfs_debug(mp, "%s: SB : uuid = %pU, fmt = %d",
|
||||||
__func__, &mp->m_sb.sb_uuid, XLOG_FMT);
|
__func__, &mp->m_sb.sb_uuid, XLOG_FMT);
|
||||||
|
|
@ -207,8 +207,8 @@ xlog_header_check_dump(
|
||||||
*/
|
*/
|
||||||
STATIC int
|
STATIC int
|
||||||
xlog_header_check_recover(
|
xlog_header_check_recover(
|
||||||
xfs_mount_t *mp,
|
struct xfs_mount *mp,
|
||||||
xlog_rec_header_t *head)
|
struct xlog_rec_header *head)
|
||||||
{
|
{
|
||||||
ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
|
ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
|
||||||
|
|
||||||
|
|
@ -238,8 +238,8 @@ xlog_header_check_recover(
|
||||||
*/
|
*/
|
||||||
STATIC int
|
STATIC int
|
||||||
xlog_header_check_mount(
|
xlog_header_check_mount(
|
||||||
xfs_mount_t *mp,
|
struct xfs_mount *mp,
|
||||||
xlog_rec_header_t *head)
|
struct xlog_rec_header *head)
|
||||||
{
|
{
|
||||||
ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
|
ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
|
||||||
|
|
||||||
|
|
@ -400,7 +400,7 @@ xlog_find_verify_log_record(
|
||||||
xfs_daddr_t i;
|
xfs_daddr_t i;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
char *offset = NULL;
|
char *offset = NULL;
|
||||||
xlog_rec_header_t *head = NULL;
|
struct xlog_rec_header *head = NULL;
|
||||||
int error = 0;
|
int error = 0;
|
||||||
int smallmem = 0;
|
int smallmem = 0;
|
||||||
int num_blks = *last_blk - start_blk;
|
int num_blks = *last_blk - start_blk;
|
||||||
|
|
@ -437,7 +437,7 @@ xlog_find_verify_log_record(
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
head = (xlog_rec_header_t *)offset;
|
head = (struct xlog_rec_header *)offset;
|
||||||
|
|
||||||
if (head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM))
|
if (head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM))
|
||||||
break;
|
break;
|
||||||
|
|
@ -1237,7 +1237,7 @@ xlog_find_tail(
|
||||||
xfs_daddr_t *head_blk,
|
xfs_daddr_t *head_blk,
|
||||||
xfs_daddr_t *tail_blk)
|
xfs_daddr_t *tail_blk)
|
||||||
{
|
{
|
||||||
xlog_rec_header_t *rhead;
|
struct xlog_rec_header *rhead;
|
||||||
char *offset = NULL;
|
char *offset = NULL;
|
||||||
char *buffer;
|
char *buffer;
|
||||||
int error;
|
int error;
|
||||||
|
|
@ -1487,7 +1487,7 @@ xlog_add_record(
|
||||||
int tail_cycle,
|
int tail_cycle,
|
||||||
int tail_block)
|
int tail_block)
|
||||||
{
|
{
|
||||||
xlog_rec_header_t *recp = (xlog_rec_header_t *)buf;
|
struct xlog_rec_header *recp = (struct xlog_rec_header *)buf;
|
||||||
|
|
||||||
memset(buf, 0, BBSIZE);
|
memset(buf, 0, BBSIZE);
|
||||||
recp->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM);
|
recp->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM);
|
||||||
|
|
@ -2997,7 +2997,7 @@ xlog_do_recovery_pass(
|
||||||
int pass,
|
int pass,
|
||||||
xfs_daddr_t *first_bad) /* out: first bad log rec */
|
xfs_daddr_t *first_bad) /* out: first bad log rec */
|
||||||
{
|
{
|
||||||
xlog_rec_header_t *rhead;
|
struct xlog_rec_header *rhead;
|
||||||
xfs_daddr_t blk_no, rblk_no;
|
xfs_daddr_t blk_no, rblk_no;
|
||||||
xfs_daddr_t rhead_blk;
|
xfs_daddr_t rhead_blk;
|
||||||
char *offset;
|
char *offset;
|
||||||
|
|
@ -3034,7 +3034,7 @@ xlog_do_recovery_pass(
|
||||||
if (error)
|
if (error)
|
||||||
goto bread_err1;
|
goto bread_err1;
|
||||||
|
|
||||||
rhead = (xlog_rec_header_t *)offset;
|
rhead = (struct xlog_rec_header *)offset;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* xfsprogs has a bug where record length is based on lsunit but
|
* xfsprogs has a bug where record length is based on lsunit but
|
||||||
|
|
@ -3141,7 +3141,7 @@ xlog_do_recovery_pass(
|
||||||
if (error)
|
if (error)
|
||||||
goto bread_err2;
|
goto bread_err2;
|
||||||
}
|
}
|
||||||
rhead = (xlog_rec_header_t *)offset;
|
rhead = (struct xlog_rec_header *)offset;
|
||||||
error = xlog_valid_rec_header(log, rhead,
|
error = xlog_valid_rec_header(log, rhead,
|
||||||
split_hblks ? blk_no : 0, h_size);
|
split_hblks ? blk_no : 0, h_size);
|
||||||
if (error)
|
if (error)
|
||||||
|
|
@ -3223,7 +3223,7 @@ xlog_do_recovery_pass(
|
||||||
if (error)
|
if (error)
|
||||||
goto bread_err2;
|
goto bread_err2;
|
||||||
|
|
||||||
rhead = (xlog_rec_header_t *)offset;
|
rhead = (struct xlog_rec_header *)offset;
|
||||||
error = xlog_valid_rec_header(log, rhead, blk_no, h_size);
|
error = xlog_valid_rec_header(log, rhead, blk_no, h_size);
|
||||||
if (error)
|
if (error)
|
||||||
goto bread_err2;
|
goto bread_err2;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue