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 287721 Details for
Bug 423381
GFS2 - Filesystem withdraw when running postmark/benchp13 tests
[?]
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]
Bob's Port of the trans_add_gl patch
gronk (text/plain), 9.03 KB, created by
Robert Peterson
on 2007-12-13 18:02:13 UTC
(
hide
)
Description:
Bob's Port of the trans_add_gl patch
Filename:
MIME Type:
Creator:
Robert Peterson
Created:
2007-12-13 18:02:13 UTC
Size:
9.03 KB
patch
obsolete
>diff -pur a/gfs2/glock.c b/gfs2/glock.c >--- a/gfs2/glock.c 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/glock.c 2007-12-13 11:11:12.000000000 -0600 >@@ -340,7 +340,6 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, > gl->gl_tchange = jiffies; > gl->gl_object = NULL; > gl->gl_sbd = sdp; >- lops_init_le(&gl->gl_le, &gfs2_glock_lops); > INIT_WORK(&gl->gl_work, glock_work_func, (void *)gl); > gl->gl_start = gl->gl_end = number; > >@@ -1900,8 +1899,6 @@ static int dump_glock(struct glock_iter > print_dbg(gi, " req_bh = %s\n", (gl->gl_req_bh) ? "yes" : "no"); > print_dbg(gi, " lvb_count = %d\n", atomic_read(&gl->gl_lvb_count)); > print_dbg(gi, " object = %s\n", (gl->gl_object) ? "yes" : "no"); >- print_dbg(gi, " le = %s\n", >- (list_empty(&gl->gl_le.le_list)) ? "no" : "yes"); > print_dbg(gi, " reclaim = %s\n", > (list_empty(&gl->gl_reclaim)) ? "no" : "yes"); > print_dbg(gi, " ail = %d\n", atomic_read(&gl->gl_ail_count)); >Only in b/gfs2: glock.c.~1~ >diff -pur a/gfs2/incore.h b/gfs2/incore.h >--- a/gfs2/incore.h 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/incore.h 2007-12-13 11:36:25.000000000 -0600 >@@ -207,6 +207,7 @@ enum { > GLF_DEMOTE = 3, > GLF_PENDING_DEMOTE = 4, > GLF_DEMOTE_IN_PROGRESS = 6, >+ GLF_LFLUSH = 7, > }; > > struct gfs2_glock { >@@ -246,7 +247,6 @@ struct gfs2_glock { > > struct gfs2_sbd *gl_sbd; > >- struct gfs2_log_element gl_le; > struct list_head gl_ail_list; > atomic_t gl_ail_count; > struct work_struct gl_work; >@@ -645,13 +645,11 @@ struct gfs2_sbd { > unsigned int sd_log_commited_databuf; > unsigned int sd_log_commited_revoke; > >- unsigned int sd_log_num_gl; > unsigned int sd_log_num_buf; > unsigned int sd_log_num_revoke; > unsigned int sd_log_num_rg; > unsigned int sd_log_num_databuf; > >- struct list_head sd_log_le_gl; > struct list_head sd_log_le_buf; > struct list_head sd_log_le_revoke; > struct list_head sd_log_le_rg; >Only in b/gfs2: incore.h.~1~ >Only in b/gfs2: incore.h.~2~ >Only in b/gfs2: incore.h.~3~ >diff -pur a/gfs2/inode.c b/gfs2/inode.c >--- a/gfs2/inode.c 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/inode.c 2007-12-13 11:36:36.000000000 -0600 >@@ -363,7 +363,7 @@ int gfs2_dinode_dealloc(struct gfs2_inod > if (error) > goto out_rg_gunlock; > >- gfs2_trans_add_gl(ip->i_gl); >+ set_bit(GLF_LFLUSH, &ip->i_gl->gl_flags); > > gfs2_free_di(rgd, ip); > >Only in b/gfs2: inode.c.~1~ >Only in b/gfs2: inode.c.~2~ >diff -pur a/gfs2/log.c b/gfs2/log.c >--- a/gfs2/log.c 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/log.c 2007-12-13 11:39:59.000000000 -0600 >@@ -531,7 +531,8 @@ static void gfs2_fake_write_endio(struct > { > struct buffer_head *real_bh = bh->b_private; > struct gfs2_bufdata *bd = bh_to_bufdata(real_bh); >- struct gfs2_sbd *sdp = GFS2_SB(real_bh->b_page->mapping->host); >+ struct gfs2_sbd *sdp = bd->bd_gl->gl_sbd; >+/* struct gfs2_sbd *sdp = GFS2_SB(real_bh->b_page->mapping->host);*/ > > end_buffer_write_sync(bh, uptodate); > free_buffer_head(bh); >@@ -711,20 +712,16 @@ static void gfs2_ordered_wait(struct gfs > * > */ > >-void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) >+void __gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl) > { > struct gfs2_ail *ai; > > down_write(&sdp->sd_log_flush_lock); > >- if (gl) { >- gfs2_log_lock(sdp); >- if (list_empty(&gl->gl_le.le_list)) { >- gfs2_log_unlock(sdp); >- up_write(&sdp->sd_log_flush_lock); >- return; >- } >- gfs2_log_unlock(sdp); >+ /* Log might have been flushed while we waited for the flush lock */ >+ if (gl && !test_bit(GLF_LFLUSH, &gl->gl_flags)) { >+ up_write(&sdp->sd_log_flush_lock); >+ return; > } > > ai = kzalloc(sizeof(struct gfs2_ail), GFP_NOFS | __GFP_NOFAIL); >@@ -842,7 +839,6 @@ void gfs2_log_shutdown(struct gfs2_sbd * > down_write(&sdp->sd_log_flush_lock); > > gfs2_assert_withdraw(sdp, !sdp->sd_log_blks_reserved); >- gfs2_assert_withdraw(sdp, !sdp->sd_log_num_gl); > gfs2_assert_withdraw(sdp, !sdp->sd_log_num_buf); > gfs2_assert_withdraw(sdp, !sdp->sd_log_num_revoke); > gfs2_assert_withdraw(sdp, !sdp->sd_log_num_rg); >Only in b/gfs2: log.c.~1~ >Only in b/gfs2: log.c.~2~ >diff -pur a/gfs2/log.h b/gfs2/log.h >--- a/gfs2/log.h 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/log.h 2007-12-13 11:24:13.000000000 -0600 >@@ -57,7 +57,13 @@ void gfs2_log_incr_head(struct gfs2_sbd > struct buffer_head *gfs2_log_get_buf(struct gfs2_sbd *sdp); > struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp, > struct buffer_head *real); >-void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl); >+void __gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl); >+static inline void gfs2_log_flush(struct gfs2_sbd *sbd, struct gfs2_glock *gl) >+{ >+ if (!gl || test_bit(GLF_LFLUSH, &gl->gl_flags)) >+ __gfs2_log_flush(sbd, gl); >+} >+ > void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans); > void gfs2_remove_from_ail(struct gfs2_bufdata *bd); > >Only in b/gfs2: log.h.~1~ >diff -pur a/gfs2/lops.c b/gfs2/lops.c >--- a/gfs2/lops.c 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/lops.c 2007-12-13 11:36:48.000000000 -0600 >@@ -91,6 +91,7 @@ static void gfs2_unpin(struct gfs2_sbd * > } > bd->bd_ail = ai; > list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list); >+ clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); > gfs2_log_unlock(sdp); > unlock_buffer(bh); > } >@@ -128,48 +129,6 @@ static struct buffer_head *gfs2_get_log_ > return bh; > } > >-static void __glock_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) >-{ >- struct gfs2_glock *gl; >- struct gfs2_trans *tr = current->journal_info; >- >- tr->tr_touched = 1; >- >- gl = container_of(le, struct gfs2_glock, gl_le); >- if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(gl))) >- return; >- >- if (!list_empty(&le->le_list)) >- return; >- >- gfs2_glock_hold(gl); >- sdp->sd_log_num_gl++; >- list_add(&le->le_list, &sdp->sd_log_le_gl); >-} >- >-static void glock_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) >-{ >- gfs2_log_lock(sdp); >- __glock_lo_add(sdp, le); >- gfs2_log_unlock(sdp); >-} >- >-static void glock_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) >-{ >- struct list_head *head = &sdp->sd_log_le_gl; >- struct gfs2_glock *gl; >- >- while (!list_empty(head)) { >- gl = list_entry(head->next, struct gfs2_glock, gl_le.le_list); >- list_del_init(&gl->gl_le.le_list); >- sdp->sd_log_num_gl--; >- >- gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(gl)); >- gfs2_glock_put(gl); >- } >- gfs2_assert_warn(sdp, !sdp->sd_log_num_gl); >-} >- > static void buf_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) > { > struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le); >@@ -185,7 +144,7 @@ static void buf_lo_add(struct gfs2_sbd * > list_add(&bd->bd_list_tr, &tr->tr_list_buf); > if (!list_empty(&le->le_list)) > goto out; >- __glock_lo_add(sdp, &bd->bd_gl->gl_le); >+ set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); > gfs2_meta_check(sdp, bd->bd_bh); > gfs2_pin(sdp, bd->bd_bh); > sdp->sd_log_num_buf++; >@@ -564,8 +523,7 @@ static void databuf_lo_add(struct gfs2_s > if (!list_empty(&le->le_list)) > goto out; > >- if (tr) >- __glock_lo_add(sdp, &bd->bd_gl->gl_le); >+ set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); > if (gfs2_is_jdata(ip)) { > gfs2_pin(sdp, bd->bd_bh); > tr->tr_num_databuf_new++; >@@ -764,12 +722,6 @@ static void databuf_lo_after_commit(stru > } > > >-const struct gfs2_log_operations gfs2_glock_lops = { >- .lo_add = glock_lo_add, >- .lo_after_commit = glock_lo_after_commit, >- .lo_name = "glock", >-}; >- > const struct gfs2_log_operations gfs2_buf_lops = { > .lo_add = buf_lo_add, > .lo_incore_commit = buf_lo_incore_commit, >@@ -807,7 +759,6 @@ const struct gfs2_log_operations gfs2_da > }; > > const struct gfs2_log_operations *gfs2_log_ops[] = { >- &gfs2_glock_lops, > &gfs2_databuf_lops, > &gfs2_buf_lops, > &gfs2_rg_lops, >Only in b/gfs2: lops.c.~1~ >Only in b/gfs2: lops.c.~2~ >diff -pur a/gfs2/ops_fstype.c b/gfs2/ops_fstype.c >--- a/gfs2/ops_fstype.c 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/ops_fstype.c 2007-12-13 11:30:02.000000000 -0600 >@@ -79,7 +79,6 @@ static struct gfs2_sbd *init_sbd(struct > > spin_lock_init(&sdp->sd_log_lock); > >- INIT_LIST_HEAD(&sdp->sd_log_le_gl); > INIT_LIST_HEAD(&sdp->sd_log_le_buf); > INIT_LIST_HEAD(&sdp->sd_log_le_revoke); > INIT_LIST_HEAD(&sdp->sd_log_le_rg); >Only in b/gfs2: ops_fstype.c.~1~ >diff -pur a/gfs2/trans.c b/gfs2/trans.c >--- a/gfs2/trans.c 2007-12-13 08:52:26.000000000 -0600 >+++ b/gfs2/trans.c 2007-12-13 11:30:23.000000000 -0600 >@@ -114,11 +114,6 @@ void gfs2_trans_end(struct gfs2_sbd *sdp > gfs2_log_flush(sdp, NULL); > } > >-void gfs2_trans_add_gl(struct gfs2_glock *gl) >-{ >- lops_add(gl->gl_sbd, &gl->gl_le); >-} >- > /** > * gfs2_trans_add_bh - Add a buffer head into the journal > * @gl: the glock the buffer belongs to >Only in b/gfs2: trans.c.~1~ >diff -pur a/gfs2/trans.h b/gfs2/trans.h >--- a/gfs2/trans.h 2007-09-25 16:37:23.000000000 -0500 >+++ b/gfs2/trans.h 2007-12-13 11:30:37.000000000 -0600 >@@ -30,7 +30,6 @@ int gfs2_do_trans_begin(struct gfs2_sbd > > void gfs2_trans_end(struct gfs2_sbd *sdp); > >-void gfs2_trans_add_gl(struct gfs2_glock *gl); > void gfs2_trans_add_bh(struct gfs2_glock *gl, struct buffer_head *bh, int meta); > void gfs2_trans_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd); > void gfs2_trans_add_unrevoke(struct gfs2_sbd *sdp, u64 blkno); >Only in b/gfs2: trans.h.~1~
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 423381
: 287721 |
289381
|
289809
|
289823