extent_map.c (7ae9fb1b7ecbb5d85d07857943f677fd1a559b18) extent_map.c (e4cc1483f35940c9288c332dd275f6fad485f8d2)
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/err.h>
4#include <linux/slab.h>
5#include <linux/spinlock.h>
6#include "messages.h"
7#include "ctree.h"
8#include "volumes.h"

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

758
759 if (skip_pinned && test_bit(EXTENT_FLAG_PINNED, &em->flags)) {
760 start = em_end;
761 if (end != (u64)-1)
762 len = start + len - em_end;
763 goto next;
764 }
765
1// SPDX-License-Identifier: GPL-2.0
2
3#include <linux/err.h>
4#include <linux/slab.h>
5#include <linux/spinlock.h>
6#include "messages.h"
7#include "ctree.h"
8#include "volumes.h"

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

758
759 if (skip_pinned && test_bit(EXTENT_FLAG_PINNED, &em->flags)) {
760 start = em_end;
761 if (end != (u64)-1)
762 len = start + len - em_end;
763 goto next;
764 }
765
766 flags = em->flags;
766 clear_bit(EXTENT_FLAG_PINNED, &em->flags);
767 clear_bit(EXTENT_FLAG_PINNED, &em->flags);
768 /*
769 * In case we split the extent map, we want to preserve the
770 * EXTENT_FLAG_LOGGING flag on our extent map, but we don't want
771 * it on the new extent maps.
772 */
767 clear_bit(EXTENT_FLAG_LOGGING, &flags);
768 modified = !list_empty(&em->list);
769
770 /*
771 * The extent map does not cross our target range, so no need to
772 * split it, we can remove it directly.
773 */
774 if (em->start >= start && em_end <= end)
775 goto remove_em;
776
773 clear_bit(EXTENT_FLAG_LOGGING, &flags);
774 modified = !list_empty(&em->list);
775
776 /*
777 * The extent map does not cross our target range, so no need to
778 * split it, we can remove it directly.
779 */
780 if (em->start >= start && em_end <= end)
781 goto remove_em;
782
777 flags = em->flags;
778 gen = em->generation;
779 compressed = test_bit(EXTENT_FLAG_COMPRESSED, &em->flags);
780
781 if (em->start < start) {
782 if (!split) {
783 split = split2;
784 split2 = NULL;
785 if (!split)

--- 171 unchanged lines hidden ---
783 gen = em->generation;
784 compressed = test_bit(EXTENT_FLAG_COMPRESSED, &em->flags);
785
786 if (em->start < start) {
787 if (!split) {
788 split = split2;
789 split2 = NULL;
790 if (!split)

--- 171 unchanged lines hidden ---