]> git.baikalelectronics.ru Git - kernel.git/commit
Btrfs: take into account total references when doing backref lookup
authorJosef Bacik <jbacik@fb.com>
Wed, 19 Mar 2014 17:35:14 +0000 (13:35 -0400)
committerChris Mason <clm@fb.com>
Fri, 21 Mar 2014 22:28:09 +0000 (15:28 -0700)
commit38b3489ca59624dd3d18187333a6bd8e2d8234d9
tree6f0569ba8c5f10bc047f9e7326f18eae56edfe78
parent371de12c95c08cf5a7f71bb22d918ca667a925e2
Btrfs: take into account total references when doing backref lookup

I added an optimization for large files where we would stop searching for
backrefs once we had looked at the number of references we currently had for
this extent.  This works great most of the time, but for snapshots that point to
this extent and has changes in the original root this assumption falls on it
face.  So keep track of any delayed ref mods made and add in the actual ref
count as reported by the extent item and use that to limit how far down an inode
we'll search for extents.  Thanks,

Reportedy-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: Josef Bacik <jbacik@fb.com>
Reported-by: Hugo Mills <hugo@carfax.org.uk>
Tested-by: Hugo Mills <hugo@carfax.org.uk>
Signed-off-by: Chris Mason <clm@fb.com>
fs/btrfs/backref.c