return 0;
}
-int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
- struct btrfs_ordered_sum *sums)
+int btrfs_insert_data_csums(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root,
+ struct btrfs_ordered_sum *sums)
{
struct btrfs_fs_info *fs_info = root->fs_info;
struct btrfs_key file_key;
struct btrfs_root *root,
struct btrfs_path *path, u64 objectid,
u64 bytenr, int mod);
-int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans,
- struct btrfs_root *root,
- struct btrfs_ordered_sum *sums);
+int btrfs_insert_data_csums(struct btrfs_trans_handle *trans,
+ struct btrfs_root *root,
+ struct btrfs_ordered_sum *sums);
int btrfs_csum_one_bio(struct btrfs_bio *bbio, bool async);
int btrfs_alloc_dummy_sum(struct btrfs_bio *bbio);
int btrfs_lookup_csums_range(struct btrfs_root *root, u64 start, u64 end,
}
}
trans->adding_csums = true;
- ret = btrfs_csum_file_blocks(trans, csum_root, sum);
+ ret = btrfs_insert_data_csums(trans, csum_root, sum);
trans->adding_csums = false;
if (ret)
return ret;
btrfs_root_id(root));
}
if (!ret) {
- ret = btrfs_csum_file_blocks(trans, csum_root, sums);
+ ret = btrfs_insert_data_csums(trans, csum_root, sums);
if (ret)
btrfs_abort_log_replay(wc, ret,
"failed to add csums for range [%llu, %llu) inode %llu root %llu",
* worry about logging checksum items with overlapping ranges.
*/
if (inode->last_reflink_trans < trans->transid)
- return btrfs_csum_file_blocks(trans, log_root, sums);
+ return btrfs_insert_data_csums(trans, log_root, sums);
/*
* Serialize logging for checksums. This is to avoid racing with the
*/
ret = btrfs_del_csums(trans, log_root, sums->logical, sums->len);
if (!ret)
- ret = btrfs_csum_file_blocks(trans, log_root, sums);
+ ret = btrfs_insert_data_csums(trans, log_root, sums);
btrfs_unlock_extent(&log_root->log_csum_range, sums->logical, lock_end,
&cached_state);