search for: btrfs_lookup_file_extent

Displaying 11 results from an estimated 11 matches for "btrfs_lookup_file_extent".

2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...ruct btrfs_trans_handle *trans, struct btrfs_root *root, - u64 objectid, u64 pos, + struct inode *inode, u64 pos, u64 disk_offset, u64 disk_num_bytes, u64 num_bytes, u64 offset, u64 ram_bytes, u8 compression, u8 encryption, u16 other_encoding); int btrfs_lookup_file_extent(struct btrfs_trans_handle *trans, struct btrfs_root *root, - struct btrfs_path *path, u64 objectid, + struct btrfs_path *path, struct inode *inode, u64 bytenr, int mod); int btrfs_csum_file_blocks(struct btrfs_trans_handle *trans, struct btrfs_root *root, dif...
2012 May 22
1
warnings met in introduce extent buffer cache for each i-node patch
...0[<ffffffff812be27d>] ? unlock_up+0x15d/0x190 May 22 09:23:57 bigbox kernel: [56455.5ffff812c31c1>] btrfs_search_slot+0x241/0x720 May 22 09:23:57 bigbox kernel: [56455.5326fff812c3adc>] btrfs_search_slot_for_inode+0x43c/0x910 May 22 09:23:57 bigbox kernel: [56455.532fffffff812d5f04>] btrfs_lookup_file_extent+0x54/0x70 May 22 09:23:57 bigbox kernel: [56455.532646ffff812f097c>] btrfs_drop_extents+0xec/0x940 May 22 09:23:57 bigbox kernel: [56455.532662] fff81084eec>] ? try_to_wake_up+0x1bc/0x2b0 May 22 09:23:57 bigbox kernel: [56455.53268 [<ffffffff812facef>] ? set_state_bits+0x3f/0x80 May 22...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...64 disk_bytenr; + int extent_type; + int ret; + int type; + int nocow; + int check_prev = 1; - total_fs_bytes = btrfs_super_total_bytes(&root->fs_info->super_copy); path = btrfs_alloc_path(); BUG_ON(!path); trans = btrfs_join_transaction(root, 1); BUG_ON(!trans); -again: - ret = btrfs_lookup_file_extent(NULL, root, path, - inode->i_ino, start, 0); - if (ret < 0) { - err = ret; - goto out; - } - - if (ret != 0) { - if (path->slots[0] == 0) - goto not_found; - path->slots[0]--; - } - - leaf = path->nodes[0]; - item = btrfs_item_ptr(leaf, path->slots[0], - st...
2013 Jun 04
3
[PATCH] Btrfs: fix broken nocow after balance
...leaf, iref) != BTRFS_EXTENT_DATA_REF_KEY) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 23c596c..0dc5c7d 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1253,7 +1253,7 @@ static noinline int run_delalloc_nocow(struct inode *inode, cur_offset = start; while (1) { ret = btrfs_lookup_file_extent(trans, root, path, ino, - cur_offset, 0); + cur_offset, 1); if (ret < 0) { btrfs_abort_transaction(trans, root, ret); goto error; -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@...
2012 Oct 01
1
[RFC] [PATCH] Btrfs: rework can_nocow_odirect
...*leaf; struct btrfs_root *root = BTRFS_I(inode)->root; - struct btrfs_file_extent_item *fi; - struct btrfs_key key; u64 disk_bytenr; u64 backref_offset; u64 extent_end; u64 num_bytes; - int slot; - int found_type; - - path = btrfs_alloc_path(); - if (!path) - return -ENOMEM; - - ret = btrfs_lookup_file_extent(trans, root, path, btrfs_ino(inode), - offset, 0); - if (ret < 0) - goto out; - slot = path->slots[0]; - if (ret == 1) { - if (slot == 0) { - /* can''t find the item, must cow */ - ret = 0; - goto out; - } - slot--; - } - ret = 0; - leaf = path->nodes[0]; - bt...
2011 May 31
2
WARNING: at fs/btrfs/extent-tree.c:5695 btrfs_alloc_free_block+0x22c/0x370 [btrfs]()
...localhost kernel: [17117.213753] [<ffffffffa01a30d9>] ? btrfs_cow_block+0x119/0x2b0 [btrfs] May 30 23:25:17 localhost kernel: [17117.213778] [<ffffffffa01a8b5c>] ? btrfs_search_slot+0x1dc/0x9b0 [btrfs] May 30 23:25:17 localhost kernel: [17117.213807] [<ffffffffa01bb493>] ? btrfs_lookup_file_extent+0x33/0x40 [btrfs] May 30 23:25:17 localhost kernel: [17117.213837] [<ffffffffa01d32b0>] ? btrfs_drop_extents+0xc0/0x960 [btrfs] May 30 23:25:17 localhost kernel: [17117.213847] [<ffffffff810096a5>] ? __switch_to+0xc5/0x300 May 30 23:25:17 localhost kernel: [17117.213854] [<f...
2011 Jan 06
3
Offline Deduplication for Btrfs V2
Just a quick update, I''ve dropped the hashing stuff in favor of doing a memcmp in the kernel to make sure the data is still the same. The thing that takes a while is reading the data up from disk, so doing a memcmp of the entire buffer isn''t that big of a deal, not to mention there''s a possiblity for malicious users if there is a problem with the hashing algorithms we
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...= 0; + int del_slot = 0; + int extent_type; int recow; int ret; - inline_limit = 0; if (drop_cache) btrfs_drop_extent_cache(inode, start, end - 1, 0); path = btrfs_alloc_path(); if (!path) return -ENOMEM; + while (1) { recow = 0; - btrfs_release_path(root, path); ret = btrfs_lookup_file_extent(trans, root, path, inode->i_ino, search_start, -1); if (ret < 0) - goto out; - if (ret > 0) { - if (path->slots[0] == 0) { - ret = 0; - goto out; - } - path->slots[0]--; + break; + if (ret > 0 && path->slots[0] > 0 && search_...
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...out_unlock; } btrfs_set_trans_block_group(trans, inode); @@ -323,6 +323,10 @@ noinline int btrfs_drop_extents(struct btrfs_trans_handle *trans, while (1) { recow = 0; btrfs_release_path(root, path); + ret = btrfs_extend_transaction(trans, root, 1); + if (ret) + goto out; + ret = btrfs_lookup_file_extent(trans, root, path, inode->i_ino, search_start, -1); if (ret < 0) @@ -1080,6 +1084,10 @@ out_nolock: if ((file->f_flags & O_SYNC) || IS_SYNC(inode)) { trans = btrfs_start_transaction(root, 1); + if (IS_ERR(trans)) { + err = PTR_ERR(trans); + goto fail; +...
2010 May 07
6
[PATCH 1/5] fs: allow short direct-io reads to be completed via buffered IO V2
V1->V2: Check to see if our current ppos is >= i_size after a short DIO read, just in case it was actually a short read and we need to just return. This is similar to what already happens in the write case. If we have a short read while doing O_DIRECT, instead of just returning, fallthrough and try to read the rest via buffered IO. BTRFS needs this because if we encounter a compressed or
2011 Jan 05
52
Offline Deduplication for Btrfs
Here are patches to do offline deduplication for Btrfs. It works well for the cases it''s expected to, I''m looking for feedback on the ioctl interface and such, I''m well aware there are missing features for the userspace app (like being able to set a different blocksize). If this interface is acceptable I will flesh out the userspace app a little more, but I believe the