@@ -32,13 +32,15 @@ struct workqueue_struct *gfs2_freeze_wq;
32
32
33
33
static void gfs2_ail_error (struct gfs2_glock * gl , const struct buffer_head * bh )
34
34
{
35
- fs_err (gl -> gl_sbd , "AIL buffer %p: blocknr %llu state 0x%08lx mapping %p page state 0x%lx\n" ,
35
+ fs_err (gl -> gl_name .ln_sbd ,
36
+ "AIL buffer %p: blocknr %llu state 0x%08lx mapping %p page "
37
+ "state 0x%lx\n" ,
36
38
bh , (unsigned long long )bh -> b_blocknr , bh -> b_state ,
37
39
bh -> b_page -> mapping , bh -> b_page -> flags );
38
- fs_err (gl -> gl_sbd , "AIL glock %u:%llu mapping %p\n" ,
40
+ fs_err (gl -> gl_name . ln_sbd , "AIL glock %u:%llu mapping %p\n" ,
39
41
gl -> gl_name .ln_type , gl -> gl_name .ln_number ,
40
42
gfs2_glock2aspace (gl ));
41
- gfs2_lm_withdraw (gl -> gl_sbd , "AIL error\n" );
43
+ gfs2_lm_withdraw (gl -> gl_name . ln_sbd , "AIL error\n" );
42
44
}
43
45
44
46
/**
@@ -52,7 +54,7 @@ static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh)
52
54
static void __gfs2_ail_flush (struct gfs2_glock * gl , bool fsync ,
53
55
unsigned int nr_revokes )
54
56
{
55
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
57
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
56
58
struct list_head * head = & gl -> gl_ail_list ;
57
59
struct gfs2_bufdata * bd , * tmp ;
58
60
struct buffer_head * bh ;
@@ -80,7 +82,7 @@ static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync,
80
82
81
83
static void gfs2_ail_empty_gl (struct gfs2_glock * gl )
82
84
{
83
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
85
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
84
86
struct gfs2_trans tr ;
85
87
86
88
memset (& tr , 0 , sizeof (tr ));
@@ -109,7 +111,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
109
111
110
112
void gfs2_ail_flush (struct gfs2_glock * gl , bool fsync )
111
113
{
112
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
114
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
113
115
unsigned int revokes = atomic_read (& gl -> gl_ail_count );
114
116
unsigned int max_revokes = (sdp -> sd_sb .sb_bsize - sizeof (struct gfs2_log_descriptor )) / sizeof (u64 );
115
117
int ret ;
@@ -139,7 +141,7 @@ void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
139
141
140
142
static void rgrp_go_sync (struct gfs2_glock * gl )
141
143
{
142
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
144
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
143
145
struct address_space * mapping = & sdp -> sd_aspace ;
144
146
struct gfs2_rgrpd * rgd ;
145
147
int error ;
@@ -179,7 +181,7 @@ static void rgrp_go_sync(struct gfs2_glock *gl)
179
181
180
182
static void rgrp_go_inval (struct gfs2_glock * gl , int flags )
181
183
{
182
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
184
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
183
185
struct address_space * mapping = & sdp -> sd_aspace ;
184
186
struct gfs2_rgrpd * rgd = gl -> gl_object ;
185
187
@@ -218,7 +220,7 @@ static void inode_go_sync(struct gfs2_glock *gl)
218
220
219
221
GLOCK_BUG_ON (gl , gl -> gl_state != LM_ST_EXCLUSIVE );
220
222
221
- gfs2_log_flush (gl -> gl_sbd , gl , NORMAL_FLUSH );
223
+ gfs2_log_flush (gl -> gl_name . ln_sbd , gl , NORMAL_FLUSH );
222
224
filemap_fdatawrite (metamapping );
223
225
if (ip ) {
224
226
struct address_space * mapping = ip -> i_inode .i_mapping ;
@@ -252,7 +254,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
252
254
{
253
255
struct gfs2_inode * ip = gl -> gl_object ;
254
256
255
- gfs2_assert_withdraw (gl -> gl_sbd , !atomic_read (& gl -> gl_ail_count ));
257
+ gfs2_assert_withdraw (gl -> gl_name . ln_sbd , !atomic_read (& gl -> gl_ail_count ));
256
258
257
259
if (flags & DIO_METADATA ) {
258
260
struct address_space * mapping = gfs2_glock2aspace (gl );
@@ -264,9 +266,9 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
264
266
}
265
267
}
266
268
267
- if (ip == GFS2_I (gl -> gl_sbd -> sd_rindex )) {
268
- gfs2_log_flush (gl -> gl_sbd , NULL , NORMAL_FLUSH );
269
- gl -> gl_sbd -> sd_rindex_uptodate = 0 ;
269
+ if (ip == GFS2_I (gl -> gl_name . ln_sbd -> sd_rindex )) {
270
+ gfs2_log_flush (gl -> gl_name . ln_sbd , NULL , NORMAL_FLUSH );
271
+ gl -> gl_name . ln_sbd -> sd_rindex_uptodate = 0 ;
270
272
}
271
273
if (ip && S_ISREG (ip -> i_inode .i_mode ))
272
274
truncate_inode_pages (ip -> i_inode .i_mapping , 0 );
@@ -281,7 +283,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
281
283
282
284
static int inode_go_demote_ok (const struct gfs2_glock * gl )
283
285
{
284
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
286
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
285
287
struct gfs2_holder * gh ;
286
288
287
289
if (sdp -> sd_jindex == gl -> gl_object || sdp -> sd_rindex == gl -> gl_object )
@@ -416,7 +418,7 @@ int gfs2_inode_refresh(struct gfs2_inode *ip)
416
418
static int inode_go_lock (struct gfs2_holder * gh )
417
419
{
418
420
struct gfs2_glock * gl = gh -> gh_gl ;
419
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
421
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
420
422
struct gfs2_inode * ip = gl -> gl_object ;
421
423
int error = 0 ;
422
424
@@ -477,7 +479,7 @@ static void inode_go_dump(struct seq_file *seq, const struct gfs2_glock *gl)
477
479
static void freeze_go_sync (struct gfs2_glock * gl )
478
480
{
479
481
int error = 0 ;
480
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
482
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
481
483
482
484
if (gl -> gl_state == LM_ST_SHARED &&
483
485
test_bit (SDF_JOURNAL_LIVE , & sdp -> sd_flags )) {
@@ -500,7 +502,7 @@ static void freeze_go_sync(struct gfs2_glock *gl)
500
502
501
503
static int freeze_go_xmote_bh (struct gfs2_glock * gl , struct gfs2_holder * gh )
502
504
{
503
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
505
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
504
506
struct gfs2_inode * ip = GFS2_I (sdp -> sd_jdesc -> jd_inode );
505
507
struct gfs2_glock * j_gl = ip -> i_gl ;
506
508
struct gfs2_log_header_host head ;
@@ -545,7 +547,7 @@ static int freeze_go_demote_ok(const struct gfs2_glock *gl)
545
547
static void iopen_go_callback (struct gfs2_glock * gl , bool remote )
546
548
{
547
549
struct gfs2_inode * ip = (struct gfs2_inode * )gl -> gl_object ;
548
- struct gfs2_sbd * sdp = gl -> gl_sbd ;
550
+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
549
551
550
552
if (!remote || (sdp -> sd_vfs -> s_flags & MS_RDONLY ))
551
553
return ;
0 commit comments