Displaying 15 results from an estimated 15 matches for "btrfs_header_generation".
2011 Jun 21
19
[GIT PULL v3] Btrfs: improve write ahead log with sub transaction
I''ve been working to try to improve the write-ahead log''s performance,
and I found that the bottleneck addresses in the checksum items,
especially when we want to make a random write on a large file, e.g a 4G file.
Then a idea for this suggested by Chris is to use sub transaction ids and just
to log the part of inode that had changed since either the last log commit or
the last
2009 May 12
0
[PATCH 1/2] btrfs-progs: mixed back ref support
...&disk_key, 0);
+ cow = btrfs_alloc_free_block(trans, new_root, buf->len,
+ new_root_objectid, &disk_key,
level, buf->start, 0);
if (IS_ERR(cow)) {
kfree(new_root);
@@ -117,7 +122,7 @@ int btrfs_copy_root(struct btrfs_trans_h
BTRFS_FSID_SIZE);
WARN_ON(btrfs_header_generation(buf) > trans->transid);
- ret = btrfs_inc_ref(trans, new_root, buf, cow, NULL);
+ ret = btrfs_inc_ref(trans, new_root, cow, 0);
kfree(new_root);
if (ret)
@@ -128,6 +133,74 @@ int btrfs_copy_root(struct btrfs_trans_h
return 0;
}
+static noinline int __btrfs_update_ref(struct btrfs_t...
2013 May 20
2
[PATCH] Btrfs: fix estale with btrfs send
...t the orphan
+ * cleanup has been done and committed since we search the commit root,
+ * so check its commit root transid with our otransid and if they match
+ * commit the transaction to make sure everything is updated.
+ */
+ down_read(&send_root->fs_info->extent_commit_sem);
+ if (btrfs_header_generation(send_root->commit_root) ==
+ btrfs_root_otransid(&send_root->root_item)) {
+ struct btrfs_trans_handle *trans;
+
+ up_read(&send_root->fs_info->extent_commit_sem);
+
+ trans = btrfs_attach_transaction_barrier(send_root);
+ if (IS_ERR(trans)) {
+ if (PTR_ERR(trans) != -...
2013 Sep 01
0
Unmountable filesystem parent transid verify failed
...t: Assertion `!(level == 0)'' failed.
Aborted
mount -o ro,recovery fails
# mount -o ro,recovery /dev/sde /DATA
mount: wrong fs type, bad option, bad superblock on /dev/sde,
...
# btrfs-zero-log /dev/sde
eventually fails with :
btrfs-zero-log: ctree.c:342: __btrfs_cow_block: Assertion
`!(btrfs_header_generation(buf) > trans->transid)'' failed.
Aborted
What should I try next?
regards
ronnie sahlberg
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordo...
2011 Aug 06
0
help recover from unmountable btrfs
...t;fd,
+ (unsigned long long)buf->dev_bytenr);
+ }
free(result);
return 1;
}
@@ -165,6 +181,31 @@ static int verify_parent_transid(struct extent_io_tree *io_tree,
(unsigned long long)eb->start,
(unsigned long long)parent_transid,
(unsigned long long)btrfs_header_generation(eb));
+ fprintf(stderr, "dd if=(fd %i) bs=1c skip=%llu count=8 | od -t x1:\n%02x %02x %02x %02x %02x %02x %02x %02x\n",
+ eb->fd,
+ (unsigned long long)eb->dev_bytenr
+ + offsetof (struct btrfs_header, generation),
+ (__u8)eb->data[offsetof (struct btrfs_header, generation)],...
2008 Sep 25
0
[PATCH 2/4] Add shared reference cache
...level = btrfs_header_level(buf);
nritems = btrfs_header_nritems(buf);
@@ -1114,7 +1124,7 @@
goto out;
}
- ref->root_gen = root->root_key.offset;
+ ref->root_gen = root_gen;
ref->bytenr = buf->start;
ref->owner = btrfs_header_owner(buf);
ref->generation = btrfs_header_generation(buf);
@@ -1143,8 +1153,7 @@
info++;
}
- BUG_ON(!root->ref_tree);
- ret = btrfs_add_leaf_ref(root, ref);
+ ret = btrfs_add_leaf_ref(root, ref, shared);
WARN_ON(ret);
btrfs_free_leaf_ref(root, ref);
}
diff -r 47aa0c51998a ref-cache.c
--- a/ref-cache.c Thu Sep 25 16:00:36 2008 +...
2012 Jun 21
0
[RFC PATCH V2] Btrfs: introduce extent buffer cache for each i-node
...fs_header_level(cached_eb);
+ p->nodes[level] = cached_eb;
+ p->locks[level] = root_lock;
+
+ if (root->objectid == BTRFS_TREE_LOG_OBJECTID &&
+ (btrfs_header_owner(cached_eb) != BTRFS_TREE_LOG_OBJECTID ||
+ cached_eb->root_objectid != root->root_key.offset ||
+ btrfs_header_generation(cached_eb) != trans->transid)) {
+ btrfs_release_path(p);
+ return -ERESTART;
+ } else if (root->objectid != cached_eb->root_objectid ||
+ btrfs_header_owner(cached_eb) != root->objectid ||
+ (cow &&
+ btrfs_header_generation(cached_eb) != trans->transid)) {
+...
2008 Oct 27
0
[PATCH 3/4] update nodatacow code
...f (ref_root != root->root_key.objectid &&
+ ref_root != BTRFS_TREE_LOG_OBJECTID) {
+ ret = 1;
goto out;
-
- if (ref_count != 1) {
+ }
+ if (btrfs_ref_generation(leaf, ref_item) <= last_snapshot) {
ret = 1;
goto out;
}
- if (level >= 0)
- ref_generation = btrfs_header_generation(eb);
+
+ path->slots[0]++;
}
ret = 0;
out:
- if (path)
- btrfs_free_path(path);
+ btrfs_free_path(path);
return ret;
}
diff -urp 3/fs/btrfs/inode.c 4/fs/btrfs/inode.c
--- 3/fs/btrfs/inode.c 2008-10-27 21:25:18.000000000 +0800
+++ 4/fs/btrfs/inode.c 2008-10-27 21:26:31.000000000 +0800...
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 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
2010 Sep 03
0
[PATCH 1/2] btrfs: document where we use BUG_ON instead of error handling
...f5 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -355,7 +355,7 @@ static int csum_dirty_buffer(struct btrfs_root *root, struct page *page)
eb = alloc_extent_buffer(tree, start, len, page, GFP_NOFS);
ret = btree_read_extent_buffer_pages(root, eb, start + PAGE_CACHE_SIZE,
btrfs_header_generation(eb));
- BUG_ON(ret);
+ btrfs_fixable_bug_on(ret);
found_start = btrfs_header_bytenr(eb);
if (found_start != start) {
WARN_ON(1);
@@ -666,7 +666,7 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_inf...
2011 Jun 10
6
[PATCH v2 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 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
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 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