Remounting read-write after error is not allowed

2017-04-13 Thread Alexandru Guzu
Hello, I am not sure how to better summarize this but I'll give a more detailed description. I am using btrfs tools v4.4, I setup up a btrfs partition on an external USB2 drive and I started to play with it. The partition was about HALF full when I decided to run duperemove on it. This took a whi

Re: Encountered kernel bug#72811. Advice on recovery?

2017-04-13 Thread Duncan
Ank Ular posted on Thu, 13 Apr 2017 14:49:41 -0400 as excerpted: > I've encountered kernel bug#72811 "If a raid5 array gets into degraded > mode, gets modified, and the missing drive re-added, the filesystem > loses state". > The array normally consists of 22 devices with data and meta in raid6.

[PATCH] Btrfs: tolerate errors if we have retried successfully

2017-04-13 Thread Liu Bo
With raid1 profile, dio read isn't tolerating IO errors if read length is less than the stripe length (64K). This fixes the problem by setting bio's error to 0 if a good copy has been found. Signed-off-by: Liu Bo --- fs/btrfs/inode.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) di

[PATCH] Btrfs: skip checksum verification if IO error occurs

2017-04-13 Thread Liu Bo
Currently dio read also goes to verify checksum if -EIO has been returned, although it usually fails on checksum, it's not necessary at all, we could directly check if there is another copy to read. And with this, the behavior of dio read is now consistent with that of buffered read. Signed-off-b

[PATCH v6 2/2] btrfs: scrub: Fix RAID56 recovery race condition

2017-04-13 Thread Qu Wenruo
When scrubbing a RAID5 which has recoverable data corruption (only one data stripe is corrupted), sometimes scrub will report more csum errors than expected. Sometimes even unrecoverable error will be reported. The problem can be easily reproduced by the following steps: 1) Create a btrfs with RAI

Re: BTRFS not mountable, recover won't work

2017-04-13 Thread Qu Wenruo
At 04/13/2017 07:45 PM, Malte Eggers wrote: On Mon, 2017-04-10 at 16:53 +0800, Qu Wenruo wrote: At 04/10/2017 04:37 PM, Malte Eggers wrote: On Mon, 2017-04-10 at 16:18 +0800, Qu Wenruo wrote: At 04/10/2017 01:17 AM, Malte Eggers wrote: Hi, After suspending and waking up my laptop with th

[PATCH v6 1/2] btrfs: scrub: Introduce full stripe lock for RAID56

2017-04-13 Thread Qu Wenruo
Unlike mirror based profiles, RAID5/6 recovery needs to read out the whole full stripe. And if we don't do proper protect, it can easily cause race condition. Introduce 2 new functions: lock_full_stripe() and unlock_full_stripe() for RAID5/6. Which stores a rb_tree of mutex for full stripes, so s

Re: [PATCH v5 1/2] btrfs: scrub: Introduce full stripe lock for RAID56

2017-04-13 Thread David Sterba
On Mon, Apr 03, 2017 at 10:13:46AM +0800, Qu Wenruo wrote: > Unlike mirror based profiles, RAID5/6 recovery needs to read out the > whole full stripe. > > And if we don't do proper protect, it can easily cause race condition. > > Introduce 2 new functions: lock_full_stripe() and unlock_full_strip

Encountered kernel bug#72811. Advice on recovery?

2017-04-13 Thread Ank Ular
I've encountered kernel bug#72811 "If a raid5 array gets into degraded mode, gets modified, and the missing drive re-added, the filesystem loses state". In my case, I had rebooted my system and one of the drives on my main array did not come up. I was able to mount in degraded mode. I needed to re

Re: [PATCH v4 1/7] btrfs: use blkdev_issue_flush to flush the device cache

2017-04-13 Thread Liu Bo
On Thu, Apr 06, 2017 at 11:22:47AM +0800, Anand Jain wrote: > As of now we do alloc an empty bio and then use the flag REQ_PREFLUSH > to flush the device cache, instead we can use blkdev_issue_flush() > for this puspose. > > Also now no need to check the return when write_dev_flush() is called > w

