]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: don't mix the ordered extents of all files together during logging the inodes
authorMiao Xie <miaox@cn.fujitsu.com>
Tue, 14 Jan 2014 12:31:51 +0000 (20:31 +0800)
committerJosef Bacik <jbacik@fb.com>
Mon, 10 Mar 2014 19:15:36 +0000 (15:15 -0400)
commit2a51b4b17b9e9d11dfac6f8c4507b32a17144de6
treee7e63c42f7d41ca03ea95b75620248055595165e
parentc0930e3a3192c425dab6e6a925467176512752d0
Btrfs: don't mix the ordered extents of all files together during logging the inodes

There was a problem in the old code:
If we failed to log the csum, we would free all the ordered extents in the log list
including those ordered extents that were logged successfully, it would make the
log committer not to wait for the completion of the ordered extents.

This patch doesn't insert the ordered extents that is about to be logged into
a global list, instead, we insert them into a local list. If we log the ordered
extents successfully, we splice them with the global list, or we will throw them
away, then do full sync. It can also reduce the lock contention and the traverse
time of list.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fb.com>
fs/btrfs/ordered-data.c
fs/btrfs/ordered-data.h
fs/btrfs/tree-log.c