Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 298089 Details for
Bug 428751
GFS2 is not cluster coherent
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Patch to invalidate the page cache before calling the lock manager
428751_RHEL.patch (text/plain), 6.62 KB, created by
Ben Marzinski
on 2008-03-14 22:08:00 UTC
(
hide
)
Description:
Patch to invalidate the page cache before calling the lock manager
Filename:
MIME Type:
Creator:
Ben Marzinski
Created:
2008-03-14 22:08:00 UTC
Size:
6.62 KB
patch
obsolete
>diff -urpN linux-2.6.18-85.el5-clean/fs/gfs2/glock.c linux-2.6.18-85.el5-patched/fs/gfs2/glock.c >--- linux-2.6.18-85.el5-clean/fs/gfs2/glock.c 2008-03-14 07:31:44.000000000 -0500 >+++ linux-2.6.18-85.el5-patched/fs/gfs2/glock.c 2008-03-14 09:02:36.000000000 -0500 >@@ -766,7 +766,7 @@ static void state_change(struct gfs2_glo > static void drop_bh(struct gfs2_glock *gl, unsigned int ret) > { > struct gfs2_sbd *sdp = gl->gl_sbd; >- const struct gfs2_glock_operations *glops = gl->gl_ops; >+ struct gfs2_holder *gh = gl->gl_req_gh; > > gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags)); > gfs2_assert_warn(sdp, list_empty(&gl->gl_holders)); >@@ -774,8 +774,14 @@ static void drop_bh(struct gfs2_glock *g > > state_change(gl, LM_ST_UNLOCKED); > >- if (glops->go_inval) >- glops->go_inval(gl, DIO_METADATA); >+ if (test_and_clear_bit(GLF_CONV_DEADLK, &gl->gl_flags)) { >+ spin_lock(&gl->gl_spin); >+ gh->gh_error = 0; >+ spin_unlock(&gl->gl_spin); >+ gfs2_glock_xmote_th(gl, gl->gl_req_gh); >+ gfs2_glock_put(gl); >+ return; >+ } > > spin_lock(&gl->gl_spin); > gfs2_demote_wake(gl); >@@ -796,7 +802,6 @@ static void xmote_bh(struct gfs2_glock * > struct gfs2_sbd *sdp = gl->gl_sbd; > const struct gfs2_glock_operations *glops = gl->gl_ops; > struct gfs2_holder *gh = gl->gl_req_gh; >- int prev_state = gl->gl_state; > int op_done = 1; > > if (!gh && (ret & LM_OUT_ST_MASK) == LM_ST_UNLOCKED) { >@@ -810,16 +815,6 @@ static void xmote_bh(struct gfs2_glock * > > state_change(gl, ret & LM_OUT_ST_MASK); > >- if (prev_state != LM_ST_UNLOCKED && !(ret & LM_OUT_CACHEABLE)) { >- if (glops->go_inval) >- glops->go_inval(gl, DIO_METADATA); >- } else if (gl->gl_state == LM_ST_DEFERRED) { >- /* We might not want to do this here. >- Look at moving to the inode glops. */ >- if (glops->go_inval) >- glops->go_inval(gl, 0); >- } >- > /* Deal with each possible exit condition */ > > if (!gh) { >@@ -839,6 +834,14 @@ static void xmote_bh(struct gfs2_glock * > } > } else { > spin_lock(&gl->gl_spin); >+ if (ret & LM_OUT_CONV_DEADLK) { >+ gh->gh_error = 0; >+ set_bit(GLF_CONV_DEADLK, &gl->gl_flags); >+ spin_unlock(&gl->gl_spin); >+ gfs2_glock_drop_th(gl); >+ gfs2_glock_put(gl); >+ return; >+ } > list_del_init(&gh->gh_list); > gh->gh_error = -EIO; > if (unlikely(test_bit(SDF_SHUTDOWN, &sdp->sd_flags))) >@@ -901,6 +904,8 @@ static void gfs2_glock_xmote_th(struct g > > if (glops->go_xmote_th) > glops->go_xmote_th(gl); >+ if (state == LM_ST_DEFERRED && glops->go_inval) >+ glops->go_inval(gl, DIO_METADATA); > > gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags)); > gfs2_assert_warn(sdp, list_empty(&gl->gl_holders)); >@@ -934,6 +939,8 @@ static void gfs2_glock_drop_th(struct gf > > if (glops->go_drop_th) > glops->go_drop_th(gl); >+ if (glops->go_inval) >+ glops->go_inval(gl, DIO_METADATA); > > gfs2_assert_warn(sdp, test_bit(GLF_LOCK, &gl->gl_flags)); > gfs2_assert_warn(sdp, list_empty(&gl->gl_holders)); >diff -urpN linux-2.6.18-85.el5-clean/fs/gfs2/incore.h linux-2.6.18-85.el5-patched/fs/gfs2/incore.h >--- linux-2.6.18-85.el5-clean/fs/gfs2/incore.h 2008-03-14 07:31:43.000000000 -0500 >+++ linux-2.6.18-85.el5-patched/fs/gfs2/incore.h 2008-03-14 08:01:34.000000000 -0500 >@@ -171,6 +171,7 @@ enum { > GLF_DEMOTE_IN_PROGRESS = 6, > GLF_LFLUSH = 7, > GLF_WAITERS2 = 8, >+ GLF_CONV_DEADLK = 9, > }; > > struct gfs2_glock { >diff -urpN linux-2.6.18-85.el5-clean/fs/gfs2/lm.c linux-2.6.18-85.el5-patched/fs/gfs2/lm.c >--- linux-2.6.18-85.el5-clean/fs/gfs2/lm.c 2008-03-14 07:31:07.000000000 -0500 >+++ linux-2.6.18-85.el5-patched/fs/gfs2/lm.c 2008-03-14 07:57:19.000000000 -0500 >@@ -35,7 +35,7 @@ int gfs2_lm_mount(struct gfs2_sbd *sdp, > { > char *proto = sdp->sd_proto_name; > char *table = sdp->sd_table_name; >- int flags = 0; >+ int flags = LM_MFLAG_CONV_NODROP; > int error; > > if (sdp->sd_args.ar_spectator) >diff -urpN linux-2.6.18-85.el5-clean/fs/gfs2/locking/dlm/lock.c linux-2.6.18-85.el5-patched/fs/gfs2/locking/dlm/lock.c >--- linux-2.6.18-85.el5-clean/fs/gfs2/locking/dlm/lock.c 2008-03-14 07:31:08.000000000 -0500 >+++ linux-2.6.18-85.el5-patched/fs/gfs2/locking/dlm/lock.c 2008-03-14 07:57:19.000000000 -0500 >@@ -137,7 +137,8 @@ static inline unsigned int make_flags(st > > /* Conversion deadlock avoidance by DLM */ > >- if (!test_bit(LFL_FORCE_PROMOTE, &lp->flags) && >+ if (!(lp->ls->fsflags & LM_MFLAG_CONV_NODROP) && >+ !test_bit(LFL_FORCE_PROMOTE, &lp->flags) && > !(lkf & DLM_LKF_NOQUEUE) && > cur > DLM_LOCK_NL && req > DLM_LOCK_NL && cur != req) > lkf |= DLM_LKF_CONVDEADLK; >diff -urpN linux-2.6.18-85.el5-clean/fs/gfs2/locking/dlm/thread.c linux-2.6.18-85.el5-patched/fs/gfs2/locking/dlm/thread.c >--- linux-2.6.18-85.el5-clean/fs/gfs2/locking/dlm/thread.c 2008-03-14 07:31:31.000000000 -0500 >+++ linux-2.6.18-85.el5-patched/fs/gfs2/locking/dlm/thread.c 2008-03-14 07:57:19.000000000 -0500 >@@ -135,7 +135,15 @@ static void process_complete(struct gdlm > lp->lksb.sb_status, lp->lockname.ln_type, > (unsigned long long)lp->lockname.ln_number, > lp->flags); >- return; >+ if (lp->lksb.sb_status == -EDEADLOCK && >+ lp->ls->fsflags & LM_MFLAG_CONV_NODROP) { >+ lp->req = lp->cur; >+ acb.lc_ret |= LM_OUT_CONV_DEADLK; >+ if (lp->cur == DLM_LOCK_IV) >+ lp->lksb.sb_lkid = 0; >+ goto out; >+ } else >+ return; > } > > /* >diff -urpN linux-2.6.18-85.el5-clean/include/linux/lm_interface.h linux-2.6.18-85.el5-patched/include/linux/lm_interface.h >--- linux-2.6.18-85.el5-clean/include/linux/lm_interface.h 2008-03-14 07:31:05.000000000 -0500 >+++ linux-2.6.18-85.el5-patched/include/linux/lm_interface.h 2008-03-14 08:55:54.000000000 -0500 >@@ -21,9 +21,15 @@ typedef void (*lm_callback_t) (void *ptr > * modify the filesystem. The lock module shouldn't assign a journal to the FS > * mount. It shouldn't send recovery callbacks to the FS mount. If the node > * dies or withdraws, all locks can be wiped immediately. >+ * >+ * LM_MFLAG_CONV_NODROP >+ * Do not allow the dlm to internally resolve conversion deadlocks by demoting >+ * the lock to unlocked and then reacquiring it in the requested mode. Instead, >+ * it should cancel the request and return LM_OUT_CONV_DEADLK. > */ > > #define LM_MFLAG_SPECTATOR 0x00000001 >+#define LM_MFLAG_CONV_NODROP 0x00000002 > > /* > * lm_lockstruct flags >@@ -110,6 +116,9 @@ typedef void (*lm_callback_t) (void *ptr > * > * LM_OUT_ASYNC > * The result of the request will be returned in an LM_CB_ASYNC callback. >+ * >+ * LM_OUT_CONV_DEADLK >+ * The lock request was canceled do to a conversion deadlock. > */ > > #define LM_OUT_ST_MASK 0x00000003 >@@ -117,6 +126,7 @@ typedef void (*lm_callback_t) (void *ptr > #define LM_OUT_CANCELED 0x00000008 > #define LM_OUT_ASYNC 0x00000080 > #define LM_OUT_ERROR 0x00000100 >+#define LM_OUT_CONV_DEADLK 0x00000200 > > /* > * lm_callback_t types
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 428751
:
291873
|
291980
|
292006
|
294369
|
295573
| 298089