Skip to content

Commit f7bdf03

Browse files
Mark TinguelyBen Myers
authored andcommitted
xfs: rename log structure to xlog
Rename the XFS log structure to xlog to help crash distinquish it from the other logs in Linux. Signed-off-by: Mark Tinguely <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Ben Myers <[email protected]>
1 parent 8866fc6 commit f7bdf03

File tree

6 files changed

+116
-88
lines changed

6 files changed

+116
-88
lines changed

fs/xfs/xfs_log.c

Lines changed: 44 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,21 @@
3838
kmem_zone_t *xfs_log_ticket_zone;
3939

4040
/* Local miscellaneous function prototypes */
41-
STATIC int xlog_commit_record(struct log *log, struct xlog_ticket *ticket,
42-
xlog_in_core_t **, xfs_lsn_t *);
41+
STATIC int
42+
xlog_commit_record(
43+
struct xlog *log,
44+
struct xlog_ticket *ticket,
45+
struct xlog_in_core **iclog,
46+
xfs_lsn_t *commitlsnp);
47+
4348
STATIC xlog_t * xlog_alloc_log(xfs_mount_t *mp,
4449
xfs_buftarg_t *log_target,
4550
xfs_daddr_t blk_offset,
4651
int num_bblks);
47-
STATIC int xlog_space_left(struct log *log, atomic64_t *head);
52+
STATIC int
53+
xlog_space_left(
54+
struct xlog *log,
55+
atomic64_t *head);
4856
STATIC int xlog_sync(xlog_t *log, xlog_in_core_t *iclog);
4957
STATIC void xlog_dealloc_log(xlog_t *log);
5058

@@ -64,16 +72,20 @@ STATIC void xlog_state_switch_iclogs(xlog_t *log,
6472
int eventual_size);
6573
STATIC void xlog_state_want_sync(xlog_t *log, xlog_in_core_t *iclog);
6674

67-
STATIC void xlog_grant_push_ail(struct log *log,
68-
int need_bytes);
75+
STATIC void
76+
xlog_grant_push_ail(
77+
struct xlog *log,
78+
int need_bytes);
6979
STATIC void xlog_regrant_reserve_log_space(xlog_t *log,
7080
xlog_ticket_t *ticket);
7181
STATIC void xlog_ungrant_log_space(xlog_t *log,
7282
xlog_ticket_t *ticket);
7383

