search for: orig_start

Displaying 6 results from an estimated 6 matches for "orig_start".

2013 Oct 16
0
[PATCH] Btrfs: add tests for btrfs_get_extent V2
...REG, 0, slot); +} + +static unsigned long prealloc_only = 0; +static unsigned long compressed_only = 0; +static unsigned long vacancy_only = 0; + +static noinline int test_btrfs_get_extent(void) +{ + struct inode *inode = NULL; + struct btrfs_root *root = NULL; + struct extent_map *em = NULL; + u64 orig_start; + u64 disk_bytenr; + u64 offset; + int ret = -ENOMEM; + + set_bit(EXTENT_FLAG_COMPRESSED, &compressed_only); + set_bit(EXTENT_FLAG_VACANCY, &vacancy_only); + set_bit(EXTENT_FLAG_PREALLOC, &prealloc_only); + + inode = btrfs_new_test_inode(); + if (!inode) { + test_msg("Couldn'...
2011 Feb 12
3
[PATCH] fix uncheck memory allocations
...rce_compress) compress_type = BTRFS_I(inode)->force_compress; @@ -644,6 +646,7 @@ retry: async_extent->ram_size - 1, 0); em = alloc_extent_map(GFP_NOFS); + BUG_ON(!em || IS_ERR(em)); em->start = async_extent->start; em->len = async_extent->ram_size; em->orig_start = em->start; @@ -820,6 +823,7 @@ static noinline int cow_file_range(struct inode *inode, BUG_ON(ret); em = alloc_extent_map(GFP_NOFS); + BUG_ON(!em || IS_ERR(em)); em->start = start; em->orig_start = em->start; ram_size = ins.offset; @@ -1169,6 +1173,7 @@ out_check:...
2012 Oct 01
1
[RFC] [PATCH] Btrfs: rework can_nocow_odirect
...tes(leaf, fi); - if (extent_end < offset + len) { - /* extent doesn''t include our full range, must cow */ - goto out; - } + /* + * The em''s disk_bytenr is already adjusted for its offset so we need to + * adjust it accordingly. + */ + backref_offset = em->start - em->orig_start; + disk_bytenr = em->block_start - backref_offset; + extent_end = em->start + em->len; if (btrfs_extent_readonly(root, disk_bytenr)) - goto out; + return 0; /* * look for other files referencing this extent, if we * find any we must cow */ if (btrfs_cross_ref_exist(tra...
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 Aug 15
9
[patch v2 0/9] btrfs: More error handling patches
Hi all - The following 9 patches add more error handling to the btrfs code: - Add btrfs_panic - Catch locking failures in {set,clear}_extent_bit - Push up set_extent_bit errors to callers - Push up lock_extent errors to callers - Push up clear_extent_bit errors to callers - Push up unlock_extent errors to callers - Make pin_down_extent return void - Push up btrfs_pin_extent errors to
2011 Oct 04
68
[patch 00/65] Error handling patchset v3
Hi all - Here''s my current error handling patchset, against 3.1-rc8. Almost all of this patchset is preparing for actual error handling. Before we start in on that work, I''m trying to reduce the surface we need to worry about. It turns out that there is a ton of code that returns an error code but never actually reports an error. The patchset has grown to 65 patches. 46 of them