Re: [PATCH 3/6] writeback: make nr_to_write a per-file limit

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 04, 2011 at 05:17:10PM +0800, Wu Fengguang wrote:
> This ensures large dirty files can be written in the full 4MB writeback
> chunk size, rather than whatever remained quota in wbc->nr_to_write.

I like the high-level idea, but the implementation of overriding
nr_to_write and then copying it back seems rather ugly.

The basic problem seems to be that struct writeback_control is
designed to control writeback of a single file, but we keep abuse it
for writing multiple files in writeback_sb_inodes and its callers.

It seems like we should only build the struct writeback_control from
struct wb_writeback_work down in writeback_sb_inodes, even if that
means passing some more information to it either in struct
wb_writeback_work or on the stack.

Then writeback_sb_inodes can do something like

	if (wbc.sync_mode == WB_SYNC_NONE)
		wbc.nr_to_write = min(MAX_WRITEBACK_PAGES, work->nr_pages);
	else
		wbc.nr_to_write = LONG_MAX;

for each inode it writes.

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux