aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/file-item.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2007-03-27 11:26:26 -0400
committerDavid Woodhouse <dwmw2@hera.kernel.org>2007-03-27 11:26:26 -0400
commit9773a788681db1f5c2701b7433737fdca61a14ba (patch)
tree9d5f79f7a0e3b0f5e89509b42a3d8134364bed32 /fs/btrfs/file-item.c
parentf4b9aa8d3b877d0a6044a6d6d9a44b29cab9e265 (diff)
Btrfs: byte offsets for file keys
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/file-item.c')
-rw-r--r--fs/btrfs/file-item.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/file-item.c b/fs/btrfs/file-item.c
index 09de270c5a5..5230a44cb19 100644
--- a/fs/btrfs/file-item.c
+++ b/fs/btrfs/file-item.c
@@ -26,6 +26,7 @@ int btrfs_alloc_file_extent(struct btrfs_trans_handle *trans,
ret = btrfs_insert_empty_item(trans, root, &path, &file_key,
sizeof(*item));
+ BUG_ON(ret);
item = btrfs_item_ptr(btrfs_buffer_leaf(path.nodes[0]), path.slots[0],
struct btrfs_file_extent_item);
btrfs_set_file_extent_disk_blocknr(item, ins.objectid);
@@ -42,7 +43,7 @@ int btrfs_alloc_file_extent(struct btrfs_trans_handle *trans,
int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
struct btrfs_root *root,
struct btrfs_path *path, u64 objectid,
- u64 blocknr, u64 num_blocks, int mod)
+ u64 offset, int mod)
{
int ret;
struct btrfs_key file_key;
@@ -50,7 +51,7 @@ int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans,
int cow = mod != 0;
file_key.objectid = objectid;
- file_key.offset = blocknr;
+ file_key.offset = offset;
file_key.flags = 0;
btrfs_set_key_type(&file_key, BTRFS_EXTENT_DATA_KEY);
ret = btrfs_search_slot(trans, root, &file_key, path, ins_len, cow);