mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-24 20:54:10 +08:00
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>
This commit is contained in:
parent
d14e1ca305
commit
04aea0ca14
@ -518,7 +518,7 @@ static int __gfs2_readpage(void *file, struct page *page)
|
||||
error = mpage_readpage(page, gfs2_block_map);
|
||||
}
|
||||
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
|
||||
return -EIO;
|
||||
|
||||
return error;
|
||||
@ -635,7 +635,7 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
|
||||
gfs2_glock_dq(&gh);
|
||||
out_uninit:
|
||||
gfs2_holder_uninit(&gh);
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
|
||||
ret = -EIO;
|
||||
return ret;
|
||||
}
|
||||
|
@ -1166,7 +1166,7 @@ static int gfs2_lock(struct file *file, int cmd, struct file_lock *fl)
|
||||
cmd = F_SETLK;
|
||||
fl->fl_type = F_UNLCK;
|
||||
}
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags))) {
|
||||
if (fl->fl_type == F_UNLCK)
|
||||
locks_lock_file_wait(file, fl);
|
||||
return -EIO;
|
||||
|
@ -544,7 +544,7 @@ __acquires(&gl->gl_lockref.lock)
|
||||
unsigned int lck_flags = (unsigned int)(gh ? gh->gh_flags : 0);
|
||||
int ret;
|
||||
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) &&
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) &&
|
||||
target != LM_ST_UNLOCKED)
|
||||
return;
|
||||
lck_flags &= (LM_FLAG_TRY | LM_FLAG_TRY_1CB | LM_FLAG_NOEXP |
|
||||
@ -581,7 +581,7 @@ __acquires(&gl->gl_lockref.lock)
|
||||
}
|
||||
else if (ret) {
|
||||
fs_err(sdp, "lm_lock ret %d\n", ret);
|
||||
GLOCK_BUG_ON(gl, !test_bit(SDF_SHUTDOWN,
|
||||
GLOCK_BUG_ON(gl, !test_bit(SDF_WITHDRAWN,
|
||||
&sdp->sd_flags));
|
||||
}
|
||||
} else { /* lock_nolock */
|
||||
@ -1094,7 +1094,7 @@ int gfs2_glock_nq(struct gfs2_holder *gh)
|
||||
struct gfs2_sbd *sdp = gl->gl_name.ln_sbd;
|
||||
int error = 0;
|
||||
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
|
||||
return -EIO;
|
||||
|
||||
if (test_bit(GLF_LRU, &gl->gl_flags))
|
||||
|
@ -536,7 +536,7 @@ static int freeze_go_xmote_bh(struct gfs2_glock *gl, struct gfs2_holder *gh)
|
||||
gfs2_consist(sdp);
|
||||
|
||||
/* Initialize some head of the log stuff */
|
||||
if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
|
||||
if (!test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
|
||||
sdp->sd_log_sequence = head.lh_sequence + 1;
|
||||
gfs2_log_pointers_init(sdp, head.lh_blkno);
|
||||
}
|
||||
|
@ -608,7 +608,7 @@ struct gfs2_tune {
|
||||
enum {
|
||||
SDF_JOURNAL_CHECKED = 0,
|
||||
SDF_JOURNAL_LIVE = 1,
|
||||
SDF_SHUTDOWN = 2,
|
||||
SDF_WITHDRAWN = 2,
|
||||
SDF_NOBARRIERS = 3,
|
||||
SDF_NORECOVERY = 4,
|
||||
SDF_DEMOTE = 5,
|
||||
|
@ -251,7 +251,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
|
||||
struct buffer_head *bh, *bhs[2];
|
||||
int num = 0;
|
||||
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) {
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags))) {
|
||||
*bhp = NULL;
|
||||
return -EIO;
|
||||
}
|
||||
@ -309,7 +309,7 @@ int gfs2_meta_read(struct gfs2_glock *gl, u64 blkno, int flags,
|
||||
|
||||
int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)
|
||||
{
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
|
||||
return -EIO;
|
||||
|
||||
wait_on_buffer(bh);
|
||||
@ -320,7 +320,7 @@ int gfs2_meta_wait(struct gfs2_sbd *sdp, struct buffer_head *bh)
|
||||
gfs2_io_error_bh_wd(sdp, bh);
|
||||
return -EIO;
|
||||
}
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
|
@ -1004,7 +1004,7 @@ hostdata_error:
|
||||
void gfs2_lm_unmount(struct gfs2_sbd *sdp)
|
||||
{
|
||||
const struct lm_lockops *lm = sdp->sd_lockstruct.ls_ops;
|
||||
if (likely(!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) &&
|
||||
if (likely(!test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) &&
|
||||
lm->lm_unmount)
|
||||
lm->lm_unmount(sdp);
|
||||
}
|
||||
|
@ -1475,7 +1475,7 @@ static void quotad_error(struct gfs2_sbd *sdp, const char *msg, int error)
|
||||
{
|
||||
if (error == 0 || error == -EROFS)
|
||||
return;
|
||||
if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
|
||||
if (!test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
|
||||
fs_err(sdp, "gfs2_quotad: %s error %d\n", msg, error);
|
||||
sdp->sd_log_error = error;
|
||||
wake_up(&sdp->sd_logd_waitq);
|
||||
|
@ -805,7 +805,7 @@ static void gfs2_dirty_inode(struct inode *inode, int flags)
|
||||
|
||||
if (!(flags & I_DIRTY_INODE))
|
||||
return;
|
||||
if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags)))
|
||||
if (unlikely(test_bit(SDF_WITHDRAWN, &sdp->sd_flags)))
|
||||
return;
|
||||
if (!gfs2_glock_is_locked_by_me(ip->i_gl)) {
|
||||
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)
|
||||
|
||||
error = gfs2_glock_nq_init(sdp->sd_freeze_gl, LM_ST_SHARED, GL_NOCACHE,
|
||||
&freeze_gh);
|
||||
if (error && !test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
|
||||
if (error && !test_bit(SDF_WITHDRAWN, &sdp->sd_flags))
|
||||
return error;
|
||||
|
||||
flush_workqueue(gfs2_delete_workqueue);
|
||||
@ -1013,7 +1013,7 @@ static int gfs2_freeze(struct super_block *sb)
|
||||
if (atomic_read(&sdp->sd_freeze_state) != SFS_UNFROZEN)
|
||||
goto out;
|
||||
|
||||
if (test_bit(SDF_SHUTDOWN, &sdp->sd_flags)) {
|
||||
if (test_bit(SDF_WITHDRAWN, &sdp->sd_flags)) {
|
||||
error = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ static ssize_t freeze_store(struct gfs2_sbd *sdp, const char *buf, size_t len)
|
||||
|
||||
static ssize_t withdraw_show(struct gfs2_sbd *sdp, char *buf)
|
||||
{
|
||||
unsigned int b = test_bit(SDF_SHUTDOWN, &sdp->sd_flags);
|
||||
unsigned int b = test_bit(SDF_WITHDRAWN, &sdp->sd_flags);
|
||||
return snprintf(buf, PAGE_SIZE, "%u\n", b);
|
||||
}
|
||||
|
||||
|
@ -41,7 +41,7 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, const char *fmt, ...)
|
||||
struct va_format vaf;
|
||||
|
||||
if (sdp->sd_args.ar_errors == GFS2_ERRORS_WITHDRAW &&
|
||||
test_and_set_bit(SDF_SHUTDOWN, &sdp->sd_flags))
|
||||
test_and_set_bit(SDF_WITHDRAWN, &sdp->sd_flags))
|
||||
return 0;
|
||||
|
||||
if (fmt) {
|
||||
@ -256,7 +256,7 @@ void gfs2_io_error_bh_i(struct gfs2_sbd *sdp, struct buffer_head *bh,
|
||||
const char *function, char *file, unsigned int line,
|
||||
bool withdraw)
|
||||
{
|
||||
if (!test_bit(SDF_SHUTDOWN, &sdp->sd_flags))
|
||||
if (!test_bit(SDF_WITHDRAWN, &sdp->sd_flags))
|
||||
fs_err(sdp,
|
||||
"fatal: I/O error\n"
|
||||
" block = %llu\n"
|
||||
|
Loading…
Reference in New Issue
Block a user