Re: [PATCH] btrfs-porgs: fix xfstest btrfs/023 random failure

2014-07-31 Thread Anand Jain
On 29/07/2014 20:57, David Sterba wrote: On Thu, Jul 17, 2014 at 05:28:24PM +0800, Anand Jain wrote: xfstest btrfs/023 which does the following tests create_group_profile raid0 check_group_profile RAID0 create_group_profile raid1 check_group_profile RAID1 create_group_profile raid10

Re: [PATCH] btrfs: replace seed device followed by unmount causes kernel WARNING

2014-07-31 Thread Anand Jain
On 30/07/2014 15:42, Miao Xie wrote: On Fri, 25 Jul 2014 20:33:34 +0800, Anand Jain wrote: After the seed device has been replaced the new target device is no more a seed device. So we need to bring that state in the fs_devices. reproducer: mount /dev/sdb /btrfs btrfs dev add /dev/sdc /btrfs

Re: [PATCH] Remove certain calls for releasing page cache

2014-07-31 Thread Hugo Mills
On Wed, Jul 30, 2014 at 10:05:16PM -0400, Nick Krause wrote: On Wed, Jul 30, 2014 at 7:30 PM, Dave Airlie airl...@gmail.com wrote: This patch removes the lines for releasing the page cache in certain files as this may aid in perfomance with writes in the compression rountines of btrfs.

Is Btrfs stable ?

2014-07-31 Thread Cyril Scetbon
Hi, I'm sorry cause I suppose it's a recurrent question. However I've been looking into the linux kernel code and didn't see anything concerning an experimental status for Btrfs. However, when I format a device with mkfs.btrfs I get a message saying it's experimental that comes from

[PATCH] Btrfs: return path with unlocked nodes in btrfs_next_leaf

2014-07-31 Thread Filipe Manana
Calling unlock_up() to release our new path doesn't release the read lock on the node at level 1, because our return path has path-slots[0] == 0, which makes unlock_up() skip unlocking that node. Since we don't need to return that node locked, call btrfs_unlock_up_safe() instead of unlock_up(),

Re: [PATCH] btrfs-porgs: fix xfstest btrfs/023 random failure

2014-07-31 Thread David Sterba
On Thu, Jul 31, 2014 at 03:07:39PM +0800, Anand Jain wrote: and the fsync just made the race window smaller. If you still think the fsync is useful, please update the changelog. You mean I should put fsync at more correct places ? The fsync should not be necessary, but I haven't looked

Re: Work Queue for btrfs compression writes

2014-07-31 Thread Theodore Ts'o
On Wed, Jul 30, 2014 at 10:36:57AM -0400, Peter Hurley wrote: Where is that git tree? I've been planning to set up a unit test and regression suite for tty/serial, and wouldn't mind cribbing the infrastructure from someone's existing work.

[PATCH] btrfs-progs: mkfs: remove experimental tag

2014-07-31 Thread David Sterba
Make it consistent with kernel status and documentation. Signed-off-by: David Sterba dste...@suse.cz --- mkfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/mkfs.c b/mkfs.c index 16e92221a547..538b6e6837b2 100644 --- a/mkfs.c +++ b/mkfs.c @@ -1439,8 +1439,8 @@ int

Re: [PATCH v2] btrfs-progs: correct manpage option description for scrub

2014-07-31 Thread David Sterba
On Thu, Jul 31, 2014 at 09:25:07AM +0800, Gui Hecheng wrote: On Wed, 2014-07-30 at 10:26 +, Duncan wrote: Gui Hecheng posted on Wed, 30 Jul 2014 15:32:05 +0800 as excerpted: Also, add description of the potential failure as follows If a scrub is already running running, it

[PATCH v2] Btrfs: race free update of commit root for ro snapshots

2014-07-31 Thread Filipe Manana
This is a better solution for the problem addressed in the following commit: Btrfs: update commit root on snapshot creation after orphan cleanup (3821f348889e506efbd268cc8149e0ebfa47c4e5) The previous solution wasn't the best because of 2 reasons: 1) It added another full

Re: Machine lockup due to btrfs-transaction on AWS EC2 Ubuntu 14.04

2014-07-31 Thread Peter Waller
I've now reproduced this on 3.15.7-031507-generic and 3.16.0-031600rc7-generic, and have a test case where I can reliably cause the crash after about 30 seconds of disk activity. The test case just involves taking a directory tree of ~400GB of files and copying every file to a new one with .new

