Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gfs2: Rename gfs2_{withdrawing_or_ => }withdrawn

With delayed withdraws and the SDF_WITHDRAWING flag gone, we can now
rename gfs2_withdrawing_or_withdrawn() back to gfs2_withdrawn().

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>

+42 -43
+1 -1
fs/gfs2/aops.c
··· 435 435 error = mpage_read_folio(folio, gfs2_block_map); 436 436 } 437 437 438 - if (gfs2_withdrawing_or_withdrawn(sdp)) 438 + if (gfs2_withdrawn(sdp)) 439 439 return -EIO; 440 440 441 441 return error;
+1 -1
fs/gfs2/file.c
··· 1446 1446 1447 1447 if (!(fl->c.flc_flags & FL_POSIX)) 1448 1448 return -ENOLCK; 1449 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 1449 + if (gfs2_withdrawn(sdp)) { 1450 1450 if (lock_is_unlock(fl)) 1451 1451 locks_lock_file_wait(file, fl); 1452 1452 return -EIO;
+4 -4
fs/gfs2/glock.c
··· 154 154 { 155 155 struct gfs2_sbd *sdp = gl->gl_name.ln_sbd; 156 156 157 - if (!gfs2_withdrawing_or_withdrawn(sdp)) 157 + if (!gfs2_withdrawn(sdp)) 158 158 return false; 159 159 if (gl->gl_ops->go_flags & GLOF_NONDISK) 160 160 return false; ··· 270 270 GLOCK_BUG_ON(gl, !list_empty(&gl->gl_holders)); 271 271 if (mapping) { 272 272 truncate_inode_pages_final(mapping); 273 - if (!gfs2_withdrawing_or_withdrawn(sdp)) 273 + if (!gfs2_withdrawn(sdp)) 274 274 GLOCK_BUG_ON(gl, !mapping_empty(mapping)); 275 275 } 276 276 trace_gfs2_glock_put(gl); ··· 755 755 * gfs2_gl_hash_clear calls clear_glock) and recovery is complete 756 756 * then it's okay to tell dlm to unlock it. 757 757 */ 758 - if (unlikely(sdp->sd_log_error) && !gfs2_withdrawing_or_withdrawn(sdp)) 758 + if (unlikely(sdp->sd_log_error) && !gfs2_withdrawn(sdp)) 759 759 gfs2_withdraw(sdp); 760 760 if (glock_blocked_by_withdraw(gl) && 761 761 (target != LM_ST_UNLOCKED || ··· 803 803 */ 804 804 } else { 805 805 fs_err(sdp, "lm_lock ret %d\n", ret); 806 - GLOCK_BUG_ON(gl, !gfs2_withdrawing_or_withdrawn(sdp)); 806 + GLOCK_BUG_ON(gl, !gfs2_withdrawn(sdp)); 807 807 return; 808 808 } 809 809 }
+1 -1
fs/gfs2/glops.c
··· 175 175 176 176 filemap_fdatawrite_range(metamapping, start, end); 177 177 error = filemap_fdatawait_range(metamapping, start, end); 178 - WARN_ON_ONCE(error && !gfs2_withdrawing_or_withdrawn(sdp)); 178 + WARN_ON_ONCE(error && !gfs2_withdrawn(sdp)); 179 179 mapping_set_error(metamapping, error); 180 180 if (error) 181 181 gfs2_io_error(sdp);
+4 -4
fs/gfs2/lock_dlm.c
··· 1195 1195 struct gfs2_sbd *sdp = arg; 1196 1196 struct lm_lockstruct *ls = &sdp->sd_lockstruct; 1197 1197 1198 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 1198 + if (gfs2_withdrawn(sdp)) { 1199 1199 fs_err(sdp, "recover_prep ignored due to withdraw.\n"); 1200 1200 return; 1201 1201 } ··· 1221 1221 struct lm_lockstruct *ls = &sdp->sd_lockstruct; 1222 1222 int jid = slot->slot - 1; 1223 1223 1224 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 1224 + if (gfs2_withdrawn(sdp)) { 1225 1225 fs_err(sdp, "recover_slot jid %d ignored due to withdraw.\n", 1226 1226 jid); 1227 1227 return; ··· 1250 1250 struct gfs2_sbd *sdp = arg; 1251 1251 struct lm_lockstruct *ls = &sdp->sd_lockstruct; 1252 1252 1253 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 1253 + if (gfs2_withdrawn(sdp)) { 1254 1254 fs_err(sdp, "recover_done ignored due to withdraw.\n"); 1255 1255 return; 1256 1256 } ··· 1281 1281 { 1282 1282 struct lm_lockstruct *ls = &sdp->sd_lockstruct; 1283 1283 1284 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 1284 + if (gfs2_withdrawn(sdp)) { 1285 1285 fs_err(sdp, "recovery_result jid %d ignored due to withdraw.\n", 1286 1286 jid); 1287 1287 return;
+11 -11
fs/gfs2/log.c
··· 118 118 } 119 119 } 120 120 121 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 121 + if (gfs2_withdrawn(sdp)) { 122 122 gfs2_remove_from_ail(bd); 123 123 continue; 124 124 } ··· 834 834 struct super_block *sb = sdp->sd_vfs; 835 835 u64 dblock; 836 836 837 - if (gfs2_withdrawing_or_withdrawn(sdp)) 837 + if (gfs2_withdrawn(sdp)) 838 838 return; 839 839 840 840 page = mempool_alloc(gfs2_page_pool, GFP_NOIO); ··· 981 981 gfs2_ail1_wait(sdp); 982 982 empty = gfs2_ail1_empty(sdp, 0); 983 983 984 - if (gfs2_withdrawing_or_withdrawn(sdp)) 984 + if (gfs2_withdrawn(sdp)) 985 985 break; 986 986 } 987 987 } ··· 1044 1044 * Do this check while holding the log_flush_lock to prevent new 1045 1045 * buffers from being added to the ail via gfs2_pin() 1046 1046 */ 1047 - if (gfs2_withdrawing_or_withdrawn(sdp) || 1047 + if (gfs2_withdrawn(sdp) || 1048 1048 !test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) 1049 1049 goto out; 1050 1050 ··· 1094 1094 goto out_withdraw; 1095 1095 1096 1096 gfs2_ordered_write(sdp); 1097 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1097 + if (gfs2_withdrawn(sdp)) 1098 1098 goto out_withdraw; 1099 1099 lops_before_commit(sdp, tr); 1100 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1100 + if (gfs2_withdrawn(sdp)) 1101 1101 goto out_withdraw; 1102 1102 if (sdp->sd_jdesc) 1103 1103 gfs2_log_submit_bio(&sdp->sd_jdesc->jd_log_bio, REQ_OP_WRITE); 1104 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1104 + if (gfs2_withdrawn(sdp)) 1105 1105 goto out_withdraw; 1106 1106 1107 1107 if (sdp->sd_log_head != sdp->sd_log_flush_head) { ··· 1109 1109 } else if (sdp->sd_log_tail != sdp->sd_log_flush_tail && !sdp->sd_log_idle) { 1110 1110 log_write_header(sdp, flags); 1111 1111 } 1112 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1112 + if (gfs2_withdrawn(sdp)) 1113 1113 goto out_withdraw; 1114 1114 lops_after_commit(sdp, tr); 1115 1115 ··· 1127 1127 if (!(flags & GFS2_LOG_HEAD_FLUSH_NORMAL)) { 1128 1128 if (!sdp->sd_log_idle) { 1129 1129 empty_ail1_list(sdp); 1130 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1130 + if (gfs2_withdrawn(sdp)) 1131 1131 goto out_withdraw; 1132 1132 log_write_header(sdp, flags); 1133 1133 } ··· 1296 1296 1297 1297 set_freezable(); 1298 1298 while (!kthread_should_stop()) { 1299 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1299 + if (gfs2_withdrawn(sdp)) 1300 1300 break; 1301 1301 1302 1302 /* Check for errors writing to the journal */ ··· 1333 1333 gfs2_ail_flush_reqd(sdp) || 1334 1334 gfs2_jrnl_flush_reqd(sdp) || 1335 1335 sdp->sd_log_error || 1336 - gfs2_withdrawing_or_withdrawn(sdp) || 1336 + gfs2_withdrawn(sdp) || 1337 1337 kthread_should_stop(), 1338 1338 t); 1339 1339 }
+3 -3
fs/gfs2/meta_io.c
··· 263 263 struct buffer_head *bh, *bhs[2]; 264 264 int num = 0; 265 265 266 - if (gfs2_withdrawing_or_withdrawn(sdp) && 266 + if (gfs2_withdrawn(sdp) && 267 267 !gfs2_withdraw_in_prog(sdp)) { 268 268 *bhp = NULL; 269 269 return -EIO; ··· 322 322 323 323 int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh) 324 324 { 325 - if (gfs2_withdrawing_or_withdrawn(sdp) && 325 + if (gfs2_withdrawn(sdp) && 326 326 !gfs2_withdraw_in_prog(sdp)) 327 327 return -EIO; 328 328 ··· 334 334 gfs2_io_error_bh_wd(sdp, bh); 335 335 return -EIO; 336 336 } 337 - if (gfs2_withdrawing_or_withdrawn(sdp) && 337 + if (gfs2_withdrawn(sdp) && 338 338 !gfs2_withdraw_in_prog(sdp)) 339 339 return -EIO; 340 340
+1 -1
fs/gfs2/ops_fstype.c
··· 1040 1040 void gfs2_lm_unmount(struct gfs2_sbd *sdp) 1041 1041 { 1042 1042 const struct lm_lockops *lm = sdp->sd_lockstruct.ls_ops; 1043 - if (!gfs2_withdrawing_or_withdrawn(sdp) && lm->lm_unmount) 1043 + if (!gfs2_withdrawn(sdp) && lm->lm_unmount) 1044 1044 lm->lm_unmount(sdp, true); 1045 1045 } 1046 1046
+4 -4
fs/gfs2/quota.c
··· 125 125 hlist_bl_del_rcu(&qd->qd_hlist); 126 126 spin_unlock_bucket(qd->qd_hash); 127 127 128 - if (!gfs2_withdrawing_or_withdrawn(sdp)) { 128 + if (!gfs2_withdrawn(sdp)) { 129 129 gfs2_assert_warn(sdp, !qd->qd_change); 130 130 gfs2_assert_warn(sdp, !qd->qd_slot_ref); 131 131 gfs2_assert_warn(sdp, !qd->qd_bh_count); ··· 1551 1551 { 1552 1552 if (error == 0 || error == -EROFS) 1553 1553 return; 1554 - if (!gfs2_withdrawing_or_withdrawn(sdp)) { 1554 + if (!gfs2_withdrawn(sdp)) { 1555 1555 if (!cmpxchg(&sdp->sd_log_error, 0, error)) 1556 1556 fs_err(sdp, "gfs2_quotad: %s error %d\n", msg, error); 1557 1557 wake_up(&sdp->sd_logd_waitq); ··· 1583 1583 while (!kthread_should_stop()) { 1584 1584 unsigned long t; 1585 1585 1586 - if (gfs2_withdrawing_or_withdrawn(sdp)) 1586 + if (gfs2_withdrawn(sdp)) 1587 1587 break; 1588 1588 1589 1589 now = jiffies; ··· 1614 1614 t = min(statfs_deadline - now, quotad_deadline - now); 1615 1615 wait_event_freezable_timeout(sdp->sd_quota_wait, 1616 1616 sdp->sd_statfs_force_sync || 1617 - gfs2_withdrawing_or_withdrawn(sdp) || 1617 + gfs2_withdrawn(sdp) || 1618 1618 kthread_should_stop(), 1619 1619 t); 1620 1620
+1 -1
fs/gfs2/recovery.c
··· 408 408 int error = 0; 409 409 int jlocked = 0; 410 410 411 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 411 + if (gfs2_withdrawn(sdp)) { 412 412 fs_err(sdp, "jid=%u: Recovery not attempted due to withdraw.\n", 413 413 jd->jd_jid); 414 414 goto fail;
+5 -5
fs/gfs2/super.c
··· 137 137 int error; 138 138 139 139 j_gl->gl_ops->go_inval(j_gl, DIO_METADATA); 140 - if (gfs2_withdrawing_or_withdrawn(sdp)) 140 + if (gfs2_withdrawn(sdp)) 141 141 return -EIO; 142 142 143 143 if (sdp->sd_log_sequence == 0) { ··· 147 147 } 148 148 149 149 error = gfs2_quota_init(sdp); 150 - if (!error && gfs2_withdrawing_or_withdrawn(sdp)) 150 + if (!error && gfs2_withdrawn(sdp)) 151 151 error = -EIO; 152 152 if (!error) 153 153 set_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags); ··· 491 491 if (unlikely(!ip->i_gl)) 492 492 return; 493 493 494 - if (gfs2_withdrawing_or_withdrawn(sdp)) 494 + if (gfs2_withdrawn(sdp)) 495 495 return; 496 496 if (!gfs2_glock_is_locked_by_me(ip->i_gl)) { 497 497 ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); ··· 597 597 if (!sb_rdonly(sb)) 598 598 gfs2_make_fs_ro(sdp); 599 599 else { 600 - if (gfs2_withdrawing_or_withdrawn(sdp)) 600 + if (gfs2_withdrawn(sdp)) 601 601 gfs2_destroy_threads(sdp); 602 602 603 603 gfs2_quota_cleanup(sdp); ··· 776 776 if (test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) { 777 777 gfs2_log_flush(sdp, NULL, GFS2_LOG_HEAD_FLUSH_FREEZE | 778 778 GFS2_LFC_FREEZE_GO_SYNC); 779 - if (gfs2_withdrawing_or_withdrawn(sdp)) 779 + if (gfs2_withdrawn(sdp)) 780 780 return -EIO; 781 781 } 782 782 return 0;
+1 -1
fs/gfs2/sys.c
··· 191 191 192 192 static ssize_t withdraw_show(struct gfs2_sbd *sdp, char *buf) 193 193 { 194 - unsigned int b = gfs2_withdrawing_or_withdrawn(sdp); 194 + unsigned int b = gfs2_withdrawn(sdp); 195 195 return sysfs_emit(buf, "%u\n", b); 196 196 } 197 197
+1 -1
fs/gfs2/trans.c
··· 289 289 (unsigned long long)bd->bd_bh->b_blocknr); 290 290 BUG(); 291 291 } 292 - if (gfs2_withdrawing_or_withdrawn(sdp)) { 292 + if (gfs2_withdrawn(sdp)) { 293 293 fs_info(sdp, "GFS2:adding buf while withdrawn! 0x%llx\n", 294 294 (unsigned long long)bd->bd_bh->b_blocknr); 295 295 goto out_unlock;
+2 -2
fs/gfs2/util.c
··· 366 366 void gfs2_assert_withdraw_i(struct gfs2_sbd *sdp, char *assertion, 367 367 const char *function, char *file, unsigned int line) 368 368 { 369 - if (gfs2_withdrawing_or_withdrawn(sdp)) 369 + if (gfs2_withdrawn(sdp)) 370 370 return; 371 371 372 372 fs_err(sdp, ··· 524 524 const char *function, char *file, unsigned int line, 525 525 bool withdraw) 526 526 { 527 - if (gfs2_withdrawing_or_withdrawn(sdp)) 527 + if (gfs2_withdrawn(sdp)) 528 528 return; 529 529 530 530 fs_err(sdp, "fatal: I/O error - "
+2 -3
fs/gfs2/util.h
··· 183 183 } 184 184 185 185 /** 186 - * gfs2_withdrawing_or_withdrawn - test whether the file system is withdrawing 187 - * or withdrawn 186 + * gfs2_withdrawn - test whether the file system is withdrawn 188 187 * @sdp: the superblock 189 188 */ 190 - static inline bool gfs2_withdrawing_or_withdrawn(struct gfs2_sbd *sdp) 189 + static inline bool gfs2_withdrawn(struct gfs2_sbd *sdp) 191 190 { 192 191 return unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)); 193 192 }