Re: Incremental backup for a raid1

2014-03-14 Thread Duncan
Michael Schuerig posted on Thu, 13 Mar 2014 20:12:44 +0100 as excerpted: My backup use case is different from the what has been recently discussed in another thread. I'm trying to guard against hardware failure and other causes of destruction. I have a btrfs raid1 filesystem spread over two

Re: discard synchronous on most SSDs?

2014-03-14 Thread Chris Samuel
On Thu, 13 Mar 2014 09:39:02 PM Chris Murphy wrote: smartctl -a or -x will tell you what SATA revision is in place. The queued trim support is in SATA Rev 3.1. I'm not certain if this requires only the drive to support that revision level, or both controller and drive. Both I'd say as I

Re: discard synchronous on most SSDs?

2014-03-14 Thread Chris Samuel
Hi Marc, On Thu, 13 Mar 2014 10:17:50 PM Marc MERLIN wrote: I'm not sure I'm seeing this, which field is that? I *think* you want smartctl -i instead, and look for the field that says something like: ATA Version is: ATA8-ACS, ACS-2 T13/2015-D revision 3 So if my understanding is correct

Re: [PATCH] Btrfs: remove transaction from send

2014-03-14 Thread Hugo Mills
On Thu, Mar 13, 2014 at 10:16:28PM +, Hugo Mills wrote: On Thu, Mar 13, 2014 at 03:42:13PM -0400, Josef Bacik wrote: Lets try this again. We can deadlock the box if we send on a box and try to write onto the same fs with the app that is trying to listen to the send pipe. This is

Re: Incremental backup for a raid1

2014-03-14 Thread Michael Schuerig
On Friday 14 March 2014 06:42:27 Duncan wrote: N-way-mirroring is actually my most hotly anticipated feature for a different reason[2], but for you it would work like this: 1) Setup the 3-way (or 4-way if preferred) mirroring and balance to ensured copies of all data on all devices. 2)

Re: How to view transaction log chronologically, human-readable?

2014-03-14 Thread Marcel Partap
[...] Theoretically, there should be someone on this mailing list capable of answering this question, no? Please feel invited to share your insights ;) #Regards On 01/03/14 02:21, Marcel Partap wrote: Dear BTFRS devs, I have a 1TB btrfs volume mounted read-only since two years because I

UOB-X1H: Message..

2014-03-14 Thread Cham Tao Soon
I have proposal for you. -- To unsubscribe from this list: send the line unsubscribe linux-btrfs in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: Incremental backup for a raid1