[PATCH v2] Btrfs: fix reported number of inode blocks

2017-04-13 Thread fdmanana
From: Filipe Manana Currently when there are buffered writes that were not yet flushed and they fall within allocated ranges of the file (that is, not in holes or beyond eof assuming there are no prealloc extents beyond eof), btrfs simply reports an incorrect number of used blocks through the sta

Re: [PATCH v2] btrfs-progs: send-dump: always print a space after path

2017-04-13 Thread Noah Massey
On Wed, Apr 12, 2017 at 7:05 PM, Duncan <1i5t5.dun...@cox.net> wrote: > Evan Danaher posted on Tue, 11 Apr 2017 12:33:40 -0400 as excerpted: > >> I was shocked to discover that 'btrfs receive --dump' doesn't print a >> space after long filenames, so it runs together into the metadata; for >> exampl

Re: Deduplication tools

2017-04-13 Thread Duncan
Marat Khalili posted on Thu, 13 Apr 2017 14:06:07 +0300 as excerpted: > After reading this maillist for a while I became a bit more cautious > about using various BTRFS features, so decided to ask just in case: is > it safe to use out-of-band deduplication tools >

Re: [PATCH v4 0/7] Holistic view of device error at commit flush and related cleanup

2017-04-13 Thread David Sterba
On Thu, Apr 13, 2017 at 04:42:11PM +0800, Anand Jain wrote: > Just want to bring this patch to your notice. It fixes all > the previously commented issues. I got only half way through the patches so far, stay tuned. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in t

Re: BTRFS not mountable, recover won't work

2017-04-13 Thread Malte Eggers
On Mon, 2017-04-10 at 16:53 +0800, Qu Wenruo wrote: > > At 04/10/2017 04:37 PM, Malte Eggers wrote: > > On Mon, 2017-04-10 at 16:18 +0800, Qu Wenruo wrote: > > > > > > At 04/10/2017 01:17 AM, Malte Eggers wrote: > > > > Hi, > > > > > > > > After suspending and waking up my laptop with the extern

Re: Deduplication tools

2017-04-13 Thread Austin S. Hemmelgarn
On 2017-04-13 07:06, Marat Khalili wrote: After reading this maillist for a while I became a bit more cautious about using various BTRFS features, so decided to ask just in case: is it safe to use out-of-band deduplication tools , and which o

Re: BTRFS as a GlusterFS storage back-end, and what I've learned from using it as such.

2017-04-13 Thread Austin S. Hemmelgarn
On 2017-04-12 18:48, Duncan wrote: Austin S. Hemmelgarn posted on Wed, 12 Apr 2017 07:18:44 -0400 as excerpted: On 2017-04-12 01:49, Qu Wenruo wrote: At 04/11/2017 11:40 PM, Austin S. Hemmelgarn wrote: 4. Depending on other factors, compression can actually slow you down pretty significantl

Deduplication tools

2017-04-13 Thread Marat Khalili
After reading this maillist for a while I became a bit more cautious about using various BTRFS features, so decided to ask just in case: is it safe to use out-of-band deduplication tools , and which of them are considered more stable/mainst

Re: btrfs won't mount any more

2017-04-13 Thread Marc Haber
On Tue, Apr 11, 2017 at 06:15:02PM +0200, Adam Borowski wrote: > On Tue, Apr 11, 2017 at 09:15:31AM +0200, Marc Haber wrote: > > I have wrecked another btrfs file system, probably for good this time. > > > > It's a 80 GB filesystem from 2015, in my secondary notebook, on an > > encrypted SSD. The

Re: [PATCH v4 0/7] Holistic view of device error at commit flush and related cleanup

2017-04-13 Thread Anand Jain
Hi David, Just want to bring this patch to your notice. It fixes all the previously commented issues. Thanks, Anand On 04/06/2017 11:22 AM, Anand Jain wrote: These patches adds cleanup of device barrier, q and flush codes. This was needed for the following reasons.. - First of all, Qu a