summaryrefslogtreecommitdiff
path: root/fs/ceph
diff options
context:
space:
mode:
authorLiu Bo <bo.li.liu@oracle.com>2013-02-04 13:12:18 +0000
committerJosef Bacik <jbacik@fusionio.com>2013-02-20 12:59:37 -0500
commit2f697dc6a648d3a16f512fe7a53281d55cce1570 (patch)
tree832da66ca86e982a5ae2cbd9a757cf6455059515 /fs/ceph
parentde78b51a2852bddccd6535e9e12de65f92787a1e (diff)
downloadlinux-2f697dc6a648d3a16f512fe7a53281d55cce1570.tar.gz
Btrfs: extend the checksum item as much as possible
For write, we also reserve some space for COW blocks during updating the checksum tree, and we calculate the number of blocks by checking if the number of bytes outstanding that are going to need csums needs one more block for csum. When we add these checksum into the checksum tree, we use ordered sums list. Every ordered sum contains csums for each sector, and we'll first try to look up an existing csum item, a) if we don't yet have a proper csum item, then we need to insert one, b) or if we find one but the csum item is not big enough, then we need to extend it. The point is we'll unlock the whole path and then insert or extend. So others can hack in and update the tree. Each insert or extend needs update the tree with COW on, and we may need to insert/extend for many times. That means what we've reserved for updating checksum tree is NOT enough indeed. The case is even more serious with having several write threads at the same time, it can end up eating our reserved space quickly and starting eating globle reserve pool instead. I don't yet come up with a way to calculate the worse case for updating csum, but extending the checksum item as much as possible can be helpful in my test. The idea behind is that it can reduce the times we insert/extend so that it saves us precious reserved space. Signed-off-by: Liu Bo <bo.li.liu@oracle.com> Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Diffstat (limited to 'fs/ceph')
0 files changed, 0 insertions, 0 deletions