Loading fs/gfs2/bmap.c +2 −0 Original line number Diff line number Diff line Loading @@ -780,6 +780,8 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, metadata = (height != ip->i_height - 1); if (metadata) revokes = (height) ? sdp->sd_inptrs : sdp->sd_diptrs; else if (ip->i_depth) revokes = sdp->sd_inptrs; if (ip != GFS2_I(sdp->sd_rindex)) error = gfs2_rindex_hold(sdp, &ip->i_alloc->al_ri_gh); Loading fs/gfs2/log.c +26 −3 Original line number Diff line number Diff line Loading @@ -228,6 +228,27 @@ static int gfs2_ail1_empty(struct gfs2_sbd *sdp) return ret; } static void gfs2_ail1_wait(struct gfs2_sbd *sdp) { struct gfs2_ail *ai; struct gfs2_bufdata *bd; struct buffer_head *bh; spin_lock(&sdp->sd_ail_lock); list_for_each_entry_reverse(ai, &sdp->sd_ail1_list, ai_list) { list_for_each_entry(bd, &ai->ai_ail1_list, bd_ail_st_list) { bh = bd->bd_bh; if (!buffer_locked(bh)) continue; get_bh(bh); spin_unlock(&sdp->sd_ail_lock); wait_on_buffer(bh); brelse(bh); return; } } spin_unlock(&sdp->sd_ail_lock); } /** * gfs2_ail2_empty_one - Check whether or not a trans in the AIL has been synced Loading Loading @@ -878,9 +899,9 @@ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) gfs2_log_flush(sdp, NULL); for (;;) { gfs2_ail1_start(sdp); gfs2_ail1_wait(sdp); if (gfs2_ail1_empty(sdp)) break; msleep(10); } } Loading Loading @@ -920,12 +941,14 @@ int gfs2_logd(void *data) if (gfs2_ail_flush_reqd(sdp)) { gfs2_ail1_start(sdp); io_schedule(); gfs2_ail1_wait(sdp); gfs2_ail1_empty(sdp); gfs2_log_flush(sdp, NULL); } if (!gfs2_ail_flush_reqd(sdp)) wake_up(&sdp->sd_log_waitq); t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; if (freezing(current)) refrigerator(); Loading fs/gfs2/rgrp.c +4 −0 Original line number Diff line number Diff line Loading @@ -1629,6 +1629,10 @@ void __gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen) gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data); gfs2_trans_add_rg(rgd); /* Directories keep their data in the metadata address space */ if (ip->i_depth) gfs2_meta_wipe(ip, bstart, blen); } /** Loading Loading
fs/gfs2/bmap.c +2 −0 Original line number Diff line number Diff line Loading @@ -780,6 +780,8 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, metadata = (height != ip->i_height - 1); if (metadata) revokes = (height) ? sdp->sd_inptrs : sdp->sd_diptrs; else if (ip->i_depth) revokes = sdp->sd_inptrs; if (ip != GFS2_I(sdp->sd_rindex)) error = gfs2_rindex_hold(sdp, &ip->i_alloc->al_ri_gh); Loading
fs/gfs2/log.c +26 −3 Original line number Diff line number Diff line Loading @@ -228,6 +228,27 @@ static int gfs2_ail1_empty(struct gfs2_sbd *sdp) return ret; } static void gfs2_ail1_wait(struct gfs2_sbd *sdp) { struct gfs2_ail *ai; struct gfs2_bufdata *bd; struct buffer_head *bh; spin_lock(&sdp->sd_ail_lock); list_for_each_entry_reverse(ai, &sdp->sd_ail1_list, ai_list) { list_for_each_entry(bd, &ai->ai_ail1_list, bd_ail_st_list) { bh = bd->bd_bh; if (!buffer_locked(bh)) continue; get_bh(bh); spin_unlock(&sdp->sd_ail_lock); wait_on_buffer(bh); brelse(bh); return; } } spin_unlock(&sdp->sd_ail_lock); } /** * gfs2_ail2_empty_one - Check whether or not a trans in the AIL has been synced Loading Loading @@ -878,9 +899,9 @@ void gfs2_meta_syncfs(struct gfs2_sbd *sdp) gfs2_log_flush(sdp, NULL); for (;;) { gfs2_ail1_start(sdp); gfs2_ail1_wait(sdp); if (gfs2_ail1_empty(sdp)) break; msleep(10); } } Loading Loading @@ -920,12 +941,14 @@ int gfs2_logd(void *data) if (gfs2_ail_flush_reqd(sdp)) { gfs2_ail1_start(sdp); io_schedule(); gfs2_ail1_wait(sdp); gfs2_ail1_empty(sdp); gfs2_log_flush(sdp, NULL); } if (!gfs2_ail_flush_reqd(sdp)) wake_up(&sdp->sd_log_waitq); t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; if (freezing(current)) refrigerator(); Loading
fs/gfs2/rgrp.c +4 −0 Original line number Diff line number Diff line Loading @@ -1629,6 +1629,10 @@ void __gfs2_free_data(struct gfs2_inode *ip, u64 bstart, u32 blen) gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data); gfs2_trans_add_rg(rgd); /* Directories keep their data in the metadata address space */ if (ip->i_depth) gfs2_meta_wipe(ip, bstart, blen); } /** Loading