backref.c (5c2d867fdcbc11a6862379ebd60b2c1a66e13671) backref.c (1149ab6bd48cf3b00c59e4f8ff79fbb1cf15b94b)
1/*
2 * Copyright (C) 2011 STRATO. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 568 unchanged lines hidden (view full) ---

577 ret = __add_prelim_ref(prefs, ref->root, &key, 0,
578 ref->parent, node->bytenr,
579 node->ref_mod * sgn);
580 break;
581 }
582 default:
583 WARN_ON(1);
584 }
1/*
2 * Copyright (C) 2011 STRATO. All rights reserved.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public
6 * License v2 as published by the Free Software Foundation.
7 *
8 * This program is distributed in the hope that it will be useful,

--- 568 unchanged lines hidden (view full) ---

577 ret = __add_prelim_ref(prefs, ref->root, &key, 0,
578 ref->parent, node->bytenr,
579 node->ref_mod * sgn);
580 break;
581 }
582 default:
583 WARN_ON(1);
584 }
585 BUG_ON(ret);
585 if (ret)
586 return ret;
586 }
587
588 return 0;
589}
590
591/*
592 * add all inline backrefs for bytenr to the list
593 */

--- 81 unchanged lines hidden (view full) ---

675 root = btrfs_extent_data_ref_root(leaf, dref);
676 ret = __add_prelim_ref(prefs, root, &key, 0, 0,
677 bytenr, count);
678 break;
679 }
680 default:
681 WARN_ON(1);
682 }
587 }
588
589 return 0;
590}
591
592/*
593 * add all inline backrefs for bytenr to the list
594 */

--- 81 unchanged lines hidden (view full) ---

676 root = btrfs_extent_data_ref_root(leaf, dref);
677 ret = __add_prelim_ref(prefs, root, &key, 0, 0,
678 bytenr, count);
679 break;
680 }
681 default:
682 WARN_ON(1);
683 }
683 BUG_ON(ret);
684 if (ret)
685 return ret;
684 ptr += btrfs_extent_inline_ref_size(type);
685 }
686
687 return 0;
688}
689
690/*
691 * add all non-inline backrefs for bytenr to the list

--- 65 unchanged lines hidden (view full) ---

757 root = btrfs_extent_data_ref_root(leaf, dref);
758 ret = __add_prelim_ref(prefs, root, &key, 0, 0,
759 bytenr, count);
760 break;
761 }
762 default:
763 WARN_ON(1);
764 }
686 ptr += btrfs_extent_inline_ref_size(type);
687 }
688
689 return 0;
690}
691
692/*
693 * add all non-inline backrefs for bytenr to the list

--- 65 unchanged lines hidden (view full) ---

759 root = btrfs_extent_data_ref_root(leaf, dref);
760 ret = __add_prelim_ref(prefs, root, &key, 0, 0,
761 bytenr, count);
762 break;
763 }
764 default:
765 WARN_ON(1);
766 }
765 BUG_ON(ret);
767 if (ret)
768 return ret;
769
766 }
767
768 return ret;
769}
770
771/*
772 * this adds all existing backrefs (inline backrefs, backrefs and delayed
773 * refs) for the given bytenr to the refs list, merges duplicates and resolves

--- 1040 unchanged lines hidden ---
770 }
771
772 return ret;
773}
774
775/*
776 * this adds all existing backrefs (inline backrefs, backrefs and delayed
777 * refs) for the given bytenr to the refs list, merges duplicates and resolves

--- 1040 unchanged lines hidden ---