ctree.c (b7b14ec1ebef35d22f3f4087816468f22c987f75) ctree.c (f616f5cd9da7fceb7d884812da380b26040cd083)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007,2008 Oracle. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/slab.h>
8#include <linux/rbtree.h>
9#include <linux/mm.h>
10#include "ctree.h"
11#include "disk-io.h"
12#include "transaction.h"
13#include "print-tree.h"
14#include "locking.h"
15#include "volumes.h"
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2007,2008 Oracle. All rights reserved.
4 */
5
6#include <linux/sched.h>
7#include <linux/slab.h>
8#include <linux/rbtree.h>
9#include <linux/mm.h>
10#include "ctree.h"
11#include "disk-io.h"
12#include "transaction.h"
13#include "print-tree.h"
14#include "locking.h"
15#include "volumes.h"
16#include "qgroup.h"
16
17static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
18 *root, struct btrfs_path *path, int level);
19static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root,
20 const struct btrfs_key *ins_key, struct btrfs_path *path,
21 int data_size, int extend);
22static int push_node_left(struct btrfs_trans_handle *trans,
23 struct btrfs_fs_info *fs_info,

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

1484 }
1485
1486 search_start = buf->start & ~((u64)SZ_1G - 1);
1487
1488 if (parent)
1489 btrfs_set_lock_blocking(parent);
1490 btrfs_set_lock_blocking(buf);
1491
17
18static int split_node(struct btrfs_trans_handle *trans, struct btrfs_root
19 *root, struct btrfs_path *path, int level);
20static int split_leaf(struct btrfs_trans_handle *trans, struct btrfs_root *root,
21 const struct btrfs_key *ins_key, struct btrfs_path *path,
22 int data_size, int extend);
23static int push_node_left(struct btrfs_trans_handle *trans,
24 struct btrfs_fs_info *fs_info,

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

1485 }
1486
1487 search_start = buf->start & ~((u64)SZ_1G - 1);
1488
1489 if (parent)
1490 btrfs_set_lock_blocking(parent);
1491 btrfs_set_lock_blocking(buf);
1492
1493 /*
1494 * Before CoWing this block for later modification, check if it's
1495 * the subtree root and do the delayed subtree trace if needed.
1496 *
1497 * Also We don't care about the error, as it's handled internally.
1498 */
1499 btrfs_qgroup_trace_subtree_after_cow(trans, root, buf);
1492 ret = __btrfs_cow_block(trans, root, buf, parent,
1493 parent_slot, cow_ret, search_start, 0);
1494
1495 trace_btrfs_cow_block(root, buf, *cow_ret);
1496
1497 return ret;
1498}
1499

--- 4437 unchanged lines hidden ---
1500 ret = __btrfs_cow_block(trans, root, buf, parent,
1501 parent_slot, cow_ret, search_start, 0);
1502
1503 trace_btrfs_cow_block(root, buf, *cow_ret);
1504
1505 return ret;
1506}
1507

--- 4437 unchanged lines hidden ---