Lines Matching refs:num_refs
128 u64 num_refs; in btrfs_lookup_extent_info() local
181 num_refs = btrfs_extent_refs(leaf, ei); in btrfs_lookup_extent_info()
194 BUG_ON(num_refs == 0); in btrfs_lookup_extent_info()
196 num_refs = 0; in btrfs_lookup_extent_info()
227 BUG_ON(num_refs == 0); in btrfs_lookup_extent_info()
229 num_refs += head->ref_mod; in btrfs_lookup_extent_info()
235 WARN_ON(num_refs == 0); in btrfs_lookup_extent_info()
237 *refs = num_refs; in btrfs_lookup_extent_info()
529 u32 num_refs; in insert_extent_data_ref() local
556 num_refs = btrfs_shared_data_ref_count(leaf, ref); in insert_extent_data_ref()
557 num_refs += refs_to_add; in insert_extent_data_ref()
558 btrfs_set_shared_data_ref_count(leaf, ref, num_refs); in insert_extent_data_ref()
586 num_refs = btrfs_extent_data_ref_count(leaf, ref); in insert_extent_data_ref()
587 num_refs += refs_to_add; in insert_extent_data_ref()
588 btrfs_set_extent_data_ref_count(leaf, ref, num_refs); in insert_extent_data_ref()
607 u32 num_refs = 0; in remove_extent_data_ref() local
616 num_refs = btrfs_extent_data_ref_count(leaf, ref1); in remove_extent_data_ref()
620 num_refs = btrfs_shared_data_ref_count(leaf, ref2); in remove_extent_data_ref()
629 BUG_ON(num_refs < refs_to_drop); in remove_extent_data_ref()
630 num_refs -= refs_to_drop; in remove_extent_data_ref()
632 if (num_refs == 0) { in remove_extent_data_ref()
636 btrfs_set_extent_data_ref_count(leaf, ref1, num_refs); in remove_extent_data_ref()
638 btrfs_set_shared_data_ref_count(leaf, ref2, num_refs); in remove_extent_data_ref()
651 u32 num_refs = 0; in extent_data_ref_count() local
667 num_refs = btrfs_extent_data_ref_count(leaf, ref1); in extent_data_ref_count()
670 num_refs = btrfs_shared_data_ref_count(leaf, ref2); in extent_data_ref_count()
675 num_refs = btrfs_extent_data_ref_count(leaf, ref1); in extent_data_ref_count()
679 num_refs = btrfs_shared_data_ref_count(leaf, ref2); in extent_data_ref_count()
683 return num_refs; in extent_data_ref_count()