git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ext4: flush delalloc blocks when space is low
[safe/jmp/linux-2.6]
/
fs
/
ext4
/
inode.c
diff --git
a/fs/ext4/inode.c
b/fs/ext4/inode.c
index
ab80796
..
282621f
100644
(file)
--- a/
fs/ext4/inode.c
+++ b/
fs/ext4/inode.c
@@
-2993,11
+2993,18
@@
static int ext4_nonda_switch(struct super_block *sb)
if (2 * free_blocks < 3 * dirty_blocks ||
free_blocks < (dirty_blocks + EXT4_FREEBLOCKS_WATERMARK)) {
/*
if (2 * free_blocks < 3 * dirty_blocks ||
free_blocks < (dirty_blocks + EXT4_FREEBLOCKS_WATERMARK)) {
/*
- * free block count is less tha
t
150% of dirty blocks
- * or free blocks is less tha
t
watermark
+ * free block count is less tha
n
150% of dirty blocks
+ * or free blocks is less tha
n
watermark
*/
return 1;
}
*/
return 1;
}
+ /*
+ * Even if we don't switch but are nearing capacity,
+ * start pushing delalloc when 1/2 of free blocks are dirty.
+ */
+ if (free_blocks < 2 * dirty_blocks)
+ writeback_inodes_sb_if_idle(sb);
+
return 0;
}
return 0;
}