Hi all,
Help with recovery of BTRFS home directory data.
I have been using BTRFS happily for an year now. It has worked across
power failures and many such situations.
Last week, however, the filesystem could not be mounted after a power failure.
None of the following methods were helpful
1)
I have 2 SSD with BTRFS filesystem (RAID) on them and several
subvolumes. Each 15 minutes I'm creating read-only snapshot of
subvolumes /root, /home and /web inside /backup.
After this I'm searching for last common subvolume on /backup_hdd,
sending difference between latest common snapshot and
Ángel González wrote on 2016/02/16 01:14 +0100:
Hello everybody
I have a btrfs filesystem [probably] created with btrfs-progs 4.3.1
that is also spewing some hundred of thousand «bad extent [x, y), type
mismatch with chunk» messages on btrfsck.
In fact, there is not only one false alert.
Hello everybody
I have a btrfs filesystem [probably] created with btrfs-progs 4.3.1
that is also spewing some hundred of thousand «bad extent [x, y), type
mismatch with chunk» messages on btrfsck.
The data seems to be fine, so I expect it to be some kind of false
positive. Still, there seems to
On Thu, Feb 11, 2016 at 05:55:30PM +0100, David Sterba wrote:
> The current practical default is ~4k on x86_64 (the logic is more complex,
> simplified for brevity), the inlined files land in the metadata group and
> thus consume space that could be needed for the real metadata.
>
> The inlining
Extend _require_xfs_io_command so that we can pass it a command line
argument to look for, and then use new capabililty in the relevant
tests to ensure that bmap knows how to dump CoW fork contents (bmap -c)
Signed-off-by: Darrick J. Wong
---
common/rc |9
When we're trying to punch alternating blocks out of a file, use the
bsize reported by fstatfs so that we can punch out single blocks.
Signed-off-by: Darrick J. Wong
---
src/punch-alternating.c |7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git
"Invalid argument" is a better response to an impossibly high offset
dedupe request than "extents don't match", so change the test.
Signed-off-by: Darrick J. Wong
---
tests/generic/304.out |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
This is a patch set against the reflink/dedupe test cases in xfstests.
All three patches fix some minor problems in the giant testcase merge
last weekend.
The zeroth patch ought to be Filipe Manana's patch ("fstests:
generic/158, test dedupe with destination offset past EOF") but as he
just
On Fri, Feb 12, 2016 at 07:10:29AM +, Duncan wrote:
> Default?
>
> For those who want to keep the current inline, what's the mkfs.btrfs or
> mount-option recipe to do so? I don't see any code added for that, nor
> am I aware of any current options to change it, yet "default" indicates
>
On Mon, Feb 15, 2016 at 02:38:09PM +0900, Satoru Takeuchi wrote:
> There are some BUG_ON()'s after kmalloc() as follows.
>
> =
> foo = kmalloc();
> BUG_ON(!foo); /* -ENOMEM case */
> =
>
> A Docker + memory cgroup user hit these BUG_ON()s.
>
>
From: Anand Jain
A part of code from btrfs_scan_one_device() is moved to a new function
btrfs_read_disk_super(), so that former function looks cleaner. (In this
process it also moves the code which ensures null terminating label). So
this creates easy opportunity to merge
From: Anand Jain
move a section of btrfs_rm_device() code to check for min number of the
devices into the function __check_raid_min_devices()
Signed-off-by: Anand Jain
Signed-off-by: David Sterba
---
fs/btrfs/volumes.c | 51
From: Anand Jain
Optimize check for stale device to only be checked when there is device
added or changed. If there is no update to the device, there is no need
to call btrfs_free_stale_device().
Signed-off-by: Anand Jain
Signed-off-by: David
From: Anand Jain
This introduces new ioctl BTRFS_IOC_RM_DEV_V2, which uses enhanced struct
btrfs_ioctl_vol_args_v2 to carry devid as an user argument.
The patch won't delete the old ioctl interface and so kernel remains
backward compatible with user land progs.
Test
From: Anand Jain
btrfs_rm_device() has a section of the code which can be replaced
btrfs_find_device_by_user_input()
Signed-off-by: Anand Jain
Signed-off-by: David Sterba
---
fs/btrfs/volumes.c | 100
From: Anand Jain
The operation of device replace and device delete follows same steps upto
some depth with in btrfs kernel, however they don't share codes. This
enhancement will help replace and delete to share codes.
Signed-off-by: Anand Jain
From: Anand Jain
With the previous patches now the btrfs_scratch_superblocks() is ready to
be used in btrfs_rm_device() so use it.
Signed-off-by: Anand Jain
[ use GFP_KERNEL ]
Signed-off-by: David Sterba
---
fs/btrfs/volumes.c |
From: Anand Jain
__check_raid_min_device() which was pealed from btrfs_rm_device()
maintianed its original code to show the block move. This patch cleans up
__check_raid_min_device().
Signed-off-by: Anand Jain
Signed-off-by: David Sterba
From: Anand Jain
The patch renames btrfs_dev_replace_find_srcdev() to
btrfs_find_device_by_user_input() and moves it to volumes.c, so that
delete device can use it.
Signed-off-by: Anand Jain
Signed-off-by: David Sterba
---
Signed-off-by: David Sterba
---
fs/btrfs/volumes.c | 15 +++
fs/btrfs/volumes.h | 2 +-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index ae94e06f3e61..a67249582a6f 100644
--- a/fs/btrfs/volumes.c
+++
For clarity how we are going to find the device, let's call it a device
specifier, devspec for short. Also rename the arguments that are a
leftover from previous function purpose.
Signed-off-by: David Sterba
---
fs/btrfs/dev-replace.c | 2 +-
fs/btrfs/volumes.c | 17
Rename BTRFS_DEVICE_BY_ID so it's more descriptive that we specify the
device by id, it'll be part of the public API. The mask of supported
flags is also renamed, only for internal use.
The error code for unknown flags is EOPNOTSUPP, fixed.
Signed-off-by: David Sterba
---
Underscores are for special functions, use the full prefix for better
stacktrace recognition.
Signed-off-by: David Sterba
---
fs/btrfs/volumes.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index
Before this patch, btrfs_check_raid_min_devices would do an off-by-one
check of the constraints and not the miminmum check, as its name
suggests. This is not a problem if the only caller is device remove, but
would be confusing for others.
Add an argument with the exact number and let the
Hi,
this patchset extends the ioctl arugments to take an id so we can delete a
device by it. It reuses the existing structure btrfs_ioctl_vol_args_v2 and
extends it in na backward-compatible way so that we don't need to introduce
another one.
The core patchset is from Anand, I did some cleanups
We should avoid duplicating the device constraints, let's use the
btrfs_raid_array in btrfs_check_raid_min_devices.
Signed-off-by: David Sterba
---
fs/btrfs/volumes.c | 23 +--
1 file changed, 9 insertions(+), 14 deletions(-)
diff --git
On Mon, Feb 15, 2016 at 05:47:46PM +0100, David Sterba wrote:
> > + struct btrfs_super_block *disk_super = NULL;
>
> disk_super is NULL here and unchanged until ...
>
> > + if (!disk_super) {
>
> ... here, so this will always take this branch
>
> > + ret =
On Sat, Feb 13, 2016 at 10:01:36AM +0800, Anand Jain wrote:
> btrfs_rm_device() has a section of the code which can be replaced
> btrfs_find_device_by_user_input()
>
> Signed-off-by: Anand Jain
> ---
> fs/btrfs/volumes.c | 100
>
On Mon, Feb 15, 2016 at 08:17:32AM +0800, Qu Wenruo wrote:
> Sorry for the late reply.
>
> According to the output of your btrfsck --repair output, things just get
> worse.
>
> So at this point, it's harder to locate the original problem. (Csum
> missing with bad file extents)
>
> IMHO you
From: Filipe Manana
If a bio for a direct IO request fails, we were not setting the error in
the parent bio (the main DIO bio), making us not return the error to
user space in btrfs_direct_IO(), that is, it made __blockdev_direct_IO()
return the number of bytes issued for IO
On Sat, Feb 13, 2016 at 10:01:33AM +0800, Anand Jain wrote:
> move a section of btrfs_rm_device() code to check for min number of the
> devices into the function __check_raid_min_devices()
But this also changes the semantics a bit. In context of device remove
we check if there are going to be
I have a multi-drive raid10 btrfs array that isn't working. When I can
mount it, it is r/o, and before I give it up for lost, I thought I'd
share what happens when I try to run btrfs check.
For starters-
uname -a: Linux palantir 4.4.1-2-ARCH #1 SMP PREEMPT Wed Feb 3 13:12:33
UTC 2016 x86_64
2016-02-08 14:05 GMT+01:00 Qu Wenruo :
> Quite strange.
> IIRC, btrfsck should at least report transid error.
> As written in disk-io.c, verify_parent_transid() function.
>
> Since btrfsck reports no error, I think btrfs-image could dump the metadata
> without problem.
>
>
From: Filipe Manana
Test that if we have a file F1 with two links, one in a directory A and
the other in directory B, if we remove the link in directory B, move some
other file F2 from directory B into directory C, fsync inode F1, power
fail and remount the filesystem, file F2
From: Filipe Manana
We were testing when the source file offset starts at EOF or beyond,
but not when the destination offset is beyond EOF or when the
destination offset is smaller than EOF but destination offset plus
dedup length is greater than EOF.
This is motivated by a
From: Filipe Manana
Test that if we move one file between directories, fsync the parent
directory of the old directory, power fail and remount the filesystem,
the file is not lost and it's located at the destination directory.
This is motivated by a bug found in btrfs, which
From: Filipe Manana
Test that if we fsync a directory that had a snapshot entry in it that
was deleted and crash, the next time we mount the filesystem, the log
replay procedure will not fail and the snapshot is not present anymore.
This issue is fixed by the following patch
38 matches
Mail list logo