Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 200221
b: refs/heads/master
c: fbe33a7
h: refs/heads/master
i:
  200219: 494aa29
v: v3
  • Loading branch information
Linus Torvalds committed Jun 9, 2010
1 parent 423f034 commit 39dacf0
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 33 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 40a510ddc57b49a01668643b1dec691a0e996c52
refs/heads/master: fbe33a7c3f388f7b8b2642bfadb1b5914f635a5b
2 changes: 1 addition & 1 deletion trunk/drivers/input/misc/hp_sdc_rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ static const struct file_operations hp_sdc_rtc_fops = {
.llseek = no_llseek,
.read = hp_sdc_rtc_read,
.poll = hp_sdc_rtc_poll,
.unlocked_ioctl = hp_sdc_rtc_ioctl,
.unlocked_ioctl = hp_sdc_rtc_unlocked_ioctl,
.open = hp_sdc_rtc_open,
.fasync = hp_sdc_rtc_fasync,
};
Expand Down
8 changes: 0 additions & 8 deletions trunk/fs/xfs/linux-2.6/xfs_aops.c
Original file line number Diff line number Diff line change
Expand Up @@ -1381,14 +1381,6 @@ xfs_vm_writepage(
if (!page_has_buffers(page))
create_empty_buffers(page, 1 << inode->i_blkbits, 0);


/*
* VM calculation for nr_to_write seems off. Bump it way
* up, this gets simple streaming writes zippy again.
* To be reviewed again after Jens' writeback changes.
*/
wbc->nr_to_write *= 4;

/*
* Convert delayed allocate, unwritten or unmapped space
* to real space and flush out to disk.
Expand Down
9 changes: 0 additions & 9 deletions trunk/include/linux/writeback.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,6 @@ struct writeback_control {
unsigned for_reclaim:1; /* Invoked from the page allocator */
unsigned range_cyclic:1; /* range_start is cyclic */
unsigned more_io:1; /* more io to be dispatched */
/*
* write_cache_pages() won't update wbc->nr_to_write and
* mapping->writeback_index if no_nrwrite_index_update
* is set. write_cache_pages() may write more than we
* requested and we want to make sure nr_to_write and
* writeback_index are updated in a consistent manner
* so we use a single control to update them
*/
unsigned no_nrwrite_index_update:1;
};

/*
Expand Down
5 changes: 1 addition & 4 deletions trunk/include/trace/events/ext4.h
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,6 @@ TRACE_EVENT(ext4_da_writepages_result,
__field( int, pages_written )
__field( long, pages_skipped )
__field( char, more_io )
__field( char, no_nrwrite_index_update )
__field( pgoff_t, writeback_index )
),

Expand All @@ -317,16 +316,14 @@ TRACE_EVENT(ext4_da_writepages_result,
__entry->pages_written = pages_written;
__entry->pages_skipped = wbc->pages_skipped;
__entry->more_io = wbc->more_io;
__entry->no_nrwrite_index_update = wbc->no_nrwrite_index_update;
__entry->writeback_index = inode->i_mapping->writeback_index;
),

TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d no_nrwrite_index_update %d writeback_index %lu",
TP_printk("dev %s ino %lu ret %d pages_written %d pages_skipped %ld more_io %d writeback_index %lu",
jbd2_dev_to_name(__entry->dev),
(unsigned long) __entry->ino, __entry->ret,
__entry->pages_written, __entry->pages_skipped,
__entry->more_io,
__entry->no_nrwrite_index_update,
(unsigned long) __entry->writeback_index)
);

Expand Down
30 changes: 20 additions & 10 deletions trunk/mm/page-writeback.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,7 +835,6 @@ int write_cache_pages(struct address_space *mapping,
pgoff_t done_index;
int cycled;
int range_whole = 0;
long nr_to_write = wbc->nr_to_write;

pagevec_init(&pvec, 0);
if (wbc->range_cyclic) {
Expand All @@ -852,7 +851,22 @@ int write_cache_pages(struct address_space *mapping,
if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
range_whole = 1;
cycled = 1; /* ignore range_cyclic tests */

/*
* If this is a data integrity sync, cap the writeback to the
* current end of file. Any extension to the file that occurs
* after this is a new write and we don't need to write those
* pages out to fulfil our data integrity requirements. If we
* try to write them out, we can get stuck in this scan until
* the concurrent writer stops adding dirty pages and extending
* EOF.
*/
if (wbc->sync_mode == WB_SYNC_ALL &&
wbc->range_end == LLONG_MAX) {
end = i_size_read(mapping->host) >> PAGE_CACHE_SHIFT;
}
}

retry:
done_index = index;
while (!done && (index <= end)) {
Expand Down Expand Up @@ -935,11 +949,10 @@ int write_cache_pages(struct address_space *mapping,
done = 1;
break;
}
}
}

if (nr_to_write > 0) {
nr_to_write--;
if (nr_to_write == 0 &&
if (wbc->nr_to_write > 0) {
if (--wbc->nr_to_write == 0 &&
wbc->sync_mode == WB_SYNC_NONE) {
/*
* We stop writing back only if we are
Expand Down Expand Up @@ -970,11 +983,8 @@ int write_cache_pages(struct address_space *mapping,
end = writeback_index - 1;
goto retry;
}
if (!wbc->no_nrwrite_index_update) {
if (wbc->range_cyclic || (range_whole && nr_to_write > 0))
mapping->writeback_index = done_index;
wbc->nr_to_write = nr_to_write;
}
if (wbc->range_cyclic || (range_whole && wbc->nr_to_write > 0))
mapping->writeback_index = done_index;

return ret;
}
Expand Down

0 comments on commit 39dacf0

Please sign in to comment.