gfs2: Rename gfs2_freeze_lock{ => _shared }
Rename gfs2_freeze_lock to gfs2_freeze_lock_shared to make it a bit more obvious that this function establishes the "thawed" state of the freeze glock. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
This commit is contained in:
parent
097cca525a
commit
e392edd5d5
@ -1269,7 +1269,7 @@ static int gfs2_fill_super(struct super_block *sb, struct fs_context *fc)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
|
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
|
||||||
if (error)
|
if (error)
|
||||||
goto fail_per_node;
|
goto fail_per_node;
|
||||||
|
|
||||||
@ -1592,7 +1592,7 @@ static int gfs2_reconfigure(struct fs_context *fc)
|
|||||||
if ((sb->s_flags ^ fc->sb_flags) & SB_RDONLY) {
|
if ((sb->s_flags ^ fc->sb_flags) & SB_RDONLY) {
|
||||||
struct gfs2_holder freeze_gh;
|
struct gfs2_holder freeze_gh;
|
||||||
|
|
||||||
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
|
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
|
||||||
if (error)
|
if (error)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
@ -470,7 +470,7 @@ void gfs2_recover_func(struct work_struct *work)
|
|||||||
|
|
||||||
/* Acquire a shared hold on the freeze glock */
|
/* Acquire a shared hold on the freeze glock */
|
||||||
|
|
||||||
error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY);
|
error = gfs2_freeze_lock_shared(sdp, &thaw_gh, LM_FLAG_PRIORITY);
|
||||||
if (error)
|
if (error)
|
||||||
goto fail_gunlock_ji;
|
goto fail_gunlock_ji;
|
||||||
|
|
||||||
|
@ -677,7 +677,7 @@ void gfs2_freeze_func(struct work_struct *work)
|
|||||||
struct super_block *sb = sdp->sd_vfs;
|
struct super_block *sb = sdp->sd_vfs;
|
||||||
|
|
||||||
atomic_inc(&sb->s_active);
|
atomic_inc(&sb->s_active);
|
||||||
error = gfs2_freeze_lock(sdp, &freeze_gh, 0);
|
error = gfs2_freeze_lock_shared(sdp, &freeze_gh, 0);
|
||||||
if (error) {
|
if (error) {
|
||||||
gfs2_assert_withdraw(sdp, 0);
|
gfs2_assert_withdraw(sdp, 0);
|
||||||
} else {
|
} else {
|
||||||
|
@ -93,12 +93,12 @@ out_unlock:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gfs2_freeze_lock - hold the freeze glock
|
* gfs2_freeze_lock_shared - hold the freeze glock
|
||||||
* @sdp: the superblock
|
* @sdp: the superblock
|
||||||
* @freeze_gh: pointer to the requested holder
|
* @freeze_gh: pointer to the requested holder
|
||||||
* @caller_flags: any additional flags needed by the caller
|
* @caller_flags: any additional flags needed by the caller
|
||||||
*/
|
*/
|
||||||
int gfs2_freeze_lock(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
|
int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp, struct gfs2_holder *freeze_gh,
|
||||||
int caller_flags)
|
int caller_flags)
|
||||||
{
|
{
|
||||||
int flags = LM_FLAG_NOEXP | GL_EXACT | caller_flags;
|
int flags = LM_FLAG_NOEXP | GL_EXACT | caller_flags;
|
||||||
@ -157,7 +157,7 @@ static void signal_our_withdraw(struct gfs2_sbd *sdp)
|
|||||||
gfs2_holder_mark_uninitialized(&freeze_gh);
|
gfs2_holder_mark_uninitialized(&freeze_gh);
|
||||||
if (sdp->sd_freeze_gl &&
|
if (sdp->sd_freeze_gl &&
|
||||||
!gfs2_glock_is_locked_by_me(sdp->sd_freeze_gl)) {
|
!gfs2_glock_is_locked_by_me(sdp->sd_freeze_gl)) {
|
||||||
ret = gfs2_freeze_lock(sdp, &freeze_gh,
|
ret = gfs2_freeze_lock_shared(sdp, &freeze_gh,
|
||||||
log_write_allowed ? 0 : LM_FLAG_TRY);
|
log_write_allowed ? 0 : LM_FLAG_TRY);
|
||||||
if (ret == GLR_TRYFAILED)
|
if (ret == GLR_TRYFAILED)
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
@ -149,8 +149,9 @@ int gfs2_io_error_i(struct gfs2_sbd *sdp, const char *function,
|
|||||||
|
|
||||||
extern int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
|
extern int check_journal_clean(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
|
||||||
bool verbose);
|
bool verbose);
|
||||||
extern int gfs2_freeze_lock(struct gfs2_sbd *sdp,
|
extern int gfs2_freeze_lock_shared(struct gfs2_sbd *sdp,
|
||||||
struct gfs2_holder *freeze_gh, int caller_flags);
|
struct gfs2_holder *freeze_gh,
|
||||||
|
int caller_flags);
|
||||||
extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
|
extern void gfs2_freeze_unlock(struct gfs2_holder *freeze_gh);
|
||||||
|
|
||||||
#define gfs2_io_error(sdp) \
|
#define gfs2_io_error(sdp) \
|
||||||
|
Loading…
Reference in New Issue
Block a user