search for: btrfs_extent_item_key

Displaying 14 results from an estimated 14 matches for "btrfs_extent_item_key".

2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
...b/btrfs-image.c index a54e6c9..e553e7e 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -528,13 +528,17 @@ static int create_metadump(const char *input, FILE *out, int num_threads, btrfs_item_key_to_cpu(leaf, &key, path->slots[0]); if (key.objectid < bytenr || - key.type != BTRFS_EXTENT_ITEM_KEY) { + (key.type != BTRFS_EXTENT_ITEM_KEY && + key.type != BTRFS_METADATA_ITEM_KEY)) { path->slots[0]++; continue; } bytenr = key.objectid; - num_bytes = key.offset; + if (key.type == BTRFS_METADATA_ITEM_KEY) + num_bytes = key.offset; + else + num_bytes =...
2013 Jun 13
0
[PATCH] Btrfs: fix not being able to find skinny extents during relocate
...tent_root->fs_info, + SKINNY_METADATA); if (tree_block_processed(bytenr, blocksize, rc)) return 0; @@ -3319,10 +3321,15 @@ static int __add_tree_block(struct reloc_control *rc, path = btrfs_alloc_path(); if (!path) return -ENOMEM; - +again: key.objectid = bytenr; - key.type = BTRFS_EXTENT_ITEM_KEY; - key.offset = blocksize; + if (skinny) { + key.type = BTRFS_METADATA_ITEM_KEY; + key.offset = (u64)-1; + } else { + key.type = BTRFS_EXTENT_ITEM_KEY; + key.offset = blocksize; + } path->search_commit_root = 1; path->skip_locking = 1; @@ -3330,11 +3337,23 @@ static int __add_tree_b...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...individual devices. The owner * field points back to the chunk allocation mapping tree that allocated * the extent. The chunk tree uuid field is a way to double check the owner @@ -757,7 +788,17 @@ struct btrfs_root { * are used, and how many references there are to each block */ #define BTRFS_EXTENT_ITEM_KEY 168 -#define BTRFS_EXTENT_REF_KEY 180 + +#define BTRFS_TREE_BLOCK_INFO_KEY 174 + +#define BTRFS_TREE_BLOCK_REF_KEY 180 + +#define BTRFS_SHARED_BLOCK_REF_KEY 181 + +#define BTRFS_EXTENT_DATA_REF_KEY 186 + +#define BTRFS_SHARED_DATA_REF_KEY 187 + /* * block groups give us hints into the extent a...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...->slots[0] == 0) + + ret = -ENOENT; + if (path->slots[0] == 0) goto out; path->slots[0]--; @@ -880,14 +881,10 @@ static int get_reference_status(struct b btrfs_item_key_to_cpu(leaf, &found_key, path->slots[0]); if (found_key.objectid != bytenr || - found_key.type != BTRFS_EXTENT_ITEM_KEY) { - ret = 1; + found_key.type != BTRFS_EXTENT_ITEM_KEY) goto out; - } - - *ref_count = 0; - *min_generation = (u64)-1; + last_snapshot = btrfs_root_last_snapshot(&root->root_item); while (1) { leaf = path->nodes[0]; nritems = btrfs_header_nritems(leaf); @@ -910,114 +907...
2011 Mar 08
6
[PATCH v1 0/6] btrfs: scrub
This series adds an initial implementation for scrub. It works quite straightforward. The usermode issues an ioctl for each device in the fs. For each device, it enumerates the allocated device chunks. For each chunk, the contained extents are enumerated and the data checksums fetched. The extents are read sequentially and the checksums verified. If an error occurs (checksum or EIO), a good copy
2013 Apr 03
0
[PATCH] Btrfs-progs: add a free space cache checker to fsck
...uffer *leaf; + struct btrfs_key key; + u64 last; + int ret = 0; + + path = btrfs_alloc_path(); + if (!path) + return -ENOMEM; + + root = root->fs_info->extent_root; + + last = max_t(u64, cache->key.objectid, BTRFS_SUPER_INFO_OFFSET); + + key.objectid = last; + key.offset = 0; + key.type = BTRFS_EXTENT_ITEM_KEY; + + ret = btrfs_search_slot(NULL, root, &key, path, 0, 0); + if (ret < 0) + return ret; + while (1) { + if (path->slots[0] >= btrfs_header_nritems(path->nodes[0])) { + ret = btrfs_next_leaf(root, path); + if (ret < 0) + return ret; + if (ret > 0) { + ret = 0; +...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...ruct btrfs_trans_handle *trans, +static int lookup_extent_item(struct btrfs_trans_handle *trans, struct btrfs_root *root, u64 bytenr, u64 num_bytes) { @@ -726,8 +739,8 @@ static int lookup_extent_ref(struct btrf btrfs_init_path(&path); key.objectid = bytenr; - key.type = BTRFS_EXTENT_ITEM_KEY; key.offset = num_bytes; + btrfs_set_key_type(&key, BTRFS_EXTENT_ITEM_KEY); ret = btrfs_search_slot(trans, root->fs_info->extent_root, &key, &path, 0, 0); btrfs_release_path(root, &path); @@ -738,6 +751,9 @@ static int lookup_extent_ref(struct btrf * Construct a r...
2008 Oct 10
1
[PATCH] fix enospc when there is plenty of space
...ache *block_group = NULL; int chunk_alloc_done = 0; int empty_cluster = 2 * 1024 * 1024; int allowed_chunk_alloc = 0; + struct list_head *head = NULL, *cur = NULL; + int loop = 0; + struct btrfs_space_info *space_info; WARN_ON(num_bytes < root->sectorsize); btrfs_set_key_type(ins, BTRFS_EXTENT_ITEM_KEY); + ins->objectid = 0; + ins->offset = 0; if (orig_root->ref_cows || empty_size) allowed_chunk_alloc = 1; @@ -2239,152 +2199,132 @@ static int noinline find_free_extent(struct btrfs_trans_handle *trans, else empty_size += empty_cluster; } - search_start = max(search_start...
2011 Jul 21
10
[PATCH v5 0/8] Btrfs scrub: print path to corrupted files and trigger nodatasum fixup
While testing raid-auto-repair patches I''m going to send out later, I just found the very last bug in my current scrub patch series: Changelog v4->v5: - fixed a deadlock when fixup is taking longer while scrub is about to end Original message follows: ------------------------ This patch set introduces two new features for scrub. They share the backref iteration code which is the
2013 Apr 25
10
[PATCH v4 0/3] Btrfs: quota rescan for 3.10
The kernel side for rescan, which is needed if you want to enable qgroup tracking on a non-empty volume. The first patch splits btrfs_qgroup_account_ref into readable ans reusable units. The second patch adds the rescan implementation (refer to its commit message for a description of the algorithm). The third patch starts an automatic rescan when qgroups are enabled. It is only separated to
2011 Jun 29
14
[PATCH v4 0/6] btrfs: generic readeahead interface
This series introduces a generic readahead interface for btrfs trees. The intention is to use it to speed up scrub in a first run, but balance is another hot candidate. In general, every tree walk could be accompanied by a readahead. Deletion of large files comes to mind, where the fetching of the csums takes most of the time. Also the initial build-ups of free-space-caches and
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into
2012 Mar 20
13
[PATCH 0 of 3 v2] PV-GRUB: add support for ext4 and btrfs
Hi, The following patches add support for ext4 and btrfs to PV-GRUB. These patches are taken nearly verbatim from those provided by Fedora and Gentoo. We''ve been using these patches for the PV-GRUB images available in EC2 for some time now with no problems. Changes from v1: - Makefile has been changed to check the exit code from patch - The btrfs patch has been rebased to apply
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