Skip to content

Commit 04aea0c

Browse files
AstralBobagruenba
authored andcommitted
gfs2: Rename SDF_SHUTDOWN to SDF_WITHDRAWN
Before this patch, the superblock flag indicating when a file system is withdrawn was called SDF_SHUTDOWN. This patch simply renames it to the more obvious SDF_WITHDRAWN. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
1 parent d14e1ca commit 04aea0c

11 files changed

Lines changed: 19 additions & 19 deletions

File tree

‎fs/gfs2/aops.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -518,7 +518,7 @@ static int __gfs2_readpage(void *file, struct page *page)
518518
error = mpage_readpage(page, gfs2_block_map);
519519
}
520520

521-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
521+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
522522
return -EIO;
523523

524524
return error;
@@ -635,7 +635,7 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
635635
gfs2_glock_dq(&gh);
636636
out_uninit:
637637
gfs2_holder_uninit(&gh);
638-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
638+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
639639
ret = -EIO;
640640
return ret;
641641
}

‎fs/gfs2/file.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
11661166
cmd = F_SETLK;
11671167
fl->fl_type = F_UNLCK;
11681168
}
1169-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
1169+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags))) {
11701170
if (fl->fl_type == F_UNLCK)
11711171
locks_lock_file_wait(file, fl);
11721172
return -EIO;

‎fs/gfs2/glock.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ __acquires(&gl->gl_lockref.lock)
544544
unsigned int lck_flags = (unsigned int)(gh ? gh->gh_flags : 0);
545545
int ret;
546546

547-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) &&
547+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) &&
548548
target != LM_ST_UNLOCKED)
549549
return;
550550
lck_flags &= (LM_FLAG_TRY | LM_FLAG_TRY_1CB | LM_FLAG_NOEXP |
@@ -581,7 +581,7 @@ __acquires(&gl->gl_lockref.lock)
581581
}
582582
else if (ret) {
583583
fs_err(sdp, "lm_lock ret %d\n", ret);
584-
GLOCK_BUG_ON(gl, !test_bit(SDF_SHUTDOWN,
584+
GLOCK_BUG_ON(gl, !test_bit(SDF_WITHDRAWN,
585585
&sdp->sd_flags));
586586
}
587587
} else { /* lock_nolock */
@@ -1094,7 +1094,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
10941094
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
10951095
int error = 0;
10961096

1097-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
1097+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
10981098
return -EIO;
10991099

11001100
if (test_bit(GLF_LRU, &gl->gl_flags))

‎fs/gfs2/glops.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@ static int freeze_go_xmote_bh(struct gfs2_glock *gl, struct gfs2_holder *gh)
536536
gfs2_consist(sdp);
537537

538538
/* Initialize some head of the log stuff */
539-
if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
539+
if (!test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
540540
sdp->sd_log_sequence = head.lh_sequence + 1;
541541
gfs2_log_pointers_init(sdp, head.lh_blkno);
542542
}

‎fs/gfs2/incore.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ struct gfs2_tune {
608608
enum {
609609
SDF_JOURNAL_CHECKED = 0,
610610
SDF_JOURNAL_LIVE = 1,
611-
SDF_SHUTDOWN = 2,
611+
SDF_WITHDRAWN = 2,
612612
SDF_NOBARRIERS = 3,
613613
SDF_NORECOVERY = 4,
614614
SDF_DEMOTE = 5,

‎fs/gfs2/meta_io.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
251251
struct buffer_head *bh, *bhs[2];
252252
int num = 0;
253253

254-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
254+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags))) {
255255
*bhp = NULL;
256256
return -EIO;
257257
}
@@ -309,7 +309,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
309309

310310
int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)
311311
{
312-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
312+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
313313
return -EIO;
314314

315315
wait_on_buffer(bh);
@@ -320,7 +320,7 @@ int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)
320320
gfs2_io_error_bh_wd(sdp, bh);
321321
return -EIO;
322322
}
323-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
323+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
324324
return -EIO;
325325

326326
return 0;

‎fs/gfs2/ops_fstype.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1004,7 +1004,7 @@ static int gfs2_lm_mount(struct gfs2_sbd *sdp, int silent)
10041004
void gfs2_lm_unmount(struct gfs2_sbd *sdp)
10051005
{
10061006
const struct lm_lockops *lm = sdp->sd_lockstruct.ls_ops;
1007-
if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) &&
1007+
if (likely(!test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) &&
10081008
lm->lm_unmount)
10091009
lm->lm_unmount(sdp);
10101010
}

‎fs/gfs2/quota.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,7 @@ static void quotad_error(struct gfs2_sbd *sdp, const char *msg, int error)
14751475
{
14761476
if (error == 0 || error == -EROFS)
14771477
return;
1478-
if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
1478+
if (!test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
14791479
fs_err(sdp, "gfs2_quotad: %s error %d\n", msg, error);
14801480
sdp->sd_log_error = error;
14811481
wake_up(&sdp->sd_logd_waitq);

‎fs/gfs2/super.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ static void gfs2_dirty_inode(struct inode *inode, int flags)
805805

806806
if (!(flags & I_DIRTY_INODE))
807807
return;
808-
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
808+
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
809809
return;
810810
if (!gfs2_glock_is_locked_by_me(ip->i_gl)) {
811811
ret = gfs2_glock_nq_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh);
@@ -854,7 +854,7 @@ static int gfs2_make_fs_ro(struct gfs2_sbd *sdp)
854854

855855
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, GL_NOCACHE,
856856
&freeze_gh);
857-
if (error && !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
857+
if (error && !test_bit(SDF_WITHDRAWN, &sdp->sd_flags))
858858
return error;
859859

860860
flush_workqueue(gfs2_delete_workqueue);
@@ -1013,7 +1013,7 @@ static int gfs2_freeze(struct super_block *sb)
10131013
if (atomic_read(&sdp->sd_freeze_state) != SFS_UNFROZEN)
10141014
goto out;
10151015

1016-
if (test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
1016+
if (test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
10171017
error = -EINVAL;
10181018
goto out;
10191019
}

‎fs/gfs2/sys.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static ssize_t freeze_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
118118

119119
static ssize_t withdraw_show(struct gfs2_sbd *sdp, char *buf)
120120
{
121-
unsigned int b = test_bit(SDF_SHUTDOWN, &sdp->sd_flags);
121+
unsigned int b = test_bit(SDF_WITHDRAWN, &sdp->sd_flags);
122122
return snprintf(buf, PAGE_SIZE, "%u\n", b);
123123
}
124124

0 commit comments

Comments
 (0)