search for: locked_end

Displaying 7 results from an estimated 7 matches for "locked_end".

2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...d, int skip_pinned); int btrfs_check_file(struct btrfs_root *root, struct inode *inode); extern struct file_operations btrfs_file_operations; -int btrfs_drop_extents(struct btrfs_trans_handle *trans, - struct btrfs_root *root, struct inode *inode, - u64 start, u64 end, u64 locked_end, - u64 inline_limit, u64 *hint_block, int drop_cache); +int btrfs_drop_extents(struct btrfs_trans_handle *trans, struct inode *inode, + u64 start, u64 end, u64 *hint_byte, int drop_cache); int btrfs_mark_extent_written(struct btrfs_trans_handle *trans, - struct btrfs_root *...
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...rdered_update_i_size(inode, cur_offset, NULL); + } + ret = btrfs_update_inode(trans, root, inode); BUG_ON(ret); + + btrfs_end_transaction(trans, root); + btrfs_unreserve_metadata_space(root, 3); } - return ret; } @@ -5641,8 +5705,6 @@ static long btrfs_fallocate(struct inode u64 locked_end; u64 mask = BTRFS_I(inode)->root->sectorsize - 1; struct extent_map *em; - struct btrfs_trans_handle *trans; - struct btrfs_root *root; int ret; alloc_start = offset & ~mask; @@ -5661,9 +5723,7 @@ static long btrfs_fallocate(struct inode goto out; } - root = BTRFS_I(inod...
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
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...t for ordered IO before we have any locks. We''ll loop again * below with the locks held. */ - btrfs_wait_ordered_range(inode, alloc_start, alloc_end - alloc_start); + ret = btrfs_wait_ordered_range(inode, alloc_start, + alloc_end - alloc_start); + if (ret) + goto out; locked_end = alloc_end - 1; while (1) { @@ -2336,8 +2346,10 @@ static long btrfs_fallocate(struct file *file, int mode, * we can''t wait on the range with the transaction * running or with the extent lock held */ - btrfs_wait_ordered_range(inode, alloc_start, - alloc_end - all...
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
..., struct fstrim_range *range) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index a35e51c..e93cf0a 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1670,7 +1670,12 @@ static long btrfs_fallocate(struct file *file, int mode, unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end, &cached_state, GFP_NOFS); - btrfs_free_reserved_data_space(inode, alloc_end - alloc_start); + /* + * We failed to allocate some of our space, so free up part of our + * reservation. + */ + if (cur_offset < alloc_end) + btrfs_free_reserved_data_space(inode, alloc_end - cur_off...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
..., struct fstrim_range *range) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index a35e51c..e93cf0a 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1670,7 +1670,12 @@ static long btrfs_fallocate(struct file *file, int mode, unlock_extent_cached(&BTRFS_I(inode)->io_tree, alloc_start, locked_end, &cached_state, GFP_NOFS); - btrfs_free_reserved_data_space(inode, alloc_end - alloc_start); + /* + * We failed to allocate some of our space, so free up part of our + * reservation. + */ + if (cur_offset < alloc_end) + btrfs_free_reserved_data_space(inode, alloc_end - cur_off...
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