7484
#if defined(DEBUG)
7585
STATIC void xlog_verify_dest_ptr(xlog_t *log, char *ptr);
76-
STATIC void xlog_verify_grant_tail(struct log *log);
86+
STATIC void
87+
xlog_verify_grant_tail(
88+
struct xlog *log);
7789
STATIC void xlog_verify_iclog(xlog_t *log, xlog_in_core_t *iclog,
7890
int count, boolean_t syncing);
7991
STATIC void xlog_verify_tail_lsn(xlog_t *log, xlog_in_core_t *iclog,
@@ -89,9 +101,9 @@ STATIC int xlog_iclogs_empty(xlog_t *log);
89101

90102
static void
91103
xlog_grant_sub_space(
92-
struct log *log,
93-
atomic64_t *head,
94-
int bytes)
104+
struct xlog *log,
105+
atomic64_t *head,
106+
int bytes)
95107
{
96108
int64_t head_val = atomic64_read(head);
97109
int64_t new, old;
@@ -115,9 +127,9 @@ xlog_grant_sub_space(
115127

116128
static void
117129
xlog_grant_add_space(
118-
struct log *log,
119-
atomic64_t *head,
120-
int bytes)
130+
struct xlog *log,
131+
atomic64_t *head,
132+
int bytes)
121133
{
122134
int64_t head_val = atomic64_read(head);
123135
int64_t new, old;
@@ -165,7 +177,7 @@ xlog_grant_head_wake_all(
165177

166178
static inline int
167179
xlog_ticket_reservation(
168-
struct log *log,
180+
struct xlog *log,
169181
struct xlog_grant_head *head,
170182
struct xlog_ticket *tic)
171183
{
@@ -182,7 +194,7 @@ xlog_ticket_reservation(
182194

183195
STATIC bool
184196
xlog_grant_head_wake(
185-
struct log *log,
197+
struct xlog *log,
186198
struct xlog_grant_head *head,
187199
int *free_bytes)
188200
{
@@ -204,7 +216,7 @@ xlog_grant_head_wake(
204216

205217
STATIC int
206218
xlog_grant_head_wait(
207-
struct log *log,
219+
struct xlog *log,
208220
struct xlog_grant_head *head,
209221
struct xlog_ticket *tic,
210222
int need_bytes)
@@ -256,7 +268,7 @@ xlog_grant_head_wait(
256268
*/
257269
STATIC int
258270
xlog_grant_head_check(
259-
struct log *log,
271+
struct xlog *log,
260272
struct xlog_grant_head *head,
261273
struct xlog_ticket *tic,
262274
int *need_bytes)
@@ -323,7 +335,7 @@ xfs_log_regrant(
323335
struct xfs_mount *mp,
324336
struct xlog_ticket *tic)
325337
{
326-
struct log *log = mp->m_log;
338+
struct xlog *log = mp->m_log;
327339
int need_bytes;
328340
int error = 0;
329341

@@ -389,7 +401,7 @@ xfs_log_reserve(
389401
bool permanent,
390402
uint t_type)
391403
{
392-
struct log *log = mp->m_log;
404+
struct xlog *log = mp->m_log;
393405
struct xlog_ticket *tic;
394406
int need_bytes;
395407
int error = 0;
@@ -465,7 +477,7 @@ xfs_log_done(
465477
struct xlog_in_core **iclog,
466478
uint flags)
467479
{
468-
struct log *log = mp->m_log;
480+
struct xlog *log = mp->m_log;
469481
xfs_lsn_t lsn = 0;
470482

471483
if (XLOG_FORCED_SHUTDOWN(log) ||
@@ -839,7 +851,7 @@ void
839851
xfs_log_space_wake(
840852
struct xfs_mount *mp)
841853
{
842-
struct log *log = mp->m_log;
854+
struct xlog *log = mp->m_log;
843855
int free_bytes;
844856

845857
if (XLOG_FORCED_SHUTDOWN(log))
@@ -917,7 +929,7 @@ xfs_lsn_t
917929
xlog_assign_tail_lsn_locked(
918930
struct xfs_mount *mp)
919931
{
920-
struct log *log = mp->m_log;
932+
struct xlog *log = mp->m_log;
921933
struct xfs_log_item *lip;
922934
xfs_lsn_t tail_lsn;
923935

@@ -966,7 +978,7 @@ xlog_assign_tail_lsn(
966978
*/
967979
STATIC int
968980
xlog_space_left(
969-
struct log *log,
981+
struct xlog *log,
970982
atomic64_t *head)
971983
{
972984
int free_bytes;
@@ -1278,7 +1290,7 @@ xlog_alloc_log(xfs_mount_t *mp,
12781290
*/
12791291
STATIC int
12801292
xlog_commit_record(
1281-
struct log *log,
1293+
struct xlog *log,
12821294
struct xlog_ticket *ticket,
12831295
struct xlog_in_core **iclog,
12841296
xfs_lsn_t *commitlsnp)
@@ -1312,7 +1324,7 @@ xlog_commit_record(
13121324
*/
13131325
STATIC void
13141326
xlog_grant_push_ail(
1315-
struct log *log,
1327+
struct xlog *log,
13161328
int need_bytes)
13171329
{
13181330
xfs_lsn_t threshold_lsn = 0;
@@ -1791,7 +1803,7 @@ xlog_write_start_rec(
17911803

17921804
static xlog_op_header_t *
17931805
xlog_write_setup_ophdr(
1794-
struct log *log,
1806+
struct xlog *log,
17951807
struct xlog_op_header *ophdr,
17961808
struct xlog_ticket *ticket,
17971809
uint flags)
@@ -1874,7 +1886,7 @@ xlog_write_setup_copy(
18741886

18751887
static int
18761888
xlog_write_copy_finish(
1877-
struct log *log,
1889+
struct xlog *log,
18781890
struct xlog_in_core *iclog,
18791891
uint flags,
18801892
int *record_cnt,
@@ -1959,7 +1971,7 @@ xlog_write_copy_finish(
19591971
*/
19601972
int
19611973
xlog_write(
1962-
struct log *log,
1974+
struct xlog *log,
19631975
struct xfs_log_vec *log_vector,
19641976
struct xlog_ticket *ticket,
19651977
xfs_lsn_t *start_lsn,
@@ -2822,7 +2834,7 @@ _xfs_log_force(
28222834
uint flags,
28232835
int *log_flushed)
28242836
{
2825-
struct log *log = mp->m_log;
2837+
struct xlog *log = mp->m_log;
28262838
struct xlog_in_core *iclog;
28272839
xfs_lsn_t lsn;
28282840

@@ -2970,7 +2982,7 @@ _xfs_log_force_lsn(
29702982
uint flags,
29712983
int *log_flushed)
29722984
{
2973-
struct log *log = mp->m_log;
2985+
struct xlog *log = mp->m_log;
29742986
struct xlog_in_core *iclog;
29752987
int already_slept = 0;
29762988

@@ -3148,7 +3160,7 @@ xfs_log_ticket_get(
31483160
*/
31493161
xlog_ticket_t *
31503162
xlog_ticket_alloc(
3151-
struct log *log,
3163+
struct xlog *log,
31523164
int unit_bytes,
31533165
int cnt,
31543166
char client,
@@ -3279,7 +3291,7 @@ xlog_ticket_alloc(
32793291
*/
32803292
void
32813293
xlog_verify_dest_ptr(
3282-
struct log *log,
3294+
struct xlog *log,
32833295
char *ptr)
32843296
{
32853297
int i;
@@ -3308,7 +3320,7 @@ xlog_verify_dest_ptr(
33083320
*/
33093321
STATIC void
33103322
xlog_verify_grant_tail(
3311-
struct log *log)
3323+
struct xlog *log)
33123324
{
33133325
int tail_cycle, tail_blocks;
33143326
int cycle, space;

fs/xfs/xfs_log_cil.c

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
*/
4545
static struct xlog_ticket *
4646
xlog_cil_ticket_alloc(
47-
struct log *log)
47+
struct xlog *log)
4848
{
4949
struct xlog_ticket *tic;
5050

@@ -72,7 +72,7 @@ xlog_cil_ticket_alloc(
7272
*/
7373
void
7474
xlog_cil_init_post_recovery(
75-
struct log *log)
75+
struct xlog *log)
7676
{
7777
log->l_cilp->xc_ctx->ticket = xlog_cil_ticket_alloc(log);
7878
log->l_cilp->xc_ctx->sequence = 1;
@@ -182,7 +182,7 @@ xlog_cil_prepare_log_vecs(
182182
*/
183183
STATIC void
184184
xfs_cil_prepare_item(
185-
struct log *log,
185+
struct xlog *log,
186186
struct xfs_log_vec *lv,
187187
int *len,
188188
int *diff_iovecs)
@@ -231,7 +231,7 @@ xfs_cil_prepare_item(
231231
*/
232232
static void
233233
xlog_cil_insert_items(
234-
struct log *log,
234+
struct xlog *log,
235235
struct xfs_log_vec *log_vector,
236236
struct xlog_ticket *ticket)
237237
{
@@ -373,7 +373,7 @@ xlog_cil_committed(
373373
*/
374374
STATIC int
375375
xlog_cil_push(
376-
struct log *log)
376+
struct xlog *log)
377377
{
378378
struct xfs_cil *cil = log->l_cilp;
379379
struct xfs_log_vec *lv;
@@ -601,7 +601,7 @@ xlog_cil_push_work(
601601
*/
602602
static void
603603
xlog_cil_push_background(
604-
struct log *log)
604+
struct xlog *log)
605605
{
606606
struct xfs_cil *cil = log->l_cilp;
607607

@@ -629,7 +629,7 @@ xlog_cil_push_background(
629629

630630
static void
631631
xlog_cil_push_foreground(
632-
struct log *log,
632+
struct xlog *log,
633633
xfs_lsn_t push_seq)
634634
{
635635
struct xfs_cil *cil = log->l_cilp;
@@ -683,7 +683,7 @@ xfs_log_commit_cil(
683683
xfs_lsn_t *commit_lsn,
684684
int flags)
685685
{
686-
struct log *log = mp->m_log;
686+
struct xlog *log = mp->m_log;
687687
int log_flags = 0;
688688
struct xfs_log_vec *log_vector;
689689

@@ -754,7 +754,7 @@ xfs_log_commit_cil(
754754
*/
755755
xfs_lsn_t
756756
xlog_cil_force_lsn(
757-
struct log *log,
757+
struct xlog *log,
758758
xfs_lsn_t sequence)
759759
{
760760
struct xfs_cil *cil = log->l_cilp;
@@ -833,7 +833,7 @@ xfs_log_item_in_current_chkpt(
833833
*/
834834
int
835835
xlog_cil_init(
836-
struct log *log)
836+
struct xlog *log)
837837
{
838838
struct xfs_cil *cil;
839839
struct xfs_cil_ctx *ctx;
@@ -869,7 +869,7 @@ xlog_cil_init(
869869

870870
void
871871
xlog_cil_destroy(
872-
struct log *log)
872+
struct xlog *log)
873873
{
874874
if (log->l_cilp->xc_ctx) {
875875
if (log->l_cilp->xc_ctx->ticket)

0 commit comments

Comments
 (0)