Displaying 6 results from an estimated 6 matches for "alloc_end".
Did you mean:
vmalloc_end
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...*root;
int ret;
alloc_start = offset & ~mask;
@@ -5661,9 +5723,7 @@ static long btrfs_fallocate(struct inode
goto out;
}
- root = BTRFS_I(inode)->root;
-
- ret = btrfs_check_data_free_space(root, inode,
+ ret = btrfs_check_data_free_space(BTRFS_I(inode)->root, inode,
alloc_end - alloc_start);
if (ret)
goto out;
@@ -5672,12 +5732,6 @@ static long btrfs_fallocate(struct inode
while (1) {
struct btrfs_ordered_extent *ordered;
- trans = btrfs_start_transaction(BTRFS_I(inode)->root, 1);
- if (!trans) {
- ret = -EIO;
- goto out_free;
- }
-
/* the exten...
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...+ return ret;
+ }
}
path = btrfs_alloc_path();
@@ -2312,7 +2319,10 @@ static long btrfs_fallocate(struct file *file, int mode,
* wait 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...
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...93cf0a 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_offset);
out:
mutex_unlock(&inode->i_mutex);
return ret;
diff --git a/fs/btrfs/free...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...93cf0a 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_offset);
out:
mutex_unlock(&inode->i_mutex);
return ret;
diff --git a/fs/btrfs/free...
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