* [PATCH 1/2]: writeback: remove writeback_inodes_wbc
@ 2010-06-10 10:07 Christoph Hellwig
2010-06-10 12:59 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2010-06-10 10:07 UTC (permalink / raw)
To: axboe; +Cc: linux-fsdevel
This was just an odd wrapper around writeback_inodes_wb. Removing this
also allows to get rid of the bdi member of struct writeback_control
which was rather out of place there.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/fs/fs-writeback.c
===================================================================
--- linux-2.6.orig/fs/fs-writeback.c 2010-06-10 09:03:10.059253950 +0200
+++ linux-2.6/fs/fs-writeback.c 2010-06-10 09:07:13.167270503 +0200
@@ -614,8 +614,8 @@ static int writeback_sb_inodes(struct su
return 1;
}
-static void writeback_inodes_wb(struct bdi_writeback *wb,
- struct writeback_control *wbc)
+void writeback_inodes_wb(struct bdi_writeback *wb,
+ struct writeback_control *wbc)
{
int ret = 0;
@@ -660,13 +660,6 @@ static void writeback_inodes_wb(struct b
/* Leave any unwritten inodes on b_io */
}
-void writeback_inodes_wbc(struct writeback_control *wbc)
-{
- struct backing_dev_info *bdi = wbc->bdi;
-
- writeback_inodes_wb(&bdi->wb, wbc);
-}
-
/*
* The maximum number of pages to writeout in a single bdi flush/kupdate
* operation. We do this so we don't hold I_SYNC against an inode for
@@ -705,7 +698,6 @@ static long wb_writeback(struct bdi_writ
struct wb_writeback_args *args)
{
struct writeback_control wbc = {
- .bdi = wb->bdi,
.sb = args->sb,
.sync_mode = args->sync_mode,
.older_than_this = NULL,
Index: linux-2.6/include/linux/writeback.h
===================================================================
--- linux-2.6.orig/include/linux/writeback.h 2010-06-10 09:03:10.085254439 +0200
+++ linux-2.6/include/linux/writeback.h 2010-06-10 09:06:11.296003848 +0200
@@ -27,8 +27,6 @@ enum writeback_sync_modes {
* in a manner such that unspecified fields are set to zero.
*/
struct writeback_control {
- struct backing_dev_info *bdi; /* If !NULL, only write back this
- queue */
struct super_block *sb; /* if !NULL, only write inodes from
this super_block */
enum writeback_sync_modes sync_mode;
@@ -66,7 +64,8 @@ int inode_wait(void *);
void writeback_inodes_sb(struct super_block *);
int writeback_inodes_sb_if_idle(struct super_block *);
void sync_inodes_sb(struct super_block *);
-void writeback_inodes_wbc(struct writeback_control *wbc);
+void writeback_inodes_wb(struct bdi_writeback *wb,
+ struct writeback_control *wbc);
long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
void wakeup_flusher_threads(long nr_pages);
Index: linux-2.6/mm/backing-dev.c
===================================================================
--- linux-2.6.orig/mm/backing-dev.c 2010-06-10 09:03:10.093274414 +0200
+++ linux-2.6/mm/backing-dev.c 2010-06-10 09:05:48.118024450 +0200
@@ -340,14 +340,13 @@ int bdi_has_dirty_io(struct backing_dev_
static void bdi_flush_io(struct backing_dev_info *bdi)
{
struct writeback_control wbc = {
- .bdi = bdi,
.sync_mode = WB_SYNC_NONE,
.older_than_this = NULL,
.range_cyclic = 1,
.nr_to_write = 1024,
};
- writeback_inodes_wbc(&wbc);
+ writeback_inodes_wb(&bdi->wb, &wbc);
}
/*
Index: linux-2.6/mm/page-writeback.c
===================================================================
--- linux-2.6.orig/mm/page-writeback.c 2010-06-10 09:03:10.106274553 +0200
+++ linux-2.6/mm/page-writeback.c 2010-06-10 09:05:48.126005733 +0200
@@ -495,7 +495,6 @@ static void balance_dirty_pages(struct a
for (;;) {
struct writeback_control wbc = {
- .bdi = bdi,
.sync_mode = WB_SYNC_NONE,
.older_than_this = NULL,
.nr_to_write = write_chunk,
@@ -537,7 +536,7 @@ static void balance_dirty_pages(struct a
* up.
*/
if (bdi_nr_reclaimable > bdi_thresh) {
- writeback_inodes_wbc(&wbc);
+ writeback_inodes_wb(&bdi->wb, &wbc);
pages_written += write_chunk - wbc.nr_to_write;
get_dirty_limits(&background_thresh, &dirty_thresh,
&bdi_thresh, bdi);
Index: linux-2.6/fs/afs/write.c
===================================================================
--- linux-2.6.orig/fs/afs/write.c 2010-06-10 09:03:10.067253671 +0200
+++ linux-2.6/fs/afs/write.c 2010-06-10 09:05:48.133005383 +0200
@@ -680,7 +680,6 @@ int afs_writeback_all(struct afs_vnode *
{
struct address_space *mapping = vnode->vfs_inode.i_mapping;
struct writeback_control wbc = {
- .bdi = mapping->backing_dev_info,
.sync_mode = WB_SYNC_ALL,
.nr_to_write = LONG_MAX,
.range_cyclic = 1,
Index: linux-2.6/fs/btrfs/extent_io.c
===================================================================
--- linux-2.6.orig/fs/btrfs/extent_io.c 2010-06-10 09:03:10.077260166 +0200
+++ linux-2.6/fs/btrfs/extent_io.c 2010-06-10 09:05:48.140005942 +0200
@@ -2594,7 +2594,6 @@ int extent_write_full_page(struct extent
.sync_io = wbc->sync_mode == WB_SYNC_ALL,
};
struct writeback_control wbc_writepages = {
- .bdi = wbc->bdi,
.sync_mode = wbc->sync_mode,
.older_than_this = NULL,
.nr_to_write = 64,
@@ -2628,7 +2627,6 @@ int extent_write_locked_range(struct ext
.sync_io = mode == WB_SYNC_ALL,
};
struct writeback_control wbc_writepages = {
- .bdi = inode->i_mapping->backing_dev_info,
.sync_mode = mode,
.older_than_this = NULL,
.nr_to_write = nr_pages * 2,
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2]: writeback: remove writeback_inodes_wbc
2010-06-10 10:07 [PATCH 1/2]: writeback: remove writeback_inodes_wbc Christoph Hellwig
@ 2010-06-10 12:59 ` Jens Axboe
2010-06-10 13:07 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2010-06-10 12:59 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel
On 2010-06-10 12:07, Christoph Hellwig wrote:
> This was just an odd wrapper around writeback_inodes_wb. Removing this
> also allows to get rid of the bdi member of struct writeback_control
> which was rather out of place there.
Both this and the next look fine to me, but probably more appropriate
for 2.6.36.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2]: writeback: remove writeback_inodes_wbc
2010-06-10 12:59 ` Jens Axboe
@ 2010-06-10 13:07 ` Christoph Hellwig
2010-06-10 13:49 ` Jens Axboe
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2010-06-10 13:07 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-fsdevel
On Thu, Jun 10, 2010 at 02:59:29PM +0200, Jens Axboe wrote:
> On 2010-06-10 12:07, Christoph Hellwig wrote:
> > This was just an odd wrapper around writeback_inodes_wb. Removing this
> > also allows to get rid of the bdi member of struct writeback_control
> > which was rather out of place there.
>
> Both this and the next look fine to me, but probably more appropriate
> for 2.6.36.
Yes, absolutely.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2]: writeback: remove writeback_inodes_wbc
2010-06-10 13:07 ` Christoph Hellwig
@ 2010-06-10 13:49 ` Jens Axboe
0 siblings, 0 replies; 4+ messages in thread
From: Jens Axboe @ 2010-06-10 13:49 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: linux-fsdevel
On 2010-06-10 15:07, Christoph Hellwig wrote:
> On Thu, Jun 10, 2010 at 02:59:29PM +0200, Jens Axboe wrote:
>> On 2010-06-10 12:07, Christoph Hellwig wrote:
>>> This was just an odd wrapper around writeback_inodes_wb. Removing this
>>> also allows to get rid of the bdi member of struct writeback_control
>>> which was rather out of place there.
>>
>> Both this and the next look fine to me, but probably more appropriate
>> for 2.6.36.
>
> Yes, absolutely.
Great, so we're on the same page. I'll queue them up for .36.
--
Jens Axboe
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-06-10 13:49 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10 10:07 [PATCH 1/2]: writeback: remove writeback_inodes_wbc Christoph Hellwig
2010-06-10 12:59 ` Jens Axboe
2010-06-10 13:07 ` Christoph Hellwig
2010-06-10 13:49 ` Jens Axboe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).