Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes

* git://git.kernel.org/pub/scm/linux/kernel/git/steve/gfs2-2.6-fixes:
GFS2: Wait properly when flushing the ail list
GFS2: Wipe directory hash table metadata when deallocating a directory

+32 -3
+2
fs/gfs2/bmap.c
··· 780 780 metadata = (height != ip->i_height - 1); 781 781 if (metadata) 782 782 revokes = (height) ? sdp->sd_inptrs : sdp->sd_diptrs; 783 + else if (ip->i_depth) 784 + revokes = sdp->sd_inptrs; 783 785 784 786 if (ip != GFS2_I(sdp->sd_rindex)) 785 787 error = gfs2_rindex_hold(sdp, &ip->i_alloc->al_ri_gh);
+26 -3
fs/gfs2/log.c
··· 228 228 return ret; 229 229 } 230 230 231 + static void gfs2_ail1_wait(struct gfs2_sbd *sdp) 232 + { 233 + struct gfs2_ail *ai; 234 + struct gfs2_bufdata *bd; 235 + struct buffer_head *bh; 236 + 237 + spin_lock(&sdp->sd_ail_lock); 238 + list_for_each_entry_reverse(ai, &sdp->sd_ail1_list, ai_list) { 239 + list_for_each_entry(bd, &ai->ai_ail1_list, bd_ail_st_list) { 240 + bh = bd->bd_bh; 241 + if (!buffer_locked(bh)) 242 + continue; 243 + get_bh(bh); 244 + spin_unlock(&sdp->sd_ail_lock); 245 + wait_on_buffer(bh); 246 + brelse(bh); 247 + return; 248 + } 249 + } 250 + spin_unlock(&sdp->sd_ail_lock); 251 + } 231 252 232 253 /** 233 254 * gfs2_ail2_empty_one - Check whether or not a trans in the AIL has been synced ··· 899 878 gfs2_log_flush(sdp, NULL); 900 879 for (;;) { 901 880 gfs2_ail1_start(sdp); 881 + gfs2_ail1_wait(sdp); 902 882 if (gfs2_ail1_empty(sdp)) 903 883 break; 904 - msleep(10); 905 884 } 906 885 } 907 886 ··· 941 920 942 921 if (gfs2_ail_flush_reqd(sdp)) { 943 922 gfs2_ail1_start(sdp); 944 - io_schedule(); 923 + gfs2_ail1_wait(sdp); 945 924 gfs2_ail1_empty(sdp); 946 925 gfs2_log_flush(sdp, NULL); 947 926 } 948 927 949 - wake_up(&sdp->sd_log_waitq); 928 + if (!gfs2_ail_flush_reqd(sdp)) 929 + wake_up(&sdp->sd_log_waitq); 930 + 950 931 t = gfs2_tune_get(sdp, gt_logd_secs) * HZ; 951 932 if (freezing(current)) 952 933 refrigerator();
+4
fs/gfs2/rgrp.c
··· 1629 1629 gfs2_rgrp_out(rgd, rgd->rd_bits[0].bi_bh->b_data); 1630 1630 1631 1631 gfs2_trans_add_rg(rgd); 1632 + 1633 + /* Directories keep their data in the metadata address space */ 1634 + if (ip->i_depth) 1635 + gfs2_meta_wipe(ip, bstart, blen); 1632 1636 } 1633 1637 1634 1638 /**