Displaying 2 results from an estimated 2 matches for "btrfs_cross_ref_exist".
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...BTRFS_SETGET_STACK_FUNCS(super_bytenr, struct btrfs_super_block, bytenr, 64);
@@ -1504,9 +1507,8 @@ int btrfs_update_pinned_extents(struct b
u64 bytenr, u64 num, int pin);
int btrfs_drop_leaf_ref(struct btrfs_trans_handle *trans,
struct btrfs_root *root, struct extent_buffer *leaf);
-int btrfs_cross_ref_exists(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
- struct btrfs_key *key, u64 bytenr);
+int btrfs_cross_ref_exist(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root, u64 bytenr);
int btrfs_extent_post_op(struct btrfs_trans_handle *trans,
struct btrfs_root *...
2012 Oct 01
1
[RFC] [PATCH] Btrfs: rework can_nocow_odirect
...start - em->orig_start;
+ disk_bytenr = em->block_start - backref_offset;
+ extent_end = em->start + em->len;
if (btrfs_extent_readonly(root, disk_bytenr))
- goto out;
+ return 0;
/*
* look for other files referencing this extent, if we
* find any we must cow
*/
if (btrfs_cross_ref_exist(trans, root, btrfs_ino(inode),
- key.offset - backref_offset, disk_bytenr))
- goto out;
+ em->orig_start, disk_bytenr))
+ return 0;
+
+ /* No prealloc, we won''t have csums */
+ if (test_bit(EXTENT_FLAG_PREALLOC, &em->flags))
+ return 1;
/*
* adjust disk_bytenr...