Re: Adventures in btrfs raid5 disk recovery - update

2016-06-21 Thread Zygo Blaxell
TL;DR: Kernel 4.6.2 causes a world of pain. Use 4.5.7 instead. 'btrfs dev stat' doesn't seem to count "csum failed" (i.e. corruption) errors in compressed extents. On Sun, Jun 19, 2016 at 11:44:27PM -0400, Zygo Blaxell wrote: > Not so long ago, I had a disk fail in a

[PATCH] btrfs: fix disk_i_size update bug when fallocate() fails

2016-06-21 Thread Wang Xiaoguang
When doing truncate operation, btrfs_setsize() will first call truncate_setsize() to set new inode->i_size, but if later btrfs_truncate() fails, btrfs_setsize() will call "i_size_write(inode, BTRFS_I(inode)->disk_i_size)" to reset the inmemory inode size, now bug occurs. It's because for truncate

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-21 Thread Qu Wenruo
Here is the long-waited (simple and theoretical) performance test for dedupe. Such result may be added to btrfs wiki page, as an advice for dedupe use case. The full result can be check from google drive: https://drive.google.com/file/d/0BxpkL3ehzX3pb05WT1lZSnRGbjA/view?usp=sharing [Short

btrfs defrag: success or failure?

2016-06-21 Thread Dmitry Katsubo
Hi everyone, I got the following message: # btrfs fi defrag -r /home ERROR: defrag failed on /home/user/.dropbox-dist/dropbox: Success total 1 failures I feel that something went wrong, but the message is a bit misleading. Anyway: Provided that Dropbox is running in the system, does it mean

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Dmitry Katsubo
On 2016-06-21 15:17, Graham Cobb wrote: > On 21/06/16 12:51, Austin S. Hemmelgarn wrote: >> The scrub design works, but the whole state file thing has some rather >> irritating side effects and other implications, and developed out of >> requirements that aren't present for balance (it might be

Rescue a single-device btrfs instance with zeroed tree root

2016-06-21 Thread Ivan Shapovalov
Hello, So this is another case of "I lost my partition and do not have backups". More precisely, _this_ is the backup and it turned out to be damaged. (The backup was made by partclone.btrfs. Together with a zeroed out tree root, this asks for a bug in partclone...) So: the tree root is zeroes,

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-21 Thread Chandan Rajendra
On Tuesday, June 21, 2016 11:34:57 AM David Sterba wrote: > On Tue, Jun 21, 2016 at 05:26:23PM +0800, Qu Wenruo wrote: > > > Yeah, but I'm now concerned about the way both will be integrated in the > > > development or preview branches, not really the functionality itself. > > > > > > Now the

скороговорка суждении употреблен

2016-06-21 Thread Станислава Силина
хомяком стары ран презентировал примелькались влетел покорнейшую сдобные доноса настаив мес вскакивали дроздихи насолил подмигивал фарфора блажным проглотим погуляли полонезы нашедшим соединял исколоть ростовщики контракта година сбираю удовлетворены стесняющимся умилительно покопаюсь яством тре

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Lionel Bouton
Le 21/06/2016 15:17, Graham Cobb a écrit : > On 21/06/16 12:51, Austin S. Hemmelgarn wrote: >> The scrub design works, but the whole state file thing has some rather >> irritating side effects and other implications, and developed out of >> requirements that aren't present for balance (it might be

[PATCH] btrfs-progs: add option to run balance as daemon

2016-06-21 Thread Austin S. Hemmelgarn
Currently, balance operations are run synchronously in the foreground. This is nice for interactive management, but is kind of crappy when you start looking at automation and similar things. This patch adds an option to `btrfs balance start` to tell it to daemonize prior to running the balance

can't use btrfs on USB-stick (write errors)

2016-06-21 Thread Tomasz Chmielewski
I've tried to use btrfs on USB-stick, but unfortunately it fails with write errors. The below is for kernel 4.4; I've tried with 4.6.2, and it fails in a similar way. I'm not sure how to reliably reproduce it, but it seems to me it has something to do with: - plenty of random writes -

