@@ -32,13 +32,15 @@ struct workqueue_struct *gfs2_freeze_wq;
3232
3333static void gfs2_ail_error (struct gfs2_glock * gl , const struct buffer_head * bh )
3434{
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" ,
3638 bh , (unsigned long long )bh -> b_blocknr , bh -> b_state ,
3739 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" ,
3941 gl -> gl_name .ln_type , gl -> gl_name .ln_number ,
4042 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" );
4244}
4345
4446/**
@@ -52,7 +54,7 @@ static void gfs2_ail_error(struct gfs2_glock *gl, const struct buffer_head *bh)
5254static void __gfs2_ail_flush (struct gfs2_glock * gl , bool fsync ,
5355 unsigned int nr_revokes )
5456{
55- struct gfs2_sbd * sdp = gl -> gl_sbd ;
57+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
5658 struct list_head * head = & gl -> gl_ail_list ;
5759 struct gfs2_bufdata * bd , * tmp ;
5860 struct buffer_head * bh ;
@@ -80,7 +82,7 @@ static void __gfs2_ail_flush(struct gfs2_glock *gl, bool fsync,
8082
8183static void gfs2_ail_empty_gl (struct gfs2_glock * gl )
8284{
83- struct gfs2_sbd * sdp = gl -> gl_sbd ;
85+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
8486 struct gfs2_trans tr ;
8587
8688 memset (& tr , 0 , sizeof (tr ));
@@ -109,7 +111,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
109111
110112void gfs2_ail_flush (struct gfs2_glock * gl , bool fsync )
111113{
112- struct gfs2_sbd * sdp = gl -> gl_sbd ;
114+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
113115 unsigned int revokes = atomic_read (& gl -> gl_ail_count );
114116 unsigned int max_revokes = (sdp -> sd_sb .sb_bsize - sizeof (struct gfs2_log_descriptor )) / sizeof (u64 );
115117 int ret ;
@@ -139,7 +141,7 @@ void gfs2_ail_flush(struct gfs2_glock *gl, bool fsync)
139141
140142static void rgrp_go_sync (struct gfs2_glock * gl )
141143{
142- struct gfs2_sbd * sdp = gl -> gl_sbd ;
144+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
143145 struct address_space * mapping = & sdp -> sd_aspace ;
144146 struct gfs2_rgrpd * rgd ;
145147 int error ;
@@ -179,7 +181,7 @@ static void rgrp_go_sync(struct gfs2_glock *gl)
179181
180182static void rgrp_go_inval (struct gfs2_glock * gl , int flags )
181183{
182- struct gfs2_sbd * sdp = gl -> gl_sbd ;
184+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
183185 struct address_space * mapping = & sdp -> sd_aspace ;
184186 struct gfs2_rgrpd * rgd = gl -> gl_object ;
185187
@@ -218,7 +220,7 @@ static void inode_go_sync(struct gfs2_glock *gl)
218220
219221 GLOCK_BUG_ON (gl , gl -> gl_state != LM_ST_EXCLUSIVE );
220222
221- gfs2_log_flush (gl -> gl_sbd , gl , NORMAL_FLUSH );
223+ gfs2_log_flush (gl -> gl_name . ln_sbd , gl , NORMAL_FLUSH );
222224 filemap_fdatawrite (metamapping );
223225 if (ip ) {
224226 struct address_space * mapping = ip -> i_inode .i_mapping ;
@@ -252,7 +254,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
252254{
253255 struct gfs2_inode * ip = gl -> gl_object ;
254256
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 ));
256258
257259 if (flags & DIO_METADATA ) {
258260 struct address_space * mapping = gfs2_glock2aspace (gl );
@@ -264,9 +266,9 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
264266 }
265267 }
266268
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 ;
270272 }
271273 if (ip && S_ISREG (ip -> i_inode .i_mode ))
272274 truncate_inode_pages (ip -> i_inode .i_mapping , 0 );
@@ -281,7 +283,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
281283
282284static int inode_go_demote_ok (const struct gfs2_glock * gl )
283285{
284- struct gfs2_sbd * sdp = gl -> gl_sbd ;
286+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
285287 struct gfs2_holder * gh ;
286288
287289 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)
416418static int inode_go_lock (struct gfs2_holder * gh )
417419{
418420 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 ;
420422 struct gfs2_inode * ip = gl -> gl_object ;
421423 int error = 0 ;
422424
@@ -477,7 +479,7 @@ static void inode_go_dump(struct seq_file *seq, const struct gfs2_glock *gl)
477479static void freeze_go_sync (struct gfs2_glock * gl )
478480{
479481 int error = 0 ;
480- struct gfs2_sbd * sdp = gl -> gl_sbd ;
482+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
481483
482484 if (gl -> gl_state == LM_ST_SHARED &&
483485 test_bit (SDF_JOURNAL_LIVE , & sdp -> sd_flags )) {
@@ -500,7 +502,7 @@ static void freeze_go_sync(struct gfs2_glock *gl)
500502
501503static int freeze_go_xmote_bh (struct gfs2_glock * gl , struct gfs2_holder * gh )
502504{
503- struct gfs2_sbd * sdp = gl -> gl_sbd ;
505+ struct gfs2_sbd * sdp = gl -> gl_name . ln_sbd ;
504506 struct gfs2_inode * ip = GFS2_I (sdp -> sd_jdesc -> jd_inode );
505507 struct gfs2_glock * j_gl = ip -> i_gl ;
506508 struct gfs2_log_header_host head ;
@@ -545,7 +547,7 @@ static int freeze_go_demote_ok(const struct gfs2_glock *gl)
545547static void iopen_go_callback (struct gfs2_glock * gl , bool remote )
546548{
547549 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 ;
549551
550552 if (!remote || (sdp -> sd_vfs -> s_flags & MS_RDONLY ))
551553 return ;
0 commit comments