2014-03-14 Thread Duncan
Michael Schuerig posted on Fri, 14 Mar 2014 09:56:20 +0100 as excerpted: [Duncan posted...] 3) Disconnect the backup device(s). (Don't btrfs device delete, this would remove the copy. Just disconnect.) Hmm... Looking back at what I wrote... Presumably either have the filesystem unmounted

Re: discard synchronous on most SSDs?

2014-03-14 Thread Duncan
Marc MERLIN posted on Thu, 13 Mar 2014 22:17:50 -0700 as excerpted: On Thu, Mar 13, 2014 at 09:39:02PM -0600, Chris Murphy wrote: On Mar 13, 2014, at 8:11 PM, Marc MERLIN m...@merlins.org wrote: On Sun, Mar 09, 2014 at 11:33:50AM +, Hugo Mills wrote: discard is, except on the very

Re: [PATCH] Btrfs: fix joining same transaction handle more than twice

2014-03-14 Thread Wang Shilong
On 03/13/2014 10:05 PM, Josef Bacik wrote: On 03/13/2014 01:19 AM, Wang Shilong wrote: We hit something like the following function call flows: |-run_delalloc_range() |-btrfs_join_transaction() |-cow_file_range() |-btrfs_join_transaction() |-find_free_extent()

Re: [PATCH] Btrfs: remove transaction from send

2014-03-14 Thread Wang Shilong
Lets try this again. We can deadlock the box if we send on a box and try to write onto the same fs with the app that is trying to listen to the send pipe. This is because the writer could get stuck waiting for a transaction commit which is being blocked by the send. So fix this by making

Re: [PATCH] Btrfs-progs: fsck: disable --init-extent-tree option when using snapshots

2014-03-14 Thread Wang Shilong
Hi Josef, Just ping this again. Did you have any good ideas to rebuild extent tree if broken filesystem is filled with snapshots.? I was working on this recently, i was blocked that i can not verify if an extent is *FULL BACKREF* mode or not. As a *FULL BACKREF* extent's refs can be 1 and more

Re: Incremental backup for a raid1

2014-03-14 Thread George Mitchell
Actually, an interesting concept would be to have the initial two drive RAID 1 mirrored by 2 additional drives in 4-way configuration on a second machine at a remote location on a private high speed network with both machines up 24/7. In that case, if such a configuration would work, either

Re: [PATCH] Btrfs-progs: fsck: disable --init-extent-tree option when using snapshots

2014-03-14 Thread Josef Bacik
On 03/14/2014 09:36 AM, Wang Shilong wrote: Hi Josef, Just ping this again. Did you have any good ideas to rebuild extent tree if broken filesystem is filled with snapshots.? I was working on this recently, i was blocked that i can not verify if an extent is *FULL BACKREF* mode or not.

Re: Incremental backup for a raid1

2014-03-14 Thread Duncan
George Mitchell posted on Fri, 14 Mar 2014 06:46:19 -0700 as excerpted: Actually, an interesting concept would be to have the initial two drive RAID 1 mirrored by 2 additional drives in 4-way configuration on a second machine at a remote location on a private high speed network with both

Re: [PATCH 1/2] btrfs: Cleanup the btrfs_workqueue related function type

2014-03-14 Thread David Sterba
On Thu, Mar 06, 2014 at 04:19:50AM +, quwen...@cn.fujitsu.com wrote: @@ -23,11 +23,13 @@ struct btrfs_workqueue; /* Internal use only */ struct __btrfs_workqueue; +struct btrfs_work; +typedef void (*btrfs_func_t)(struct btrfs_work *arg); I don't see what's wrong with the non-typedef

Re: 3.14.0-rc3: btrfs send/receive blocks btrfs IO on other devices (near deadlocks)

2014-03-14 Thread Josef Bacik
On 03/12/2014 11:18 AM, Marc MERLIN wrote: I have a file server with 4 cpu cores and 5 btrfs devices: Label: btrfs_boot uuid: e4c1daa8-9c39-4a59-b0a9-86297d397f3b Total devices 1 FS bytes used 48.92GiB devid1 size 79.93GiB used 73.04GiB path /dev/mapper/cryptroot Label: varlocalspace

Re: Incremental backup for a raid1

2014-03-14 Thread Austin S Hemmelgarn
On 2014-03-14 09:46, George Mitchell wrote: Actually, an interesting concept would be to have the initial two drive RAID 1 mirrored by 2 additional drives in 4-way configuration on a second machine at a remote location on a private high speed network with both machines up 24/7. In that case,

Re: warn at fs/btrfs/extent-tree.c:5748 __btrfs_free_extent+0x9ce/0xa20

2014-03-14 Thread Josef Bacik
On 03/11/2014 07:44 PM, Sage Weil wrote: Hey, Is this something you guys have seen before? This is from v3.13-rc2. kernel: [49432.696440] WARNING: CPU: 3 PID: 26411 at /srv/autobuild-ceph/gitbuilder.git/build/fs/btrfs/extent-tree.c:5748 __btrfs_free_extent+0x9ce/0xa20 [btrfs]()

Re: warn at fs/btrfs/extent-tree.c:5748 __btrfs_free_extent+0x9ce/0xa20

2014-03-14 Thread Josef Bacik
On 03/14/2014 11:34 AM, Sage Weil wrote: On Fri, 14 Mar 2014, Josef Bacik wrote: On 03/11/2014 07:44 PM, Sage Weil wrote: Hey, Is this something you guys have seen before? This is from v3.13-rc2. kernel: [49432.696440] WARNING: CPU: 3 PID: 26411 at

Re: warn at fs/btrfs/extent-tree.c:5748 __btrfs_free_extent+0x9ce/0xa20

2014-03-14 Thread Filipe David Manana
On Fri, Mar 14, 2014 at 3:35 PM, Josef Bacik jba...@fb.com wrote: On 03/14/2014 11:34 AM, Sage Weil wrote: On Fri, 14 Mar 2014, Josef Bacik wrote: On 03/11/2014 07:44 PM, Sage Weil wrote: Hey, Is this something you guys have seen before? This is from v3.13-rc2. kernel: [49432.696440]

Re: [PATCH] Btrfs: remove transaction from send

2014-03-14 Thread Josef Bacik
On 03/13/2014 06:16 PM, Hugo Mills wrote: On Thu, Mar 13, 2014 at 03:42:13PM -0400, Josef Bacik wrote: Lets try this again. We can deadlock the box if we send on a box and try to write onto the same fs with the app that is trying to listen to the send pipe. This is because the writer could get

Re: discard synchronous on most SSDs?

2014-03-14 Thread Marc MERLIN
On Fri, Mar 14, 2014 at 12:07:54PM +, Duncan wrote: Marc MERLIN posted on Thu, 13 Mar 2014 22:17:50 -0700 as excerpted: On Thu, Mar 13, 2014 at 09:39:02PM -0600, Chris Murphy wrote: On Mar 13, 2014, at 8:11 PM, Marc MERLIN m...@merlins.org wrote: On Sun, Mar 09, 2014 at

Re: discard synchronous on most SSDs?

2014-03-14 Thread Martin K. Petersen
Marc == Marc MERLIN m...@merlins.org writes: Marc, Marc So I have Sata 3.1, that's great news, it means I can keep using Marc discard without worrying about performance and hangs The fact that the drive reports compliance with a certain version of SATA does not in any way imply that it

Re: discard synchronous on most SSDs?

2014-03-14 Thread Holger Hoffstätte
On Fri, 14 Mar 2014 15:57:41 -0400, Martin K. Petersen wrote: So right now I'm afraid we don't have a good way for a user to determine whether a device supports queued trims or not. Mount with discard, unpack kernel tree, sync, rm -rf tree. If it takes several seconds, you have sync discard,

[PATCH] Btrfs: fix race when updating existing ref head

2014-03-14 Thread Filipe David Borba Manana
While we update an existing ref head's extent_op, we're not holding its spinlock, so while we're updating its extent_op contents (key, flags) we can have a task running __btrfs_run_delayed_refs() that holds the ref head's lock and sets its extent_op to NULL right after the task updating the ref

Re: discard synchronous on most SSDs?

2014-03-14 Thread Chris Murphy
On Mar 13, 2014, at 11:17 PM, Marc MERLIN m...@merlins.org wrote: On Thu, Mar 13, 2014 at 09:39:02PM -0600, Chris Murphy wrote: On Mar 13, 2014, at 8:11 PM, Marc MERLIN m...@merlins.org wrote: On Sun, Mar 09, 2014 at 11:33:50AM +, Hugo Mills wrote: discard is, except on the very

Re: [PATCH] Btrfs: fix deadlock with nested trans handles

2014-03-14 Thread Rich Freeman
On Wed, Mar 12, 2014 at 12:34 PM, Rich Freeman r-bt...@thefreemanclan.net wrote: On Wed, Mar 12, 2014 at 11:24 AM, Josef Bacik jba...@fb.com wrote: On 03/12/2014 08:56 AM, Rich Freeman wrote: After a number of reboots the system became stable, presumably whatever race condition btrfs was

Re: [PATCH] Btrfs: remove transaction from send

2014-03-14 Thread Hugo Mills
On Fri, Mar 14, 2014 at 02:51:22PM -0400, Josef Bacik wrote: On 03/13/2014 06:16 PM, Hugo Mills wrote: On Thu, Mar 13, 2014 at 03:42:13PM -0400, Josef Bacik wrote: Lets try this again. We can deadlock the box if we send on a box and try to write onto the same fs with the app that is trying to

btrfs: lock inversion between delayed_node-mutex and found-groups_sem

2014-03-14 Thread Sasha Levin
Hi all, While fuzzing with trinity inside a KVM tools guest running the latest -next kernel I've stumbled on the following: [ 788.451695] = [ 788.452455] [ INFO: possible irq lock inversion dependency detected ] [ 788.453020]

Re: [PATCH] Btrfs-progs: scrub: don't call unlock if pthread_mutex_lock fails

2014-03-14 Thread Rakesh Pandit
Hi, Forgot to mention the reason for change. If accepted this can be included in commit message: On Sat, Mar 15, 2014 at 01:49:45AM +0200, Rakesh Pandit wrote: If pthread_mutex_lock fails (rare but fix it anyway), don't call pthread_mutex_unlock on mutex. Rationale being that if

Re: discard synchronous on most SSDs?

2014-03-14 Thread Chris Samuel
On Fri, 14 Mar 2014 06:33:24 PM Chris Samuel wrote: I *think* you want smartctl -i instead, and look for the field that says something like: ATA Version is: ATA8-ACS, ACS-2 T13/2015-D revision 3 Late night, cut and pasted the wrong line of output, mine says: SATA Version is: SATA 3.0,

Re: discard synchronous on most SSDs?

2014-03-14 Thread Marc MERLIN
On Fri, Mar 14, 2014 at 08:46:09PM +, Holger Hoffstätte wrote: On Fri, 14 Mar 2014 15:57:41 -0400, Martin K. Petersen wrote: So right now I'm afraid we don't have a good way for a user to determine whether a device supports queued trims or not. Mount with discard, unpack kernel tree,