>I modified my patch. >I do not change Checking b_count in a loop, but introduce >set_current_state(TASK_UNINTERRUPTIBLE) to mitigate the loop. I think this can >lead to avoid busy loop. >I used the same approach of do_sync_read()->wait_on_retry_sync_kiocb or >some drivers(qla2xxx). > >Signed-off-by: Hisashi Hifumi <hifumi.hisashi@xxxxxxxxxxxxx> > >diff -Nrup linux-2.6.27-rc1.org/fs/jbd/transaction.c >linux-2.6.27-rc1.jbdfix/fs/jbd/transaction.c >--- linux-2.6.27-rc1.org/fs/jbd/transaction.c 2008-07-29 19:28:47.000000000 +0900 >+++ linux-2.6.27-rc1.jbdfix/fs/jbd/transaction.c 2008-08-06 >13:35:37.000000000 +0900 >@@ -1764,6 +1764,15 @@ int journal_try_to_free_buffers(journal_ > */ > if (ret == 0 && (gfp_mask & __GFP_WAIT) && (gfp_mask & __GFP_FS)) { > journal_wait_for_transaction_sync_data(journal); >+ >+ bh = head; >+ do { >+ while (atomic_read(&bh->b_count)) { >+ set_current_state(TASK_UNINTERRUPTIBLE); >+ schedule(); >+ __set_current_state(TASK_RUNNING); >+ } >+ } while ((bh = bh->b_this_page) != head); > ret = try_to_free_buffers(page); > } Sorry, the thread entering this loop sleeps infinitely. We should add some wait queue and implement wait/wakeup code. -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html