search for: btrfs_ordered_extent

Displaying 20 results from an estimated 21 matches for "btrfs_ordered_extent".

2011 Aug 26
0
[PATCH] Btrfs: make some functions return void
...fs_info *fs_info) @@ -2834,7 +2830,7 @@ static int btrfs_destroy_ordered_operations(struct btrfs_root *root) return 0; } -static int btrfs_destroy_ordered_extents(struct btrfs_root *root) +static void btrfs_destroy_ordered_extents(struct btrfs_root *root) { struct list_head splice; struct btrfs_ordered_extent *ordered; @@ -2866,17 +2862,14 @@ static int btrfs_destroy_ordered_extents(struct btrfs_root *root) } spin_unlock(&root->fs_info->ordered_extent_lock); - - return 0; } -static int btrfs_destroy_delayed_refs(struct btrfs_transaction *trans, - struct btrfs_root *root) +sta...
2013 Aug 29
0
[PATCH] Btrfs: allow partial ordered extent completion
...| 13 +++++++--- fs/btrfs/ordered-data.h | 7 +++++ 3 files changed, 62 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 1c86f9d..11b5927 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2562,8 +2562,10 @@ static int btrfs_finish_ordered_io(struct btrfs_ordered_extent *ordered_extent) struct extent_state *cached_state = NULL; struct new_sa_defrag_extent *new = NULL; int compress_type = 0; - int ret; + int ret = 0; + u64 logical_len = ordered_extent->len; bool nolock; + bool truncated = false; nolock = btrfs_is_free_space_inode(inode); @@ -2572,6...
2013 Oct 25
0
[PATCH] Btrfs: return an error from btrfs_wait_ordered_range
...41 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 3591e8f..3c790ef 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -1280,6 +1280,7 @@ again: } wait_on_page_writeback(pages[i]); } + faili = num_pages - 1; err = 0; if (start_pos < inode->i_size) { struct btrfs_ordered_extent *ordered; @@ -1298,8 +1299,10 @@ again: unlock_page(pages[i]); page_cache_release(pages[i]); } - btrfs_wait_ordered_range(inode, start_pos, - last_pos - start_pos); + err = btrfs_wait_ordered_range(inode, start_pos, + last_pos - start_pos); + if (err) + goto...
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
2012 Sep 17
13
[PATCH 1/2 v3] Btrfs: use flag EXTENT_DEFRAG for snapshot-aware defrag
We''re going to use this flag EXTENT_DEFRAG to indicate which range belongs to defragment so that we can implement snapshow-aware defrag: We set the EXTENT_DEFRAG flag when dirtying the extents that need defragmented, so later on writeback thread can differentiate between normal writeback and writeback started by defragmentation. This patch is used for the latter one. Originally patch
2009 Nov 02
0
[PATCH 7/8] Make fallocate(2) more ENOSPC friendly
...- 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 extent lock is ordered inside the running * transaction */ @@ -5691,8 +5745,6 @@ static long btrfs_fallocate(struct inode btrfs_put_ordered_ex...
2013 Dec 18
2
[PATCH] Btrfs: improve the performance fluctuating of the fsync
...f87ed5 100644 --- a/fs/btrfs/ordered-data.c +++ b/fs/btrfs/ordered-data.c @@ -433,6 +433,9 @@ void btrfs_get_logged_extents(struct btrfs_root *log, struct inode *inode) spin_lock_irq(&tree->lock); for (n = rb_first(&tree->tree); n; n = rb_next(n)) { ordered = rb_entry(n, struct btrfs_ordered_extent, rb_node); + if (ordered->csum_bytes_left) + continue; + spin_lock(&log->log_extents_lock[index]); if (list_empty(&ordered->log_list)) { list_add_tail(&ordered->log_list, &log->logged_list[index]); diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c in...
2013 Aug 06
6
[PATCH 0/4] btrfs: out-of-band (aka offline) dedupe v4
Hi, The following series of patches implements in btrfs an ioctl to do out-of-band deduplication of file extents. To be clear, this means that the file system is mounted and running, but the dedupe is not done during file writes, but after the fact when some userspace software initiates a dedupe. The primary patch is loosely based off of one sent by Josef Bacik back in January, 2011.
2010 Mar 22
0
[PATCH] Btrfs: change direct I/O read to not use i_mutex.
...ushed the ordered data into the btree so the extent is valid + */ +static void btrfs_dio_safe_to_read(struct btrfs_diocb *diocb, + struct extent_map *em, u64 *lockend, + u64 *data_len, int *safe_to_read) +{ + struct extent_io_tree *io_tree = &BTRFS_I(diocb->inode)->io_tree; + struct btrfs_ordered_extent *ordered; + u64 stop; + + /* must ensure the whole compressed extent is valid on each loop + * as we don''t know the final extent size until we look it up + */ + if (test_bit(EXTENT_FLAG_COMPRESSED, &em->flags) && + (diocb->lockstart > em->start || *lockend &lt...
2012 Jan 05
4
[RFC][PATCH 3/3] Btrfs: improve truncation of btrfs
...t) break; } @@ -3247,12 +3256,10 @@ out: static int btrfs_truncate_page(struct address_space *mapping, loff_t from) { struct inode *inode = mapping->host; - struct btrfs_root *root = BTRFS_I(inode)->root; struct extent_io_tree *io_tree = &BTRFS_I(inode)->io_tree; struct btrfs_ordered_extent *ordered; struct extent_state *cached_state = NULL; char *kaddr; - u32 blocksize = root->sectorsize; pgoff_t index = from >> PAGE_CACHE_SHIFT; unsigned offset = from & (PAGE_CACHE_SIZE-1); struct page *page; @@ -3261,8 +3268,6 @@ static int btrfs_truncate_page(struct address_...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
..._dec_test_ordered_pending(struct inode *inode, u64 file_offset, u64 io_size); int btrfs_add_ordered_extent(struct inode *inode, u64 file_offset, - u64 start, u64 len, int nocow); + u64 start, u64 len, int type); int btrfs_add_ordered_sum(struct inode *inode, struct btrfs_ordered_extent *entry, struct btrfs_ordered_sum *sum); diff -urp 3/fs/btrfs/transaction.c 4/fs/btrfs/transaction.c --- 3/fs/btrfs/transaction.c 2008-10-27 16:31:48.000000000 +0800 +++ 4/fs/btrfs/transaction.c 2008-10-27 16:34:27.000000000 +0800 @@ -751,6 +751,9 @@ static noinline int create_pending_snaps...
2013 Nov 19
5
xenwatch: page allocation failure: order:4, mode:0x10c0d0 xen_netback:xenvif_alloc: Could not allocate netdev for vif16.0
...0 0 1280 25 gfs2_glock(aspace) 0 0 960 17 gfs2_glock 0 0 592 27 btrfs_delayed_data_ref 0 0 96 42 btrfs_delayed_ref_head 0 0 232 17 btrfs_delayed_node 0 0 392 20 btrfs_ordered_extent 0 0 472 17 btrfs_extent_buffer 0 0 568 28 btrfs_delalloc_work 0 0 184 22 btrfs_path 0 0 144 28 btrfs_transaction 0 0 600 27 btrfs_trans_handle 0 0 160 25 bt...
2010 Jul 26
6
[PATCH] Btrfs: compressed file size ioctl
...s size on disk. Had been posted by Chris Ball over a year ago (http://article.gmane.org/gmane.comp.file-systems.btrfs/2873). Chris Mason suggested a couple of improvements back then, which I have implemented in this version: - use u64 to return the result - replaced the loop while (1) { struct btrfs_ordered_extent *ordered; lock_extent(&BTRFS_I(inode)->io_tree, 0, len, GFP_NOFS); ordered = btrfs_lookup_first_ordered_extent(inode, len); if (BTRFS_I(inode)->delalloc_bytes == 0 && !ordered) break; unlock_extent(&BTRFS_I(inode)->io_tree, 0, len, GFP_NOFS); if (ordered) bt...
2012 Nov 15
3
Likely mem leak in 3.7
Starting with 3.7 rc1, my workstation seems to loose ram. Up until (and including) 3.6, used-(buffers+cached) was roughly the same as sum(rss) (taking shared into account). Now there is an approx 6G gap. When the box first starts, it is clearly less swappy than with <= 3.6; I can''t tell whether that is related. The reduced swappiness persists. It seems to get worse when I update
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 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
2012 Dec 18
0
[PATCH] [RFC] Btrfs: Subpagesize blocksize (WIP).
...offset)) { diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 3368c10..11ff3dd 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2040,22 +2040,38 @@ static int btrfs_writepage_end_io_hook(struct page *page, u64 start, u64 end, struct btrfs_root *root = BTRFS_I(inode)->root; struct btrfs_ordered_extent *ordered_extent = NULL; struct btrfs_workers *workers; + u64 block_size = 1 << inode->i_blkbits; + u64 io_size; + + if (block_size >= PAGE_CACHE_SIZE) + io_size = end - start + 1; + else + io_size = block_size; trace_btrfs_writepage_end_io_hook(page, start, end, uptodate); C...
2013 Apr 19
14
[GIT PULL] (xen) stable/for-jens-3.10
Hey Jens, Please in your spare time (if there is such a thing at a conference) pull this branch: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-3.10 for your v3.10 branch. Sorry for being so late with this. <blurb> It has the ''feature-max-indirect-segments'' implemented in both backend and frontend. The current problem with the backend and
2009 Aug 24
0
[PATCH] Btrfs: proper metadata -ENOSPC handling
...struct dentry *dentry, out_unlock: nr = trans->blocks_used; btrfs_end_transaction_throttle(trans, root); -out_fail: + if (drop_inode) { inode_dec_link_count(inode); iput(inode); @@ -5134,9 +5208,15 @@ static long btrfs_fallocate(struct inode *inode, int mode, while (1) { struct btrfs_ordered_extent *ordered; - trans = btrfs_start_transaction(BTRFS_I(inode)->root, 1); - if (!trans) { - ret = -EIO; + /* + * this is a bad guess, but its as good as we have now. Just + * say it will take len / max extent # of items to accomodate + * this change. + */ + trans = btrfs_start_trans...
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