Re: Machine lockup due to btrfs-transaction on AWS EC2 Ubuntu 14.04

2014-07-31 Thread Peter Waller
I should add that I have reproduced this even after doing `mount -o clear_cache /dev/... /mnt/...`, unmount, remount with `-o space_cache`. After the machine lockup and rebooting there are the warnings of the form: [ 117.288248] BTRFS warning (device dm-0): block group 694165700608 has wrong

btrfs on bcache

2014-07-31 Thread dptrash
Concerning http://thread.gmane.org/gmane.comp.file-systems.btrfs/31018, does this bug still exists? Kernel 3.14 B: 2x HDD 1 TB C: 1x SSD 256 GB # make-bcache -B /dev/sda /dev/sdb -C /dev/sdc --cache_replacement_policy=lru # mkfs.btrfs -d raid1 -m raid1 -L BTRFS_RAID /dev/bcache0 /dev/bcache1 I

Re: [PATCH] Remove certain calls for releasing page cache

2014-07-31 Thread Nick Krause
On Thu, Jul 31, 2014 at 6:11 AM, Hugo Mills h...@carfax.org.uk wrote: On Wed, Jul 30, 2014 at 10:05:16PM -0400, Nick Krause wrote: On Wed, Jul 30, 2014 at 7:30 PM, Dave Airlie airl...@gmail.com wrote: This patch removes the lines for releasing the page cache in certain files as this may aid

[PATCH] Add support to check for FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_ZERO_RANGE crap modes

2014-07-31 Thread Nicholas Krause
This adds checks for the stated modes as if they are crap we will return error not supported. Signed-off-by: Nicholas Krause xerofo...@gmail.com --- fs/btrfs/file.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 1f2b99c..599495a

Implement new FALLOC_FL_* modes

2014-07-31 Thread Nick Krause
I am doing this project from the btrfs wiki, since I am new after reading the code using lxr I am wondering if we can base the code off that already in ext4 for these modes as they seem to work rather well. I am wondering through as a newbie some of the data structures are ext4 based and the same

Re: [PATCH] Add support to check for FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_ZERO_RANGE crap modes

2014-07-31 Thread Hugo Mills
On Thu, Jul 31, 2014 at 01:53:33PM -0400, Nicholas Krause wrote: This adds checks for the stated modes as if they are crap we will return error not supported. You've just enabled two options, but you haven't actually implemented the code behind it. I would tell you *NOT* to do anything else

Re: Implement new FALLOC_FL_* modes

2014-07-31 Thread Hugo Mills
On Thu, Jul 31, 2014 at 02:08:15PM -0400, Nick Krause wrote: I am doing this project from the btrfs wiki, since I am new after reading the code using lxr I am wondering if we can base the code off that already in ext4 for these modes as they seem to work rather well. I am wondering through as

[PATCH] Btrfs: ensure tmpfile inode is always persisted with link count of 0

2014-07-31 Thread Filipe Manana
If we open a file with O_TMPFILE, don't do any further operation on it (so that the inode item isn't updated) and then force a transaction commit, we get a persisted inode item with a link count of 1, and not 0 as it should be. Steps to reproduce it (requires a modern xfs_io with -T support):

[PATCH] xfstests: add regression test for btrfs send with orphans

2014-07-31 Thread Filipe Manana
Regression test for a btrfs issue where we create a RO snapshot to use for a send operation, which fails with a -ESTALE error, due to the presence of orphan inodes accessible through the snapshot's commit root but no longer present through the main root. This issue is fixed by the following linux

Btrfs offline deduplication

2014-07-31 Thread Timofey Titovets
Good time of day. I have several questions about data deduplication on btrfs. Sorry if i ask stupid questions or waste you time %) What about implementation of offline data deduplication? I don't see any activity on this place, may be i need to ask a particular person? Where the problem? May be a

Re: [PATCH] Add support to check for FALLOC_FL_COLLAPSE_RANGE and FALLOC_FL_ZERO_RANGE crap modes

2014-07-31 Thread Nick Krause
On Thu, Jul 31, 2014 at 3:09 PM, Hugo Mills h...@carfax.org.uk wrote: On Thu, Jul 31, 2014 at 01:53:33PM -0400, Nicholas Krause wrote: This adds checks for the stated modes as if they are crap we will return error not supported. You've just enabled two options, but you haven't actually

