* [Cluster-devel] [GFS2 PATCH] GFS2: Allow minimum hold time for all glocks
@ 2012-10-17 17:36 Bob Peterson
0 siblings, 0 replies; only message in thread
From: Bob Peterson @ 2012-10-17 17:36 UTC (permalink / raw)
To: cluster-devel.redhat.com
Hi,
Before this patch, only inode glocks were held for a minimum length
of time. This patch extends that to all glocks, unless the locking
protocol is lock_nolock.
Regards,
Bob Peterson
Red Hat File Systems
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
---
diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c
index beaa834..3f1df8b 100644
--- a/fs/gfs2/glock.c
+++ b/fs/gfs2/glock.c
@@ -683,7 +683,7 @@ static void glock_work_func(struct work_struct *work)
if (!delay)
gfs2_glock_put(gl);
else {
- if (gl->gl_name.ln_type != LM_TYPE_INODE)
+ if (gl->gl_sbd->sd_lockstruct.ls_ops->lm_lock == NULL)
delay = 0;
if (queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0)
gfs2_glock_put(gl);
@@ -1110,7 +1110,7 @@ void gfs2_glock_dq(struct gfs2_holder *gh)
gfs2_glock_hold(gl);
if (test_bit(GLF_PENDING_DEMOTE, &gl->gl_flags) &&
!test_bit(GLF_DEMOTE, &gl->gl_flags) &&
- gl->gl_name.ln_type == LM_TYPE_INODE)
+ gl->gl_sbd->sd_lockstruct.ls_ops->lm_lock != NULL)
delay = gl->gl_hold_time;
if (queue_delayed_work(glock_workqueue, &gl->gl_work, delay) == 0)
gfs2_glock_put(gl);
@@ -1293,7 +1293,7 @@ void gfs2_glock_cb(struct gfs2_glock *gl, unsigned int state)
gfs2_glock_hold(gl);
holdtime = gl->gl_tchange + gl->gl_hold_time;
if (test_bit(GLF_QUEUED, &gl->gl_flags) &&
- gl->gl_name.ln_type == LM_TYPE_INODE) {
+ gl->gl_sbd->sd_lockstruct.ls_ops->lm_lock != NULL) {
if (time_before(now, holdtime))
delay = holdtime - now;
if (test_bit(GLF_REPLY_PENDING, &gl->gl_flags))
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-17 17:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-17 17:36 [Cluster-devel] [GFS2 PATCH] GFS2: Allow minimum hold time for all glocks Bob Peterson
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.