Skip to content

Commit ef1e275

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
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>
1 parent fe985b9 commit ef1e275

3 files changed

Lines changed: 19 additions & 19 deletions

File tree

fs/xfs/libxfs/xfs_log_format.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ struct xlog_rec_ext_header {
136136
#define XLOG_REC_EXT_SIZE \
137137
offsetofend(struct xlog_rec_ext_header, xh_cycle_data)
138138

139-
typedef struct xlog_rec_header {
139+
struct xlog_rec_header {
140140
__be32 h_magicno; /* log record (LR) identifier : 4 */
141141
__be32 h_cycle; /* write cycle of log : 4 */
142142
__be32 h_version; /* LR version : 4 */
@@ -174,7 +174,7 @@ typedef struct xlog_rec_header {
174174

175175
__u8 h_reserved[184];
176176
struct xlog_rec_ext_header h_ext[];
177-
} xlog_rec_header_t;
177+
};
178178

179179
#ifdef __i386__
180180
#define XLOG_REC_SIZE offsetofend(struct xlog_rec_header, h_size)

fs/xfs/xfs_log.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2578,9 +2578,9 @@ xlog_state_get_iclog_space(
25782578
struct xlog_ticket *ticket,
25792579
int *logoffsetp)
25802580
{
2581-
int log_offset;
2582-
xlog_rec_header_t *head;
2583-
xlog_in_core_t *iclog;
2581+
int log_offset;
2582+
struct xlog_rec_header *head;
2583+
struct xlog_in_core *iclog;
25842584

25852585
restart:
25862586
spin_lock(&log->l_icloglock);

fs/xfs/xfs_log_recover.c

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,8 @@ xlog_bwrite(
190190
*/
191191
STATIC void
192192
xlog_header_check_dump(
193-
xfs_mount_t *mp,
194-
xlog_rec_header_t *head)
193+
struct xfs_mount *mp,
194+
struct xlog_rec_header *head)
195195
{
196196
xfs_debug(mp, "%s: SB : uuid = %pU, fmt = %d",
197197
__func__, &mp->m_sb.sb_uuid, XLOG_FMT);
@@ -207,8 +207,8 @@ xlog_header_check_dump(
207207
*/
208208
STATIC int
209209
xlog_header_check_recover(
210-
xfs_mount_t *mp,
211-
xlog_rec_header_t *head)
210+
struct xfs_mount *mp,
211+
struct xlog_rec_header *head)
212212
{
213213
ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
214214

@@ -238,8 +238,8 @@ xlog_header_check_recover(
238238
*/
239239
STATIC int
240240
xlog_header_check_mount(
241-
xfs_mount_t *mp,
242-
xlog_rec_header_t *head)
241+
struct xfs_mount *mp,
242+
struct xlog_rec_header *head)
243243
{
244244
ASSERT(head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM));
245245

@@ -400,7 +400,7 @@ xlog_find_verify_log_record(
400400
xfs_daddr_t i;
401401
char *buffer;
402402
char *offset = NULL;
403-
xlog_rec_header_t *head = NULL;
403+
struct xlog_rec_header *head = NULL;
404404
int error = 0;
405405
int smallmem = 0;
406406
int num_blks = *last_blk - start_blk;
@@ -437,7 +437,7 @@ xlog_find_verify_log_record(
437437
goto out;
438438
}
439439

440-
head = (xlog_rec_header_t *)offset;
440+
head = (struct xlog_rec_header *)offset;
441441

442442
if (head->h_magicno == cpu_to_be32(XLOG_HEADER_MAGIC_NUM))
443443
break;
@@ -1237,7 +1237,7 @@ xlog_find_tail(
12371237
xfs_daddr_t *head_blk,
12381238
xfs_daddr_t *tail_blk)
12391239
{
1240-
xlog_rec_header_t *rhead;
1240+
struct xlog_rec_header *rhead;
12411241
char *offset = NULL;
12421242
char *buffer;
12431243
int error;
@@ -1487,7 +1487,7 @@ xlog_add_record(
14871487
int tail_cycle,
14881488
int tail_block)
14891489
{
1490-
xlog_rec_header_t *recp = (xlog_rec_header_t *)buf;
1490+
struct xlog_rec_header *recp = (struct xlog_rec_header *)buf;
14911491

14921492
memset(buf, 0, BBSIZE);
14931493
recp->h_magicno = cpu_to_be32(XLOG_HEADER_MAGIC_NUM);
@@ -2997,7 +2997,7 @@ xlog_do_recovery_pass(
29972997
int pass,
29982998
xfs_daddr_t *first_bad) /* out: first bad log rec */
29992999
{
3000-
xlog_rec_header_t *rhead;
3000+
struct xlog_rec_header *rhead;
30013001
xfs_daddr_t blk_no, rblk_no;
30023002
xfs_daddr_t rhead_blk;
30033003
char *offset;
@@ -3034,7 +3034,7 @@ xlog_do_recovery_pass(
30343034
if (error)
30353035
goto bread_err1;
30363036

3037-
rhead = (xlog_rec_header_t *)offset;
3037+
rhead = (struct xlog_rec_header *)offset;
30383038

30393039
/*
30403040
* xfsprogs has a bug where record length is based on lsunit but
@@ -3141,7 +3141,7 @@ xlog_do_recovery_pass(
31413141
if (error)
31423142
goto bread_err2;
31433143
}
3144-
rhead = (xlog_rec_header_t *)offset;
3144+
rhead = (struct xlog_rec_header *)offset;
31453145
error = xlog_valid_rec_header(log, rhead,
31463146
split_hblks ? blk_no : 0, h_size);
31473147
if (error)
@@ -3223,7 +3223,7 @@ xlog_do_recovery_pass(
32233223
if (error)
32243224
goto bread_err2;
32253225

3226-
rhead = (xlog_rec_header_t *)offset;
3226+
rhead = (struct xlog_rec_header *)offset;
32273227
error = xlog_valid_rec_header(log, rhead, blk_no, h_size);
32283228
if (error)
32293229
goto bread_err2;

0 commit comments

Comments
 (0)