btrfs double send

2015-10-24 Thread kolcon
Hello, I would like to do backups based on btrfs send/receive. So I though I would do a transfer over portable HDD and then incremental sends (using -p) over network. Initial : btrfs send "all" (primary HDD) → btrfs receive (portable HDD) → btrfs send/receive (final HDD) Later : btrfs

[PATCH 0/9] vfs: move btrfs clone ioctls to common code

2015-10-24 Thread Peng Tao
Hi all, This patchset moves BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE to common vfs layer and adds NFS42 CLONE support to knfsd. It is based on top of Trond's linux-next branch (a85240d254) and Anna's latest sys_copy_file_range work (v7). With this, btrfs/cifs/nfs all handle CLONE/CLONE_RANGE

[PATCH 1/9] vfs: add COPY_FILE_CLONE_ONLY flag

2015-10-24 Thread Peng Tao
To tell file system not to return partial success in the .copy_file_range method. This is useful to implement the clone (or reflink) functionality. COPY_FILE_CLONE_ONLY is added only to include/linux/fs.h and thus is not exposed to users. We can replace it with something like Anna's

Re: [PATCH v7 0/4] VFS: In-kernel copy system call

2015-10-24 Thread Eric Biggers
A few comments: > if (!(file_in->f_mode & FMODE_READ) || > !(file_out->f_mode & FMODE_WRITE) || > (file_out->f_flags & O_APPEND) || > !file_out->f_op) > return -EBADF; Isn't 'f_op' always non-NULL? If the destination file cannot be append-only,

Re: btrfs double send

2015-10-24 Thread Filipe Manana
On Sat, Oct 24, 2015 at 6:36 PM, wrote: > Hello, > > I would like to do backups based on btrfs send/receive. > > So I though I would do a transfer over portable HDD and then incremental > sends (using -p) over network. > > Initial : > > btrfs send "all" (primary HDD) → btrfs

[PATCH 6/9] cifs: remove private handler of BTRFS_IOC_CLONE

2015-10-24 Thread Peng Tao
BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE is now handled by generic layer and goes through the .copy_file_range method. Signed-off-by: Peng Tao --- fs/cifs/ioctl.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/cifs/ioctl.c b/fs/cifs/ioctl.c index

[PATCH 5/9] btrfs: remove btrfs_ioctl_clone(_range)

2015-10-24 Thread Peng Tao
BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE is now handled by generic layer and goes through the .copy_file_range method. Signed-off-by: Peng Tao --- fs/btrfs/ioctl.c | 49 - 1 file changed, 49 deletions(-) diff --git

[PATCH 9/9] NFSD: Implement the CLONE call

2015-10-24 Thread Peng Tao
From: Anna Schumaker I can simply call vfs_file_clone_range() and have the vfs do the right thing for the filesystem being exported. Signed-off-by: Anna Schumaker [hch: change to implement the CLONE op instead of COPY] Signed-off-by: Christoph Hellwig

[PATCH 4/9] vfs: pull btrfs clone API to vfs layer

2015-10-24 Thread Peng Tao
Now that a few file systems are adding clone functionality, namingly btrfs, CIFS, NFS (in another series) and XFS (ttp://oss.sgi.com/archives/xfs/2015-06/msg00407.html), it makes sense to pull the ioctl to common code. Signed-off-by: Peng Tao --- fs/ioctl.c

[PATCH 7/9] nfs42: remove private clone ioctl handler

2015-10-24 Thread Peng Tao
BTRFS_IOC_CLONE/BTRFS_IOC_CLONE_RANGE is now handled by generic layer and goes through the .copy_file_range method. Signed-off-by: Peng Tao --- fs/nfs/nfs4file.c | 96 --- 1 file changed, 96 deletions(-) diff --git

[PATCH 2/9] cifs: add .copy_file_range file operation

2015-10-24 Thread Peng Tao
Signed-off-by: Peng Tao --- fs/cifs/cifsfs.c | 22 fs/cifs/cifsfs.h | 4 ++- fs/cifs/ioctl.c | 100 +++ 3 files changed, 82 insertions(+), 44 deletions(-) diff --git a/fs/cifs/cifsfs.c

[PATCH 3/9] nfs42: add .copy_file_range file operation

2015-10-24 Thread Peng Tao
Signed-off-by: Peng Tao --- fs/nfs/nfs4file.c | 95 ++- 1 file changed, 52 insertions(+), 43 deletions(-) diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index 4aa5719..f1924d8 100644 --- a/fs/nfs/nfs4file.c +++

[PATCH 8/9] nfsd: Pass filehandle to nfs4_preprocess_stateid_op()

2015-10-24 Thread Peng Tao
From: Anna Schumaker This will be needed so COPY can look up the saved_fh in addition to the current_fh. Signed-off-by: Anna Schumaker --- fs/nfsd/nfs4proc.c | 16 +--- fs/nfsd/nfs4state.c | 6 +++--- fs/nfsd/state.h | 5

Re: Exclusive quota of snapshot exceeded despite no space used

2015-10-24 Thread Qu Wenruo
在 2015年10月23日 23:05, Johannes Henninger 写道: On 23.10.2015 01:47, Qu Wenruo wrote: 在 2015年10月23日 04:38, Johannes Henninger 写道: I'm having a weird problem with snapshots and exclusive quotas. After creating a snapshot of a subvolume and setting an exclusive quota of 50MB for the snapshot,

btrfs file system stop working

2015-10-24 Thread Михаил Гаврилов
I see this is the second once in my life: [ 480.007335] INFO: task kworker/u16:1:106 blocked for more than 120 seconds. [ 480.007338] Not tainted 4.2.3-300.fc23.x86_64+debug #1 [ 480.007339] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. [ 480.007340]

Re: btrfs double send

2015-10-24 Thread Duncan
Filipe Manana posted on Sat, 24 Oct 2015 18:52:21 +0100 as excerpted: > On Sat, Oct 24, 2015 at 6:36 PM, wrote: >> Hello, >> >> I would like to do backups based on btrfs send/receive. >> >> So I though I would do a transfer over portable HDD and then >> incremental sends

Re: [PATCH v7 0/4] VFS: In-kernel copy system call

2015-10-24 Thread Andreas Dilger
> On Oct 24, 2015, at 10:52 AM, Eric Biggers wrote: > > A few comments: > >> if (!(file_in->f_mode & FMODE_READ) || >> !(file_out->f_mode & FMODE_WRITE) || >> (file_out->f_flags & O_APPEND) || >> !file_out->f_op) >> return

wow!

2015-10-24 Thread Nicholas Steeves
Hi, I upgraded to linux-4.2.3 and btrfs-progs-4.2.3 yesterday, and wow, there must have been bigger between linux-4.1.10 and 4.2.3 than were mentioned in the changelog! I've been testing btrfs on a Thinkpad X200 with an i5-2450M, Intel 320 SSD, and 8GB of RAM for over a year now, since when

Re: [PATCH v7 0/4] VFS: In-kernel copy system call

2015-10-24 Thread Christoph Hellwig
Thanks Anna, the whole series looks good to me, Reviewed-by: Christoph Hellwig -- 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: [PATCH v7 5/4] copy_file_range.2: New page documenting copy_file_range()

2015-10-24 Thread Pádraig Brady
On 23/10/15 20:32, Anna Schumaker wrote: > +len = stat.st_size; > + > +fd_out = open(argv[2], O_CREAT|O_WRONLY|O_TRUNC, 0644); > +if (fd_out == \-1) { > +perror("open (argv[2])"); > +exit(EXIT_FAILURE); > +} > + > +do { > +ret = copy_file_range(fd_in,