Re: [PATCH] Btrfs: optimize check for stale device

2015-10-07 Thread David Sterba
On Wed, Oct 07, 2015 at 04:59:35PM +0800, Anand Jain wrote: > > @@ -620,7 +620,8 @@ static noinline int device_list_add(const char *path, > > * if there is new btrfs on an already registered device, > > * then remove the stale device entry. > > */ > > -

Re: [PATCH] Btrfs: optimize check for stale device

2015-10-07 Thread David Sterba
On Mon, Oct 05, 2015 at 04:57:17PM +0800, Anand Jain wrote: > 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

Re: [PATCH v2] Btrfs: Check metadata redundancy on balance

2015-10-07 Thread sam tygier
On 05/10/15 03:33, Anand Jain wrote: > > Sam, > > On 10/03/2015 11:50 PM, sam tygier wrote: >> Currently BTRFS allows you to make bad choices of data and >> metadata levels. For example -d raid1 -m raid0 means you can >> only use half your total disk space, but will loose everything >> if 1 disk

Re: [PATCH] Btrfs: fix qgroup sanity tests

2015-10-07 Thread David Sterba
On Mon, Oct 05, 2015 at 11:03:08AM -0400, Josef Bacik wrote: > +#ifdef CONFIG_BTRFS_FS_RUN_SANITY_TESTS > + if (unlikely(test_bit(BTRFS_ROOT_DUMMY_ROOT, >state))) { > + srcu_read_unlock(_info->subvol_srcu, index); > + ret = -ENOENT; > + goto out; > + } >

Using BtrFS and backup tools for keeping two systems in sync

2015-10-07 Thread Shriramana Sharma
Hello. I see there are some backup tools taking advantage of BtrFS's incremental send/receive feature: https://btrfs.wiki.kernel.org/index.php/Incremental_Backup. [BTW Ames Cornish's ButterSink (https://github.com/AmesCornish/buttersink) seems to be missing from that page.] Now I'd like to know

Re: [PATCH v5 8/9] vfs: Add vfs_copy_file_range() support for pagecache copies

2015-10-07 Thread Neil Brown
Anna Schumaker writes: > @@ -1338,34 +1362,26 @@ ssize_t vfs_copy_file_range(struct file *file_in, > loff_t pos_in, > struct file *file_out, loff_t pos_out, > size_t len, unsigned int flags) > { > - struct inode

[PATCH v3] Btrfs: send, fix file corruption due to incorrect cloning operations

2015-10-07 Thread fdmanana
From: Filipe Manana If we have a file that shares an extent with other files, when processing the extent item relative to a shared extent, we blindly issue a clone operation that will target a length matching the length in the extent item and uses as a source some other file

[PATCH] fstests: test btrfs send with shared and compressed extents

2015-10-07 Thread fdmanana
From: Filipe Manana Test that a send operation works correctly for files that have shared extents which are compressed and partially overwritten after they are cloned. This used to fail on btrfs, resulting in different file digests after receiving the send stream, and got

Re: Using BtrFS and backup tools for keeping two systems in sync

2015-10-07 Thread Shriramana Sharma
Hello can you elaborate a bit on the workflow as to how you use svn for that? -- Shriramana Sharma ஶ்ரீரமணஶர்மா श्रीरमणशर्मा

[PATCH V2] Btrfs: add missing brelse when superblock checksum fails

2015-10-07 Thread Anand Jain
Looks like oversight, call brelse() when checksum fails. Further down the code, in the non error path, we do call brelse() and so we don't see brelse() in the goto error paths. Signed-off-by: Anand Jain --- V2: Updated changelog fs/btrfs/disk-io.c | 1 + 1 file changed,

Re: [PATCH] Btrfs: Intialize btrfs_root->highest_objectid when loading tree root and subvolume roots

2015-10-07 Thread David Sterba
On Mon, Oct 05, 2015 at 10:14:24PM +0530, Chandan Rajendra wrote: > + if (unlikely(root->highest_objectid >= BTRFS_LAST_FREE_OBJECTID)) { > + mutex_unlock(>objectid_mutex); > + ret = -ENOSPC; ENOSPC ... I don't think it's right as this could be with a normal enospc

Re: [PATCH] Btrfs: open_ctree: Fix possible memory leak

2015-10-07 Thread David Sterba
On Mon, Oct 05, 2015 at 10:14:25PM +0530, Chandan Rajendra wrote: > After reading one of chunk or tree root tree's root node from disk, if the > root node does not have EXTENT_BUFFER_UPTODATE flag set, we fail to release > the memory used by the root node. Fix this. > > Signed-off-by: Chandan

Re: [RFC][PATCH] btrfs: add ioctl to monitor subvolume dropping

2015-10-07 Thread David Sterba
On Tue, Oct 06, 2015 at 12:42:02PM -0700, Mark Fasheh wrote: > Hmm this isn't working for me, am I doing anything wrong? You are not, there's a bug in the 'subvol sync' command sorry. I found it just yesterday. https://patchwork.kernel.org/patch/7334131/ I'll do a progs release soon with this

Re: [PATCH] btrfs: fix a comment typo

2015-10-07 Thread David Sterba
On Sun, Oct 04, 2015 at 05:05:32PM +0800, Geliang Tang wrote: > Just fix a typo in the code comment. For this kind of changes please CC the 'trivial' tree triv...@kernel.org -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to

[PATCH] btrfs-progs: print root item's last_snapshot value.

2015-10-07 Thread Lakshmipathi.G
Include last_snapshot value in print_root(). With btrfs-debug-tree, it helps to identify whether its a snapshot-ed subvolume or not. Signed-off-by: Lakshmipathi.G --- print-tree.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/print-tree.c

[PATCH v2] Btrfs: send, fix file corruption due to incorrect cloning operations

2015-10-07 Thread fdmanana
From: Filipe Manana If we have a file that shares an extent with other files, when processing the extent item relative to a shared extent, we blindly issue a clone operation that will target a length matching the length in the extent item and uses as a source some other file