printk("got %d on inserting %Lu %u %Lu start %Lu end %Lu found %Lu %Lu keep was %d\n",ret,ins.objectid,ins.flags,ins.offset,start,end,key.offset,extent_end,keep);
btrfs_print_leaf(root,leaf);
printk("got %d on inserting %Lu %u %Lu start %Lu end %Lu found %Lu %Lu keep was %d\n",ret,ins.objectid,ins.type,ins.offset,start,end,key.offset,extent_end,keep);
}
BUG_ON(ret);
extent=btrfs_item_ptr(
btrfs_buffer_leaf(path->nodes[0]),
path->slots[0],
structbtrfs_file_extent_item);
btrfs_set_file_extent_disk_blocknr(extent,
btrfs_file_extent_disk_blocknr(&old));
btrfs_set_file_extent_disk_num_blocks(extent,
btrfs_file_extent_disk_num_blocks(&old));
btrfs_set_file_extent_offset(extent,
btrfs_file_extent_offset(&old)+
extent=btrfs_item_ptr(leaf,path->slots[0],
structbtrfs_file_extent_item);
write_extent_buffer(leaf,&old,
(unsignedlong)extent,sizeof(old));
btrfs_set_file_extent_offset(leaf,extent,
le64_to_cpu(old.offset)+
((end-key.offset)>>inode->i_blkbits));
WARN_ON(btrfs_file_extent_num_blocks(&old)<
WARN_ON(le64_to_cpu(old.num_blocks)<
(extent_end-end)>>inode->i_blkbits);
btrfs_set_file_extent_num_blocks(extent,
btrfs_set_file_extent_num_blocks(leaf,extent,
(extent_end-end)>>inode->i_blkbits);
btrfs_set_file_extent_type(extent,
btrfs_set_file_extent_type(leaf,extent,
BTRFS_FILE_EXTENT_REG);
btrfs_set_file_extent_generation(extent,
btrfs_file_extent_generation(&old));
btrfs_mark_buffer_dirty(path->nodes[0]);
if(btrfs_file_extent_disk_blocknr(&old)!=0){
if(le64_to_cpu(old.disk_blocknr)!=0){
inode->i_blocks+=
btrfs_file_extent_num_blocks(extent)<<3;
btrfs_file_extent_num_blocks(leaf,
extent)<<3;
}
ret=0;
gotoout;
...
...
@@ -529,8 +534,8 @@ static int prepare_pages(struct btrfs_root *root,