volumes.c (efc222f8d79c0431c92ae8c72bc62d2e6bcf0a00) volumes.c (0ff40a910f5649dfacc4fb5daa7e73692196342d)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Oracle. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/sched/mm.h>
8#include <linux/bio.h>

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

1581 path->reada = READA_FORWARD;
1582 path->search_commit_root = 1;
1583 path->skip_locking = 1;
1584
1585 key.objectid = device->devid;
1586 key.offset = search_start;
1587 key.type = BTRFS_DEV_EXTENT_KEY;
1588
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007 Oracle. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/sched/mm.h>
8#include <linux/bio.h>

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

1581 path->reada = READA_FORWARD;
1582 path->search_commit_root = 1;
1583 path->skip_locking = 1;
1584
1585 key.objectid = device->devid;
1586 key.offset = search_start;
1587 key.type = BTRFS_DEV_EXTENT_KEY;
1588
1589 ret = btrfs_search_slot(NULL, root, &key, path, 0, 0);
1589 ret = btrfs_search_backwards(root, &key, path);
1590 if (ret < 0)
1591 goto out;
1590 if (ret < 0)
1591 goto out;
1592 if (ret > 0) {
1593 ret = btrfs_previous_item(root, path, key.objectid, key.type);
1594 if (ret < 0)
1595 goto out;
1596 }
1597
1598 while (1) {
1599 l = path->nodes[0];
1600 slot = path->slots[0];
1601 if (slot >= btrfs_header_nritems(l)) {
1602 ret = btrfs_next_leaf(root, path);
1603 if (ret == 0)
1604 continue;

--- 6607 unchanged lines hidden ---
1592
1593 while (1) {
1594 l = path->nodes[0];
1595 slot = path->slots[0];
1596 if (slot >= btrfs_header_nritems(l)) {
1597 ret = btrfs_next_leaf(root, path);
1598 if (ret == 0)
1599 continue;

--- 6607 unchanged lines hidden ---