search for: search_start

Displaying 20 results from an estimated 26 matches for "search_start".

2009 Mar 20
1
[PATCH 2/4] Btrfs: clean up find_free_extent
...loc; if (last_ptr) { - if (*last_ptr) { + if (*last_ptr) hint_byte = *last_ptr; - last_wanted = *last_ptr; - } else + else empty_size += empty_cluster; } else { empty_cluster = 0; @@ -2591,32 +2588,29 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, search_start = max(search_start, first_logical_byte(root, 0)); search_start = max(search_start, hint_byte); - if (last_wanted && search_start != last_wanted) { - last_wanted = 0; + if (search_start == hint_byte) { + using_hint = 1; + block_group = btrfs_lookup_block_group(root->fs_info, +...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...to be had. I think I finally have a hold on what the problem is, it only happens with Metadata writes, and happens _very_ infrequently. What has to happen is we have to allocate have allocated out of the first logical byte on the disk, which would set last_alloc to first_logical_byte(root, 0), so search_start == orig_search_start. We then need to allocate for normal metadata, so BTRFS_BLOCK_GROUP_METADATA | BTRFS_BLOCK_GROUP_DUP. We will do a block lookup for the given search_start, block_group_bits() won''t match and we''ll go to choose another block group. However because search_sta...
2009 Jul 31
1
[PATCH] Btrfs: make sure we find a bitmap entry
...space-cache.c b/fs/btrfs/free-space-cache.c index af99b78..691ea95 100644 --- a/fs/btrfs/free-space-cache.c +++ b/fs/btrfs/free-space-cache.c @@ -414,11 +414,20 @@ static noinline int remove_from_bitmap(struct btrfs_block_group_cache *block_gro u64 *offset, u64 *bytes) { u64 end; + u64 search_start, search_bytes; + int ret; again: end = bitmap_info->offset + (u64)(BITS_PER_BITMAP * block_group->sectorsize) - 1; + search_start = *offset; + search_bytes = *bytes; + + ret = search_bitmap(block_group, bitmap_info, &search_start, + &search_bytes); + BUG_ON(ret < 0...
2013 Sep 05
3
[PATCH v2 0/3] btrfs-progs: prevent mkfs from aborting with small volume
Here are 3 patches to avoid undesired aborts of mkfs.btrfs. These are based on top of Chris''s btrfs-progs.git: git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-progs.git Thanks, H.Seto Hidetoshi Seto (3): btrfs-progs: error if device for mkfs is too small btrfs-progs: error if device have no space to make primary chunks btrfs-progs: calculate available
2007 Nov 12
0
[PATCH]Minor fix for find_search_start
Hello, This patch adds a new parameter 'full_scan' to 'find_search_start', thereby 'find_search_start' can know whether 'find_free_extent' is in full scan phrase. I feel that 'find_search_start' should skip calling 'btrfs_find_block_group' when 'find_free_extent' is in full scan phrase. In my test on a 2GB volume, Oops occurs...
2008 Sep 30
0
[PATCH] fix seekiness due to finding the wrong block group
Hello, This patch fixes a problem where we end up seeking too much when *last_ptr is valid. This happens because btrfs_lookup_first_block_group only returns a block group that starts on or after the given search start, so if the search_start is in the middle of a block group it will return the block group after the given search_start, which is suboptimal. This patch fixes that by doing a btrfs_lookup_block_group, which will return the block group that contains the given search start. If we fail to find a block group, we fall back on...
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...struct inode *inode, - u64 start, u64 end, u64 locked_end, - u64 inline_limit, u64 *hint_byte, 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) { - u64 extent_end = 0; - u64 search_start = start; - u64 ram_bytes = 0; - u64 disk_bytenr = 0; - u64 orig_locked_end = locked_end; - u8 compression; - u8 encryption; - u16 other_encoding = 0; + struct btrfs_root *root = BTRFS_I(inode)->root; struct extent_buffer *leaf; - struct btrfs_file_extent_item *extent; + struct btrfs_file_exten...
2013 Jul 17
0
opusfile, compiler warnings
...no' may be used uninitialized in this function src/opusfile.c:320: warning: 'preferred_sr.size' may be used uninitialized in this function src/opusfile.c:320: warning: 'preferred_sr.offset' may be used uninitialized in this function src/opusfile.c:320: warning: 'preferred_sr.search_start' may be used uninitialized in this function src/opusfile.c:1131: warning: 'end_offset' may be used uninitialized in this function src/opusfile.c: In function 'op_pcm_seek': src/opusfile.c:2417: warning: 'li' may be used uninitialized in this function ## Mac OS X x86_64...
2020 Oct 02
4
Spotlight configuration trouble
I?m trying to setup Spotlight with Tracker (2.3 from Ubuntu repo) backend in Ubuntu 20.04 and Samba 4.12.7. I?ve followed the wiki closely but every time I try to search I get this in the logs: [2020/10/02 10:43:42.078242, 0] ../../source3/rpc_server/mdssvc/mdssvc_tracker.c:403(mds_tracker_search_start) mds_tracker_search_start: no connection to Tracker [2020/10/02 10:43:42.079897, 0] ../../source3/rpc_server/mdssvc/mdssvc.c:935(slrpc_open_query) slrpc_open_query: backend search_start failed And also sometimes this: (process:80045): Tracker-WARNING **: 10:43:42.086: Falling back to bus bac...
2011 Apr 12
3
[PATCH v2 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
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 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...oc_free_block(trans, root, buf->len, parent_start, + if (root->fs_info->cater_factor > 1) { + if (btrfs_cater_factor(btrfs_header_cater(buf)) > 1) + cow = btrfs_grab_cater_block(trans, root, buf, parent_start, + root->root_key.objectid, &disk_key, + level, search_start, empty_size, 1); + else + cow = btrfs_alloc_free_block_cater(trans, root, buf->len, parent_start, + root->root_key.objectid, &disk_key, + level, search_start, empty_size, 1); + } else { + cow = btrfs_alloc_free_block(trans, root, buf->len, parent_start, r...
2020 Oct 02
0
Spotlight configuration trouble
...h Tracker (2.3 from Ubuntu > repo) backend in Ubuntu 20.04 and Samba 4.12.7. I?ve followed > the wiki closely but every time I try to search I get this in > the logs: > > [2020/10/02 10:43:42.078242, 0] > ../../source3/rpc_server/mdssvc/mdssvc_tracker.c:403(mds_track > er_search_start) > mds_tracker_search_start: no connection to Tracker > [2020/10/02 10:43:42.079897, 0] > ../../source3/rpc_server/mdssvc/mdssvc.c:935(slrpc_open_query) > slrpc_open_query: backend search_start failed > > And also sometimes this: > > (process:80045): Tracker-WARNING...
2020 Nov 04
0
Spotlight configuration trouble
...trying to setup Spotlight with Tracker (2.3 from Ubuntu repo) backend in Ubuntu 20.04 and Samba 4.12.7. I?ve followed the wiki closely but every time I try to search I get this in the logs: > > [2020/10/02 10:43:42.078242, 0] ../../source3/rpc_server/mdssvc/mdssvc_tracker.c:403(mds_tracker_search_start) > mds_tracker_search_start: no connection to Tracker > [2020/10/02 10:43:42.079897, 0] ../../source3/rpc_server/mdssvc/mdssvc.c:935(slrpc_open_query) > slrpc_open_query: backend search_start failed > > And also sometimes this: > > (process:80045): Tracker-WARNING **: 10:4...
2011 May 02
5
[PATCH v3 0/3] btrfs: quasi-round-robin for chunk allocation
In a multi device setup, the chunk allocator currently always allocates chunks on the devices in the same order. This leads to a very uneven distribution, especially with RAID1 or RAID10 and an uneven number of devices. This patch always sorts the devices before allocating, and allocates the stripes on the devices with the most available space, as long as there is enough space available. In a low
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...- if (ret) { - spin_lock(&cache->space_info->lock); - cache->space_info->bytes_reserved -= buf->len; - cache->space_info->reservation_progress++; - spin_unlock(&cache->space_info->lock); - } goto out; } pin: @@ -5180,8 +5193,8 @@ checks: search_start - offset); BUG_ON(offset > search_start); - ret = btrfs_update_reserved_bytes(block_group, num_bytes, 1, - (data & BTRFS_BLOCK_GROUP_DATA)); + ret = btrfs_update_reserved_bytes(block_group, num_bytes, + RESERVE_ALLOC); if (ret == -EAGAIN) { btrfs_add_free_space(b...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...- if (ret) { - spin_lock(&cache->space_info->lock); - cache->space_info->bytes_reserved -= buf->len; - cache->space_info->reservation_progress++; - spin_unlock(&cache->space_info->lock); - } goto out; } pin: @@ -5180,8 +5192,8 @@ checks: search_start - offset); BUG_ON(offset > search_start); - ret = btrfs_update_reserved_bytes(block_group, num_bytes, 1, - (data & BTRFS_BLOCK_GROUP_DATA)); + ret = btrfs_update_reserved_bytes(block_group, num_bytes, + RESERVE_ALLOC); if (ret == -EAGAIN) { btrfs_add_free_space(b...
2011 May 11
8
[PATCH 1/4] Btrfs: map the node block when looking for readahead targets
If we have particularly full nodes, we could call btrfs_node_blockptr up to 32 times, which is 32 pairs of kmap/kunmap, which _sucks_. So go ahead and map the extent buffer while we look for readahead targets. Thanks, Signed-off-by: Josef Bacik <josef@redhat.com> --- fs/btrfs/ctree.c | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git
2009 Aug 05
3
RAID[56] with arbitrary numbers of "parity" stripes.
...rofile(struct btrfs_root *root, u64 data) info->metadata_alloc_profile; data = BTRFS_BLOCK_GROUP_METADATA | alloc_profile; } - return btrfs_reduce_alloc_profile(root, data); } @@ -3635,7 +3644,7 @@ static noinline int find_free_extent(struct btrfs_trans_handle *trans, u64 search_start, u64 search_end, u64 hint_byte, struct btrfs_key *ins, u64 exclude_start, u64 exclude_nr, - int data) + u64 data) { int ret = 0; struct btrfs_root *root = orig_root->fs_info->extent_root; @@ -6774,8 +6783,7 @@ out: static u64 update_block_group_flags(...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...an_tree_block(trans, root, buf); + } + + return 0; +} + int __btrfs_cow_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, struct extent_buffer *buf, @@ -135,26 +208,25 @@ int __btrfs_cow_block(struct btrfs_trans struct extent_buffer **cow_ret, u64 search_start, u64 empty_size) { - u64 parent_start; + u64 generation; struct extent_buffer *cow; - u32 nritems; - int ret = 0; - int different_trans = 0; + struct btrfs_disk_key disk_key; int level; WARN_ON(root->ref_cows && trans->transid != root->fs_info->running_transaction-&g...