Re: [Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros

2016-06-21 Thread Arnd Bergmann
On Monday, June 20, 2016 11:03:01 AM CEST you wrote: > On Sun, Jun 19, 2016 at 5:26 PM, Deepa Dinamani > wrote: > > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC > > macros. > Gcc handles 8-byte structure returns (on most architectures) by >

Re: [PATCH v2 5/6] fstests: btrfs: test RAID1 device reappear and balanced

2016-06-21 Thread Eryu Guan
On Wed, Jun 15, 2016 at 04:48:47PM +0800, Anand Jain wrote: > From: Anand Jain > > The test does the following: > Initialize a RAID1 with some data > > Re-mount RAID1 degraded with _dev1_ and write up to > half of the FS capacity If test devices are big enough,

Re: [PATCH v2 2/2] btrfs: wait for bdev put

2016-06-21 Thread Chris Mason
On 06/21/2016 06:24 AM, Anand Jain wrote: From: Anand Jain Further to the commit bc178622d40d87e75abc131007342429c9b03351 btrfs: use rcu_barrier() to wait for bdev puts at unmount This patch implements a method to time wait on the __free_device() which

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Graham Cobb
On 21/06/16 12:51, Austin S. Hemmelgarn wrote: > The scrub design works, but the whole state file thing has some rather > irritating side effects and other implications, and developed out of > requirements that aren't present for balance (it might be nice to check > how many chunks actually got

Re: [PATCH v2 1/6] fstests: btrfs: add functions to set and reset required number of SCRATCH_DEV_POOL

2016-06-21 Thread Eryu Guan
On Wed, Jun 15, 2016 at 04:46:03PM +0800, Anand Jain wrote: > From: Anand Jain > > This patch provides functions > _scratch_dev_pool_get() > _scratch_dev_pool_put() > > Which will help to set/reset SCRATCH_DEV_POOL with the required > number of devices.

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Zygo Blaxell
On Tue, Jun 21, 2016 at 07:24:24AM -0400, Austin S. Hemmelgarn wrote: > (for example, you can't easily start a balance on a remote > system via a ssh command, which is the specific use case I have). Wait, what? ssh remotehost -n btrfs balance start -d... -m... /foo \& or ssh

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Hugo Mills
On Tue, Jun 21, 2016 at 07:24:24AM -0400, Austin S. Hemmelgarn wrote: > On 2016-06-21 04:55, Duncan wrote: > >Dmitry Katsubo posted on Mon, 20 Jun 2016 18:33:54 +0200 as excerpted: > > > >>Dear btfs community, > >> > >>I have added a drive to existing raid1 btrfs volume and decided to > >>perform

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Austin S. Hemmelgarn
On 2016-06-21 07:33, Hugo Mills wrote: On Tue, Jun 21, 2016 at 07:24:24AM -0400, Austin S. Hemmelgarn wrote: On 2016-06-21 04:55, Duncan wrote: Dmitry Katsubo posted on Mon, 20 Jun 2016 18:33:54 +0200 as excerpted: Dear btfs community, I have added a drive to existing raid1 btrfs volume and

Re: [PATCH v2 2/2] btrfs: wait for bdev put

2016-06-21 Thread Holger Hoffstätte
On 06/21/16 12:24, Anand Jain wrote: > From: Anand Jain > > Further to the commit > bc178622d40d87e75abc131007342429c9b03351 > btrfs: use rcu_barrier() to wait for bdev puts at unmount > > This patch implements a method to time wait on the __free_device() >

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Austin S. Hemmelgarn
On 2016-06-21 04:55, Duncan wrote: Dmitry Katsubo posted on Mon, 20 Jun 2016 18:33:54 +0200 as excerpted: Dear btfs community, I have added a drive to existing raid1 btrfs volume and decided to perform balancing so that data distributes "fairly" among drives. I have started "btrfs balance

Re: Confusing output from fi us/df

2016-06-21 Thread Duncan
Hans van Kranenburg posted on Tue, 21 Jun 2016 02:25:20 +0200 as excerpted: > On 06/21/2016 01:30 AM, Marc Grondin wrote: >> >> I have a btrfs filesystem ontop of a 4x1tb mdraid raid5 array and I've >> been getting confusing output on metadata usage. Seems that even tho >> both data and metadata

[PATCH v2 2/2] btrfs: wait for bdev put

2016-06-21 Thread Anand Jain
From: Anand Jain Further to the commit bc178622d40d87e75abc131007342429c9b03351 btrfs: use rcu_barrier() to wait for bdev puts at unmount This patch implements a method to time wait on the __free_device() which actually does the bdev put. This is needed as the

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-21 Thread David Sterba
On Tue, Jun 21, 2016 at 05:26:23PM +0800, Qu Wenruo wrote: > > Yeah, but I'm now concerned about the way both will be integrated in the > > development or preview branches, not really the functionality itself. > > > > Now the conflicts are not trivial, so this takes extra time on my side > > and I

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-21 Thread Qu Wenruo
At 06/21/2016 05:13 PM, David Sterba wrote: On Tue, Jun 21, 2016 at 08:36:49AM +0800, Qu Wenruo wrote: I'm looking how well does this patchset merges with the rest, so far there are excpected conflicts with Chandan's subpage-blocksize patchset. For the easy parts, we can add stub patches to

Re: [PATCH v11 00/13] Btrfs dedupe framework

2016-06-21 Thread David Sterba
On Tue, Jun 21, 2016 at 08:36:49AM +0800, Qu Wenruo wrote: > > I'm looking how well does this patchset merges with the rest, so far > > there are excpected conflicts with Chandan's subpage-blocksize > > patchset. For the easy parts, we can add stub patches to extend > > functions like

Re: Is "btrfs balance start" truly asynchronous?

2016-06-21 Thread Duncan
Dmitry Katsubo posted on Mon, 20 Jun 2016 18:33:54 +0200 as excerpted: > Dear btfs community, > > I have added a drive to existing raid1 btrfs volume and decided to > perform balancing so that data distributes "fairly" among drives. I have > started "btrfs balance start", but it stalled for