diff options
author | Liu Bo <bo.liu@linux.alibaba.com> | 2018-08-23 03:51:53 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-10-15 17:23:33 +0200 |
commit | ecf160b424ee648a14116079ff72d7d1241e377d (patch) | |
tree | 61a3502ed04992731866a450d4a03948b9aff80f /fs/btrfs/ctree.h | |
parent | 07e1ce096db3605f3e0c98695df66a51e2be9f05 (diff) | |
download | blackbird-op-linux-ecf160b424ee648a14116079ff72d7d1241e377d.tar.gz blackbird-op-linux-ecf160b424ee648a14116079ff72d7d1241e377d.zip |
Btrfs: preftree: use rb_first_cached
rb_first_cached() trades an extra pointer "leftmost" for doing the same
job as rb_first() but in O(1).
While resolving indirect refs and missing refs, it always looks for the
first rb entry in a while loop, it's helpful to use rb_first_cached
instead.
For more details about the optimization see patch "Btrfs: delayed-refs:
use rb_first_cached for href_root".
Tested-by: Holger Hoffstätte <holger@applied-asynchrony.com>
Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/ctree.h')
0 files changed, 0 insertions, 0 deletions