if (test_bit(BTRFS_ORDERED_NOCOW, &ordered_extent->flags)) {
/* Logic error */
- ASSERT(list_empty(&ordered_extent->list));
- if (unlikely(!list_empty(&ordered_extent->list))) {
+ ASSERT(list_empty(&ordered_extent->csum_list));
+ if (unlikely(!list_empty(&ordered_extent->csum_list))) {
ret = -EINVAL;
btrfs_abort_transaction(trans, ret);
goto out;
goto out;
}
- ret = add_pending_csums(trans, &ordered_extent->list);
+ ret = add_pending_csums(trans, &ordered_extent->csum_list);
if (unlikely(ret)) {
btrfs_abort_transaction(trans, ret);
goto out;
entry->flags = flags;
refcount_set(&entry->refs, 1);
init_waitqueue_head(&entry->wait);
- INIT_LIST_HEAD(&entry->list);
+ INIT_LIST_HEAD(&entry->csum_list);
INIT_LIST_HEAD(&entry->log_list);
INIT_LIST_HEAD(&entry->root_extent_list);
INIT_LIST_HEAD(&entry->work_list);
struct btrfs_inode *inode = entry->inode;
spin_lock(&inode->ordered_tree_lock);
- list_add_tail(&sum->list, &entry->list);
+ list_add_tail(&sum->list, &entry->csum_list);
spin_unlock(&inode->ordered_tree_lock);
}
ASSERT(list_empty(&entry->log_list));
ASSERT(RB_EMPTY_NODE(&entry->rb_node));
btrfs_add_delayed_iput(entry->inode);
- list_for_each_entry_safe(sum, tmp, &entry->list, list)
+ list_for_each_entry_safe(sum, tmp, &entry->csum_list, list)
kvfree(sum);
kmem_cache_free(btrfs_ordered_extent_cache, entry);
}
}
}
- list_for_each_entry_safe(sum, tmpsum, &ordered->list, list) {
+ list_for_each_entry_safe(sum, tmpsum, &ordered->csum_list, list) {
if (offset == len)
break;
- list_move_tail(&sum->list, &new->list);
+ list_move_tail(&sum->list, &new->csum_list);
offset += sum->len;
}
struct btrfs_inode *inode;
/* list of checksums for insertion when the extent io is done */
- struct list_head list;
+ struct list_head csum_list;
/* used for fast fsyncs */
struct list_head log_list;
if (test_and_set_bit(BTRFS_ORDERED_LOGGED_CSUM, &ordered->flags))
continue;
- list_for_each_entry(sums, &ordered->list, list) {
+ list_for_each_entry(sums, &ordered->csum_list, list) {
ret = log_csums(trans, inode, log_root, sums);
if (ret)
return ret;
if (test_bit(BTRFS_ORDERED_PREALLOC, &ordered->flags))
return;
- ASSERT(!list_empty(&ordered->list));
- /* The ordered->list can be empty in the above pre-alloc case. */
- sum = list_first_entry(&ordered->list, struct btrfs_ordered_sum, list);
+ ASSERT(!list_empty(&ordered->csum_list));
+ sum = list_first_entry(&ordered->csum_list, struct btrfs_ordered_sum, list);
logical = sum->logical;
len = sum->len;
*/
if ((inode->flags & BTRFS_INODE_NODATASUM) ||
test_bit(BTRFS_FS_STATE_NO_DATA_CSUMS, &fs_info->fs_state)) {
- while ((sum = list_first_entry_or_null(&ordered->list,
+ while ((sum = list_first_entry_or_null(&ordered->csum_list,
typeof(*sum), list))) {
list_del(&sum->list);
kfree(sum);