|
@@ -665,7 +665,7 @@ static size_t nilfs_lookup_dirty_data_buffers(struct inode *inode,
|
|
|
|
|
|
bh = head = page_buffers(page);
|
|
bh = head = page_buffers(page);
|
|
do {
|
|
do {
|
|
- if (!buffer_dirty(bh))
|
|
|
|
|
|
+ if (!buffer_dirty(bh) || buffer_async_write(bh))
|
|
continue;
|
|
continue;
|
|
get_bh(bh);
|
|
get_bh(bh);
|
|
list_add_tail(&bh->b_assoc_buffers, listp);
|
|
list_add_tail(&bh->b_assoc_buffers, listp);
|
|
@@ -699,7 +699,8 @@ static void nilfs_lookup_dirty_node_buffers(struct inode *inode,
|
|
for (i = 0; i < pagevec_count(&pvec); i++) {
|
|
for (i = 0; i < pagevec_count(&pvec); i++) {
|
|
bh = head = page_buffers(pvec.pages[i]);
|
|
bh = head = page_buffers(pvec.pages[i]);
|
|
do {
|
|
do {
|
|
- if (buffer_dirty(bh)) {
|
|
|
|
|
|
+ if (buffer_dirty(bh) &&
|
|
|
|
+ !buffer_async_write(bh)) {
|
|
get_bh(bh);
|
|
get_bh(bh);
|
|
list_add_tail(&bh->b_assoc_buffers,
|
|
list_add_tail(&bh->b_assoc_buffers,
|
|
listp);
|
|
listp);
|
|
@@ -1579,6 +1580,7 @@ static void nilfs_segctor_prepare_write(struct nilfs_sc_info *sci)
|
|
|
|
|
|
list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
|
|
list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
|
|
b_assoc_buffers) {
|
|
b_assoc_buffers) {
|
|
|
|
+ set_buffer_async_write(bh);
|
|
if (bh->b_page != bd_page) {
|
|
if (bh->b_page != bd_page) {
|
|
if (bd_page) {
|
|
if (bd_page) {
|
|
lock_page(bd_page);
|
|
lock_page(bd_page);
|
|
@@ -1592,6 +1594,7 @@ static void nilfs_segctor_prepare_write(struct nilfs_sc_info *sci)
|
|
|
|
|
|
list_for_each_entry(bh, &segbuf->sb_payload_buffers,
|
|
list_for_each_entry(bh, &segbuf->sb_payload_buffers,
|
|
b_assoc_buffers) {
|
|
b_assoc_buffers) {
|
|
|
|
+ set_buffer_async_write(bh);
|
|
if (bh == segbuf->sb_super_root) {
|
|
if (bh == segbuf->sb_super_root) {
|
|
if (bh->b_page != bd_page) {
|
|
if (bh->b_page != bd_page) {
|
|
lock_page(bd_page);
|
|
lock_page(bd_page);
|
|
@@ -1677,6 +1680,7 @@ static void nilfs_abort_logs(struct list_head *logs, int err)
|
|
list_for_each_entry(segbuf, logs, sb_list) {
|
|
list_for_each_entry(segbuf, logs, sb_list) {
|
|
list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
|
|
list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
|
|
b_assoc_buffers) {
|
|
b_assoc_buffers) {
|
|
|
|
+ clear_buffer_async_write(bh);
|
|
if (bh->b_page != bd_page) {
|
|
if (bh->b_page != bd_page) {
|
|
if (bd_page)
|
|
if (bd_page)
|
|
end_page_writeback(bd_page);
|
|
end_page_writeback(bd_page);
|
|
@@ -1686,6 +1690,7 @@ static void nilfs_abort_logs(struct list_head *logs, int err)
|
|
|
|
|
|
list_for_each_entry(bh, &segbuf->sb_payload_buffers,
|
|
list_for_each_entry(bh, &segbuf->sb_payload_buffers,
|
|
b_assoc_buffers) {
|
|
b_assoc_buffers) {
|
|
|
|
+ clear_buffer_async_write(bh);
|
|
if (bh == segbuf->sb_super_root) {
|
|
if (bh == segbuf->sb_super_root) {
|
|
if (bh->b_page != bd_page) {
|
|
if (bh->b_page != bd_page) {
|
|
end_page_writeback(bd_page);
|
|
end_page_writeback(bd_page);
|
|
@@ -1755,6 +1760,7 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
|
|
b_assoc_buffers) {
|
|
b_assoc_buffers) {
|
|
set_buffer_uptodate(bh);
|
|
set_buffer_uptodate(bh);
|
|
clear_buffer_dirty(bh);
|
|
clear_buffer_dirty(bh);
|
|
|
|
+ clear_buffer_async_write(bh);
|
|
if (bh->b_page != bd_page) {
|
|
if (bh->b_page != bd_page) {
|
|
if (bd_page)
|
|
if (bd_page)
|
|
end_page_writeback(bd_page);
|
|
end_page_writeback(bd_page);
|
|
@@ -1776,6 +1782,7 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
|
|
b_assoc_buffers) {
|
|
b_assoc_buffers) {
|
|
set_buffer_uptodate(bh);
|
|
set_buffer_uptodate(bh);
|
|
clear_buffer_dirty(bh);
|
|
clear_buffer_dirty(bh);
|
|
|
|
+ clear_buffer_async_write(bh);
|
|
clear_buffer_delay(bh);
|
|
clear_buffer_delay(bh);
|
|
clear_buffer_nilfs_volatile(bh);
|
|
clear_buffer_nilfs_volatile(bh);
|
|
clear_buffer_nilfs_redirected(bh);
|
|
clear_buffer_nilfs_redirected(bh);
|