search for: btrfs_free_reserved_data_space

Displaying 9 results from an estimated 9 matches for "btrfs_free_reserved_data_space".

2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...*root, u64 bytenr, - u64 num_bytes, u64 *actual_bytes) +int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, u64 num_bytes, + u64 *actual_bytes) { int ret; u64 discarded_bytes = 0; @@ -2739,7 +2756,8 @@ again: &alloc_hint); if (!ret) dcs = BTRFS_DC_SETUP; - btrfs_free_reserved_data_space(inode, num_pages); + else + btrfs_free_reserved_data_space(inode, num_pages); out_put: iput(inode); out_free: @@ -3119,9 +3137,7 @@ commit_trans: } /* - * called when we are clearing an delalloc extent from the - * inode''s io_tree or there was an error for whatever reason - * afte...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...*root, u64 bytenr, - u64 num_bytes, u64 *actual_bytes) +int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, u64 num_bytes, + u64 *actual_bytes) { int ret; u64 discarded_bytes = 0; @@ -2739,7 +2756,8 @@ again: &alloc_hint); if (!ret) dcs = BTRFS_DC_SETUP; - btrfs_free_reserved_data_space(inode, num_pages); + else + btrfs_free_reserved_data_space(inode, num_pages); out_put: iput(inode); out_free: @@ -3119,9 +3137,7 @@ commit_trans: } /* - * called when we are clearing an delalloc extent from the - * inode''s io_tree or there was an error for whatever reason - * afte...
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...nt, mode); if (ret < 0) { free_extent_map(em); break; @@ -5734,9 +5789,8 @@ static long btrfs_fallocate(struct inode unlock_extent(&BTRFS_I(inode)->io_tree, alloc_start, locked_end, GFP_NOFS); - btrfs_end_transaction(trans, BTRFS_I(inode)->root); -out_free: - btrfs_free_reserved_data_space(root, inode, alloc_end - alloc_start); + btrfs_free_reserved_data_space(BTRFS_I(inode)->root, inode, + alloc_end - alloc_start); out: mutex_unlock(&inode->i_mutex); return ret; -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body o...
2012 Jan 22
0
Compiler warnings: cast from pointer to integer of different size
...C fs/btrfs/super.o CC fs/btrfs/ctree.o CC fs/btrfs/extent-tree.o fs/btrfs/extent-tree.c: In function ‘btrfs_check_data_free_space’: fs/btrfs/extent-tree.c:3314:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/extent-tree.c: In function ‘btrfs_free_reserved_data_space’: fs/btrfs/extent-tree.c:3335:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/extent-tree.c: In function ‘reserve_metadata_bytes’: fs/btrfs/extent-tree.c:3698:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/ex...
2010 Apr 26
0
[PATCH V2 11/12] Btrfs: Pre-allocate space for data relocation
...node)->io_tree, start, end, GFP_NOFS); + num_bytes = end + 1 - start; + ret = btrfs_prealloc_file_range(inode, 0, start, + num_bytes, num_bytes, + end + 1, &alloc_hint); + unlock_extent(&BTRFS_I(inode)->io_tree, start, end, GFP_NOFS); + if (ret) + break; + nr++; + } + btrfs_free_reserved_data_space(inode, cluster->end + + 1 - cluster->start); +out: + mutex_unlock(&inode->i_mutex); + return ret; +} + +static noinline_for_stack int setup_extent_mapping(struct inode *inode, u64 start, u64 end, u64 block_start) { @@ -2587,7 +2631,6 @@ static int relocate_file_extent_...
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
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...ode *ionde); void btrfs_clear_space_info_full(struct btrfs_fs_info *info); -int btrfs_check_metadata_free_space(struct btrfs_root *root); +u64 btrfs_metadata_free_space(struct btrfs_root *root); int btrfs_check_data_free_space(struct btrfs_root *root, struct inode *inode, u64 bytes); void btrfs_free_reserved_data_space(struct btrfs_root *root, diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index fafd6f2..dbd2f13 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -1456,7 +1456,6 @@ static int cleaner_kthread(void *arg) static int transaction_kthread(void *arg) { struct btrfs_root *root = arg; -...
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