search for: bytenr

Displaying 20 results from an estimated 64 matches for "bytenr".

Did you mean: byte
2011 Feb 10
1
Recovering data from disk with loose cable
...ard to believe there is no way to recover this volume. Any suggestions at all would be greatly appreciated. Recovering this data would mean a lot. Thanks, - Ben [1] https://patchwork.kernel.org/patch/506631/ [2] Output from patched btrfsck $ sudo ./btrfsck /dev/sdj trying potential super #0 at bytenr 65536 super #0 at bytenr 65536 has better generation 43887 than 0, using that trying potential super #1 at bytenr 67108864 super #1 at bytenr 67108864 has same generation 43887 than 43887, skipping warning: super #1 at bytenr 67108864 has different contents! trying potential super #2 at bytenr 2...
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...>root_key.objectid, - btrfs_header_generation(mid), + 0, root->root_key.objectid, level, 1); /* once for the root ptr */ free_extent_buffer(mid); @@ -764,7 +821,6 @@ static int balance_level(struct btrfs_tr ret = wret; if (btrfs_header_nritems(right) == 0) { u64 bytenr = right->start; - u64 generation = btrfs_header_generation(parent); u32 blocksize = right->len; clean_tree_block(trans, root, right); @@ -776,9 +832,9 @@ static int balance_level(struct btrfs_tr if (wret) ret = wret; wret = btrfs_free_extent(trans, root, bytenr, -...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...checking. Regards Signed-off-by: Yan Zheng <zheng.yan@oracle.com> --- diff -urp 3/fs/btrfs/ctree.h 4/fs/btrfs/ctree.h --- 3/fs/btrfs/ctree.h 2008-10-27 16:31:51.000000000 +0800 +++ 4/fs/btrfs/ctree.h 2008-10-27 16:34:27.000000000 +0800 @@ -445,6 +445,7 @@ struct btrfs_root_item { __le64 bytenr; __le64 byte_limit; __le64 bytes_used; + __le64 last_snapshot; __le32 flags; __le32 refs; struct btrfs_disk_key drop_progress; @@ -1375,6 +1376,8 @@ BTRFS_SETGET_STACK_FUNCS(root_refs, stru BTRFS_SETGET_STACK_FUNCS(root_flags, struct btrfs_root_item, flags, 32); BTRFS_SETGET_STACK_FUNCS...
2013 Mar 15
0
[PATCH] Btrfs-progs: add skinny metadata support to progs V3
...) diff --git a/btrfs-image.c 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_...
2012 May 27
0
[RFC PATCH] Decrease Metadata Fragment Using A Caterpillar Band Method
...oc_reserved_file_extent_cater(trans, root, + parent, ref_root, flags, + ref->objectid, ref->offset, + &ins, node->ref_mod, extent_op->cater_index_factor); } else if (node->action == BTRFS_ADD_DELAYED_REF) { ret = __btrfs_inc_extent_ref(trans, root, node->bytenr, node->num_bytes, parent, @@ -2102,11 +2118,18 @@ static int run_delayed_tree_ref(struct b if (node->action == BTRFS_ADD_DELAYED_REF && insert_reserved) { BUG_ON(!extent_op || !extent_op->update_flags || !extent_op->update_key); - ret = alloc_reserved_...
2008 Jan 07
1
[PATCH]Add rollback support for the converter
...lock. - */ static int ext2_alloc_block(ext2_filsys fs, u64 goal, u64 *block_ret) { blk_t block; @@ -115,6 +113,7 @@ static int custom_alloc_extent(struct bt { ext2_filsys fs = (ext2_filsys)root->fs_info->priv_data; u32 blocksize = fs->blocksize; + u64 first = 0; u64 block; u64 bytenr; int ret; @@ -127,6 +126,12 @@ static int custom_alloc_extent(struct bt if (ret) return ret; + /* all free blocks are pinned */ + if (first == block) + return -ENOSPC; + if (first == 0) + first = block; + bytenr = block * blocksize; if (!test_range_bit(&root->fs_info-&...
2011 May 30
5
Damaged super block / fs root
I have accidently damaged the first block(s) of a btrfs partition and can''t mount it anymore. I can see that my data is still intact by running a command like: cat /dev/sda5 | hexdump -C | more Do any (experimental) tools exist which would allow me to recover the files? Thank you -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a
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
2009 Jul 07
0
[PATCH] speed up snapshot dropping
...te back, this function drops the reference + * to the block. + * + * NOTE: return value 1 means we should stop walking down. + */ +static noinline int do_walk_down(struct btrfs_trans_handle *trans, + struct btrfs_root *root, + struct btrfs_path *path, + struct walk_control *wc) +{ + u64 bytenr; + u64 generation; + u64 parent; + u32 blocksize; + struct btrfs_key key; + struct extent_buffer *next = NULL; + int level = wc->level; + int ret = 0; + + generation = btrfs_node_ptr_generation(path->nodes[level], + path->slots[level]); + /* + * if the lower level block was cre...
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 Sep 05
3
BTRFS thinks device is busy [kernel 3.5.3]
...g | head ERROR: unable to scan the device ''/dev/sdg'' - Device or resource busy Well block 905192472576 seems great, but generation doesn''t match, have=31490, want=32015 Super think''s the tree root is at 906491981824, chunk root 628100251648 Generation: 31490 Root bytenr: 905192484864 Root objectid: 2 Generation: 31490 Root bytenr: 905543114752 Root objectid: 4 Generation: 31490 Root bytenr: 905641820160 Root objectid: 5 Generation: 31490 Root bytenr: 905689354240 Root objectid: 7 Generation: 31490 Root bytenr: 905688096768 Root objectid: 554 Generation: 31490 Root...
2010 Dec 01
12
Fsck, parent transid verify failed
Hi folks! Been using btrfs for quite a while now, worked great until now. Got power-loss on my machine and now i have the "parent transid verify failed on X wanted X found X" problem. So I can''t get it to mount. My btrfs is spread over sda (2tb), sdc(2tb), sdd(1tb). Is this something that an offline fsck could fix ? If so is the fsck-util being developed ? Is there a way to
2009 Nov 12
0
[PATCH 03/12] Btrfs: Rewrite btrfs_drop_extents
...4 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_extent_item *fi; struct btrfs_path *path; struct...
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
2013 Aug 02
2
[PATCH] Btrfs: allow compressed extents to be merged during defragment
...inode.c index 55dda87..a7aeecc 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2229,7 +2229,7 @@ static noinline bool record_extent_backrefs(struct btrfs_path *path, static int relink_is_mergable(struct extent_buffer *leaf, struct btrfs_file_extent_item *fi, - u64 disk_bytenr) + u64 disk_bytenr, u8 compress) { if (btrfs_file_extent_disk_bytenr(leaf, fi) != disk_bytenr) return 0; @@ -2237,8 +2237,10 @@ static int relink_is_mergable(struct extent_buffer *leaf, if (btrfs_file_extent_type(leaf, fi) != BTRFS_FILE_EXTENT_REG) return 0; - if (btrfs_file_ex...
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...ff --git a/fs/btrfs/delayed-ref.c b/fs/btrfs/delayed-ref.c index e807b14..ee1cf82 100644 --- a/fs/btrfs/delayed-ref.c +++ b/fs/btrfs/delayed-ref.c @@ -644,11 +644,11 @@ int btrfs_add_delayed_tree_ref(struct btrfs_trans_handle *trans, */ ret = add_delayed_ref_head(trans, &head_ref->node, bytenr, num_bytes, action, 0); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); ret = add_delayed_tree_ref(trans, &ref->node, bytenr, num_bytes, parent, ref_root, level, action); - BUG_ON(ret); + btrfs_fixable_bug_on(ret); spin_unlock(&delayed_refs->lock); return 0; } @@...
2011 Apr 07
0
[PATCH] btrfs-progs: cast u64 to long long to avoid printf warnings
...signed long long)top_id, full_path); free(full_path); return 0; diff --git a/btrfs-map-logical.c b/btrfs-map-logical.c index a109c6a..9e9806d 100644 --- a/btrfs-map-logical.c +++ b/btrfs-map-logical.c @@ -65,8 +65,8 @@ struct extent_buffer *debug_read_block(struct btrfs_root *root, u64 bytenr, eb->dev_bytenr = multi->stripes[0].physical; fprintf(info_file, "mirror %d logical %Lu physical %Lu " - "device %s\n", mirror_num, bytenr, eb->dev_bytenr, - device->name); + "device %s\n", mirror_num, (unsigned long long)bytenr, + (unsigned...
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...7,11 @@ void btrfs_put_block_group_cache(struct btrfs_fs_info *info); u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo); int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end); -int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, - u64 num_bytes, u64 *actual_bytes); +int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, u64 num_bytes, + u64 *actual_bytes); +int btrfs_error_discard_extent(struct btrfs_root *root, + struct btrfs_block_group_cache *block_group, + u64 bytenr, u64 num_bytes...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...7,11 @@ void btrfs_put_block_group_cache(struct btrfs_fs_info *info); u64 btrfs_account_ro_block_groups_free_space(struct btrfs_space_info *sinfo); int btrfs_error_unpin_extent_range(struct btrfs_root *root, u64 start, u64 end); -int btrfs_error_discard_extent(struct btrfs_root *root, u64 bytenr, - u64 num_bytes, u64 *actual_bytes); +int btrfs_discard_extent(struct btrfs_root *root, u64 bytenr, u64 num_bytes, + u64 *actual_bytes); +int btrfs_error_discard_extent(struct btrfs_root *root, + struct btrfs_block_group_cache *block_group, + u64 bytenr, u64 num_bytes...
2010 May 20
1
[PATCH 01/10] btrfs: add a return value for readahead_tree_block()
...com> --- fs/btrfs/disk-io.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 6632e5c..35916d5 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -794,7 +794,7 @@ int readahead_tree_block(struct btrfs_root *root, u64 bytenr, u32 blocksize, buf = btrfs_find_create_tree_block(root, bytenr, blocksize); if (!buf) return 0; - read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, + ret = read_extent_buffer_pages(&BTRFS_I(btree_inode)->io_tree, buf, 0, 0, btree_get_extent, 0); free_extent_buff...