]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: flush all dirty inodes if writeback can not start
authorMiao Xie <miaox@cn.fujitsu.com>
Thu, 20 Dec 2012 11:19:09 +0000 (11:19 +0000)
committerJosef Bacik <jbacik@fusionio.com>
Wed, 20 Feb 2013 14:36:42 +0000 (09:36 -0500)
commit64ce967d035552033d978d266ee3f0fdb4dfd4a6
tree006423477542cea861ad3189645b46209d09cccd
parent1299cc8dfa4a5645945e33de86863b32dea359b1
Btrfs: flush all dirty inodes if writeback can not start

We may try to flush some dirty pages when there is no enough space to reserve.
But it is possible that this operation fails, in order to get enough space to
reserve successfully, we will sync all the delalloc file. This operation is
safe, we needn't worry about the case that the filesystem goes from r/w to r/o.
because the filesystem should guarantee all the dirty pages have been written
into the disk after it becomes readonly, so the sync operation will do nothing
if the filesystem is already readonly. Though it may waste lots of time,
as a corner case, we needn't care.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
fs/btrfs/extent-tree.c