Re: btrfs on bcache

2014-07-31 Thread Duncan
dptrash posted on Thu, 31 Jul 2014 17:35:44 +0200 as excerpted: Concerning http://thread.gmane.org/gmane.comp.file-systems.btrfs/31018, does this bug still exists? Kernel 3.14 B: 2x HDD 1 TB C: 1x SSD 256 GB # make-bcache -B /dev/sda /dev/sdb -C /dev/sdc --cache_replacement_policy=lru #

Re: Implement new FALLOC_FL_* modes

2014-07-31 Thread Nick Krause
On Thu, Jul 31, 2014 at 3:12 PM, Hugo Mills h...@carfax.org.uk wrote: On Thu, Jul 31, 2014 at 02:08:15PM -0400, Nick Krause wrote: I am doing this project from the btrfs wiki, since I am new after reading the code using lxr I am wondering if we can base the code off that already in ext4 for

[PATCH 1/2 v3] btrfs-progs: introduce test_issubvolname() for simplicity

2014-07-31 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com There are many duplicated codes to check if the given string is correct subvolume name. Introduce test_issubvolname() for this purpose for simplicity. Signed-off-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Cc: David Sterba

[PATCH 2/2] btrfs-progs: move test_isdir() to utils.c

2014-07-31 Thread Satoru Takeuchi
From: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com Since test_isdir() is a utility function, it's better to move it to utils.c. In addition, const char * is more appropriate type as its path argument because this argument is not changed in this function. Signed-off-by: Satoru Takeuchi

Re: [PATCH] btrfs-progs: mkfs: remove experimental tag

2014-07-31 Thread Satoru Takeuchi
(2014/07/31 21:21), David Sterba wrote: Make it consistent with kernel status and documentation. Signed-off-by: David Sterba dste...@suse.cz Reviewed-by: Satoru Takeuchi takeuchi_sat...@jp.fujitsu.com I'm glad to see this patch :-) Thanks, Satoru --- mkfs.c | 5 ++--- 1 file changed,

Help with btrfs_zero_range function

2014-07-31 Thread Nick Krause
Hey Guys, I need to ask a question again, I am writing the above function and basing it off the one of punch hole. I have only started writing the function and have a few questions about how to write this. Below this message are my questions so fair and I also posting my written code in case you

[PATCH] btrfs: SSD related mount option dependency rework.

2014-07-31 Thread Qu Wenruo
According to Documentations/filesystem/btrfs.txt, ssd/ssd_spread/nossd has their own dependency(See below), but only ssd_spread implying ssd is implemented. ssd_spread implies ssd, conflicts nossd. ssd conflicts nossd. nossd conflicts ssd and ssd_spread. This patch adds ssd{,_spread} confliction

Re: [PATCH v2] common: get fs type again using device canonical name in _fs_type

2014-07-31 Thread Eryu Guan
On Fri, Aug 01, 2014 at 10:21:59AM +1000, Dave Chinner wrote: On Thu, Jul 31, 2014 at 06:52:37PM +0800, Eryu Guan wrote: When testing with lvm, a previous btrfsck run could change df output from something like /dev/mapper/rhel_hp--dl388eg8--01-testlv1 btrfs 15728640 900 13602172 1%

Re: [PATCH v2] common: get fs type again using device canonical name in _fs_type

2014-07-31 Thread Dave Chinner
On Fri, Aug 01, 2014 at 12:02:41PM +0800, Eryu Guan wrote: On Fri, Aug 01, 2014 at 10:21:59AM +1000, Dave Chinner wrote: On Thu, Jul 31, 2014 at 06:52:37PM +0800, Eryu Guan wrote: When testing with lvm, a previous btrfsck run could change df output from something like

Re: [PATCH v2] common: get fs type again using device canonical name in _fs_type

2014-07-31 Thread Eryu Guan
On Fri, Aug 01, 2014 at 02:49:10PM +1000, Dave Chinner wrote: On Fri, Aug 01, 2014 at 12:02:41PM +0800, Eryu Guan wrote: On Fri, Aug 01, 2014 at 10:21:59AM +1000, Dave Chinner wrote: On Thu, Jul 31, 2014 at 06:52:37PM +0800, Eryu Guan wrote: When testing with lvm, a previous btrfsck run