diff options
author | Eric Sandeen <sandeen@redhat.com> | 2009-12-23 07:57:07 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-04-26 07:41:36 -0700 |
commit | b78a38dca6e04634ddc718e315712b45abcf92fd (patch) | |
tree | f687e82bf0c9acbc4bee632271d41a11a30fd418 /include | |
parent | afd9fc6961f208b539d6accd49927639d964be23 (diff) | |
download | lwn-b78a38dca6e04634ddc718e315712b45abcf92fd.tar.gz lwn-b78a38dca6e04634ddc718e315712b45abcf92fd.zip |
fs-writeback: Add helper function to start writeback if idle
commit 17bd55d037a02b04d9119511cfd1a4b985d20f63 upstream.
ext4, at least, would like to start pushing on writeback if it starts
to get close to ENOSPC when reserving worst-case blocks for delalloc
writes. Writing out delalloc data will convert those worst-case
predictions into usually smaller actual usage, freeing up space
before we hit ENOSPC based on this speculation.
Thanks to Jens for the suggestion for the helper function,
& the naming help.
I've made the helper return status on whether writeback was
started even though I don't plan to use it in the ext4 patch;
it seems like it would be potentially useful to test this
in some cases.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Acked-by: Jan Kara <jack@suse.cz>
Cc: maximilian attems <max@stro.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/writeback.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 66ebddcff664..dc52482833a2 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h @@ -69,6 +69,7 @@ struct writeback_control { struct bdi_writeback; 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); long wb_do_writeback(struct bdi_writeback *wb, int force_wait); |