On Mon, Apr 27, 2015 at 11:11:36PM -0700, Joshua Schmidlkofer wrote:
> I have a large-ish filesystem, and it's starting to cause problems
> after some SATA errors.
>
> After scrubs stalled, and reading of people with similar errors, I
> downloaded the latest btrfs-progs and attempted a btrfsck - i
I have a 3 disks file system configured in RAID1, created with Ubuntu
::
> Having not a spare disk, and being the file system
> a RAID1, I decided to use one of the 3 disks as target for the
> restore. I formatted it in EXT4 and tried the restore. The process
::
[liveuser@localhost ~]$ sudo
I am running kernel 4.0 and btrfs-prog mainline. I have a backup.
Of the following commands:
btrfs check —repair device
btrfsck —repair device
mount -t btrfs -o recovery device mount && btrfs scrub start mount
--none of them remove the "parent transid verify failed” errors from the disk.
The d
Thank you for your support, Duncan, and for your clear explanation
about the concept of backup. I have very few data in that file system
that I would miss if lost, because basically that file system serves
as backup server and generic file storage. At the early stage of the
incident, I was hoping t
Thank you Anand, but, if I'm not wrong, the "delete device" has to be
run against a mount point. But my file system can't be mounted.
2015-04-28 11:20 GMT+02:00 Anand Jain :
>
>> I have a 3 disks file system configured in RAID1, created with Ubuntu
>
>
> ::
>
>> Having not a spare disk, and being
I'm now running ram tests today. After that, I can get the metadata
dump and the debug command. Tonight, I will get you this info.
Thank you for your help.
Sincerely,
Joshua
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kerne
Original Message
Subject: Re: [PATCH 00/18] New extent-oriented qgroup mechanism with
minor cleanup
From: Shilong Wang
To: Qu Wenruo
Date: 2015年04月21日 15:24
*Hi Qu,
Look cleaner logic for me.^_^
Just two points from me.*
2015-04-21 14:21 GMT+08:00 Qu Wenruo mailto:quwe
[BRIEF]
This patchset mainly introduces a new qgroup mechanism, which is
originally used to fix a bug in fstest/btrfs/057.
[WORKFLOW]
The new mechanism works like the following:
0) Previous transaction is done.
The new mechanism highly depends on commit_transaction.
So without commit_transac
Add function btrfs_qgroup_prepare_account_extents() to get old_roots
which are needed for qgroup.
We do it in commit_transaction() and before switch_roots(), and only
search commit_root, so it gives a quite accurate view for previous
transaction.
With old_roots from previous transaction, we can u
This function will delete unode with given (val,aux) pair.
And with this patch, seqnum for debug usage doesn't have any meaning
now, so remove them.
This is used by later patches to skip snapshot root.
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/ulist.c | 47 +++
Add hook in add_delayed_ref_head() to record quota-related extent record
into delayed_ref_root->dirty_extent_record rb-tree for later qgroup
accounting.
Signed-off-by: Qu Wenruo
---
v2:
Skip extent_op qrecord allocation.
Skip qrecord allocation for quota disabled case.
---
fs/btrfs/delayed
__btrfs_inc_extent_ref() and __btrfs_free_extent() have already had too
many parameters, but three of them can be extracted from
btrfs_delayed_ref_node struct.
So use btrfs_delayed_ref_node struct as a single parameter to replace
the bytenr/num_byte/no_quota parameters.
The real objective of this
Make snapshot accounting work with new extent-oriented mechanism by
skipping given root in new/old_roots in create_pending_snapshot().
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/transaction.c | 53 +++---
1 file changed, 33 insertions(+), 20
Goodbye, the old mechanisim.
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/ctree.h | 2 +-
fs/btrfs/extent-tree.c | 5 -
fs/btrfs/qgroup.c| 905 +--
fs/btrfs/qgroup.h| 49 ---
include/trace/events/btrfs
Since the self test transaction don't have delayed_ref_roots, so use
find_all_roots() and export btrfs_qgroup_account_extent() to simulate it
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/qgroup.c | 2 +-
fs/btrfs/qgroup.h | 5 ++
fs/btrfs/tests/qgroup-tests.c
This is used by later qgroup fix patches for snapshot.
As current snapshot accounting is done by btrfs_qgroup_inherit(), but
new extent oriented quota mechanism will account extent from
btrfs_copy_root() and other snapshot things, causing wrong result.
So add this ability to handle snapshot accou
Switch from old ref_node based qgroup to extent based qgroup mechanism
for normal operations.
The new mechanism should hugely reduce the overhead of btrfs quota
system, and further more, the codes and logic should be more clean and
easier to maintain.
Signed-off-by: Qu Wenruo
---
v2:
None
---
This function is used to update refcnt for qgroups.
And is one of the two core functions used in the new qgroup implement.
This is based on the old update_old/new_refcnt, but provides a unified
logic and behavior.
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/qgroup.c | 58 ++
The new btrfs_qgroup_account_extents() function should be called in
btrfs_commit_transaction() and it will update all the qgroup according
to delayed_ref_root->dirty_extent_root.
The new function can handle both normal operation during
commit_transaction() or in rescan in a unified method with cle
Switch rescan to use the new new extent oriented mechanism.
As rescan is also based on extent, new mechanism is just a perfect match
for rescan.
With re-designed internal functions, rescan is quite easy, just call
btrfs_find_all_roots() and then btrfs_qgroup_account_one_extent().
Signed-off-by:
This patch replace the rbtree used in ref_head to list.
This has the following advantage:
1) Easier merge logic.
With the new list implement, we only need to care merging the tail
ref_node with the new ref_node.
And this can be done quite easy at insert time, no need to do a
indicated merge at run_
Use inline functions to do such things, to improve readability.
Signed-off-by: Qu Wenruo
Acked-by: David Sterba
---
v2:
None
---
fs/btrfs/qgroup.c | 95 +++
1 file changed, 54 insertions(+), 41 deletions(-)
diff --git a/fs/btrfs/qgroup.c b/
Allow btrfs_find_all_roots() to skip all delayed_ref_head lock and tree
lock to do tree search.
This is important for later qgroup implement which will call
find_all_roots() after fs trees are committed.
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/backref.c | 35 +++
Add function qgroup_update_counters(), which will update related
qgroups' rfer/excl according to old/new_roots.
This is one of the two core functions for the new qgroup implement.
This is based on btrfs_adjust_coutners() but with clearer logic and
comment.
Signed-off-by: Qu Wenruo
---
v2:
Non
Cleanup the rb_tree merge/insert/update functions, since now we use list
instead of rb_tree now.
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/delayed-ref.c | 174 -
1 file changed, 174 deletions(-)
diff --git a/fs/btrfs/delayed-ref.c b/fs/
Old __merge_refs() in backref.c will even merge refs whose root_id are
different, which makes qgroup gives wrong result.
Fix it by checking ref_for_same_block() before any mode specific works.
Signed-off-by: Qu Wenruo
---
v2:
None
---
fs/btrfs/backref.c | 6 +++---
1 file changed, 3 insertio
26 matches
Mail list logo