Re: [PATCH 1/5] cifs: implement clone_file_range operation

2015-11-27 Thread David Disseldorp
Hi Christoph, On Thu, 26 Nov 2015 19:50:55 +0100, Christoph Hellwig wrote: > And drop the fake support for the btrfs CLONE ioctl - SMB2 copies are > chunked and do not actually implement clone semantics! BTRFS_IOC_CLONE is implemented using the new ReFS FSCTL_DUPLICATE_EXTENTS_TO_FILE request,

Re: Samba server bug: CopyChunk from one share to a different share on same server

2015-11-09 Thread David Disseldorp
et_tcon)) { > +cifs_dbg(VFS, "source and target of copy not on same share\n"); > +goto out_fput; > +} > + > +if (!dup_extents && (src_tcon->ses != target_tcon->ses)) { > + cifs_dbg(VFS, "source and target of copy

[PATCH] cifs: fix use-after-free bug in find_writable_file

2015-03-13 Thread David Disseldorp
(cifs_file_list_lock); ++refind; // refind = 1 goto refind_writable; At this point we loop back through with an invalid inv_file pointer and a refind value of 1. On second pass, inv_file is not overwritten on openFileList traversal, and is subsequently dereferenced. Signed-off-by: David Disseldorp dd...@suse.de

Re: GSOC 2015 Aspirant for Improving SMB3 protocol improvements

2015-03-04 Thread David Disseldorp
Hi Saket Sinha, Thanks for your interest... On Wed, 4 Mar 2015 17:15:32 +0530, Saket Sinha wrote: Hi, I am looking forward to paticipate in GSOC 2015 with Samba community for Improving SMB3 protocol improvements. This is to discuss the idea further in order to build my understanding of

Re: New ioctl - FSCTL_DUPLICATE_EXTENTS_TO_FILE

2015-02-09 Thread David Disseldorp
On Wed, 28 Jan 2015 19:22:03 +0100, David Disseldorp wrote: A new File System Control (FSCTL) has been added to support the new FSCTL_DUPLICATE_EXTENTS_TO_FILE operation in [MS-FSA]. I haven't played with it yet, but from the [MS-FCC] 20150119 preview doc it looks very similar to copy

Re: New ioctl - FSCTL_DUPLICATE_EXTENTS_TO_FILE

2015-01-28 Thread David Disseldorp
On Tue, 27 Jan 2015 12:23:55 -0600, Steve French wrote: Has anyone tried the new ioctl (MS-FSCC) defined in the most recent update. See section 2.3.7 Looks interesting for a new variant of copy offload A new File System Control (FSCTL) has been added to support the new

Re: [PATCH 2/2] cifs: add server-side copy sanity test

2014-12-15 Thread David Disseldorp
On Mon, 15 Dec 2014 09:31:57 +, David Drysdale wrote: This test uses the cloner binary to issue CIFS_IOC_COPYCHUNK_FILE server-side copy requests. Signed-off-by: David Disseldorp dd...@suse.de --- tests/cifs/001 | 69

[PATCH 1/2] common: rename _require_btrfs_cloner to _require_cloner

2014-12-09 Thread David Disseldorp
src/cloner.c is no longer Btrfs specific, so use a generic name. Signed-off-by: David Disseldorp dd...@suse.de --- common/rc | 2 +- tests/btrfs/035 | 2 +- tests/btrfs/052 | 2 +- tests/btrfs/055 | 2 +- tests/btrfs/056 | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git

[PATCH 2/2] cifs: add server-side copy sanity test

2014-12-09 Thread David Disseldorp
This test uses the cloner binary to issue CIFS_IOC_COPYCHUNK_FILE server-side copy requests. Signed-off-by: David Disseldorp dd...@suse.de --- tests/cifs/001 | 69 ++ tests/cifs/001.out | 21 + tests/cifs/group | 6

Re: CIFS module build verification system

2014-08-22 Thread David Disseldorp
On Wed, 20 Aug 2014 11:20:04 +0200, David Disseldorp wrote: Do you understand right that I can squash David's commit (started with SQUASH) into my patch? Sure, go for it. Also, please post your next round to the fstests mailing list (fste...@vger.kernel.org) for feedback. I'd like

Re: CIFS module build verification system

2014-08-22 Thread David Disseldorp
commits from my repo squashed in should be fine. Steve, David, do you want me to add your reviewed-by/acked-by to the main patch? If it's just your original change with the other two patches squashed, then please add Reviewed-by: David Disseldorp dd...@suse.de Cheers, David -- To unsubscribe from

Re: CIFS module build verification system

2014-08-20 Thread David Disseldorp
On Wed, 20 Aug 2014 11:32:59 +0400, Pavel Shilovsky wrote: ... The git repo for build verification system scripts: http://git.altlinux.org/people/piastry/public/?p=cifs-tests.git;a=summary The git repo for patched Cthon tests (merged by Steve Dickson into his tree):

Re: [PATCH] [CIFS] Incorrect error returned on setting file compressed on SMB2

2014-08-19 Thread David Disseldorp
-btrfs Samba partition, now the error returned is more intuitive to the user. Signed-off-by: Steve French smfre...@gmail.com Reviewed-by: David Disseldorp dd...@suse.de Looks like the cifs_hardlink() -EIO to -EOPNOTSUPP mapping logic could potentially also be removed with this change. Cheers

Re: [PATCH][SMB3] Cleanup sparse file support by creating worker function for it

2014-08-15 Thread David Disseldorp
FILE_ATTRIBUTE_SPARSE_FILE) !setsparse) +return true; /* already not sparse */ + + Drop one of the empty lines above. Looks good otherwise. Reviewed-by: David Disseldorp dd...@samba.org Cheers, David -- To unsubscribe from this list: send the line unsubscribe linux-cifs in the body

Re: [PATCH][CIFS] fix SMB3 mount failure due to corrupted empty paths when mapchars option used

2014-06-24 Thread David Disseldorp
terminated so we sent garbarge as a path name on empty paths which caused SMB2/SMB2.1/SMB3 mounts to fail when mapchars was specified. mapchars is particularly important since Unix Extensions for SMB3 are not supported (yet) Signed-off-by: Steve French smfre...@gmail.com Reviewed-by: David

[PATCH 0/2] xfstests: add cifs.ko server-side copy helper

2014-06-11 Thread David Disseldorp
the code overlap, I though it suitable to share the same source. Feedback appreciated. -- David Disseldorp (2): src/cloner: check filesystem type src/cloner: add CIFS_IOC_COPYCHUNK_FILE support configure.ac | 1 + src/cloner.c | 123

[PATCH 2/2] src/cloner: add CIFS_IOC_COPYCHUNK_FILE support

2014-06-11 Thread David Disseldorp
-off-by: David Disseldorp dd...@suse.de --- configure.ac | 1 + src/cloner.c | 78 +++- 2 files changed, 68 insertions(+), 11 deletions(-) diff --git a/configure.ac b/configure.ac index 53459d8..d038f95 100644 --- a/configure.ac +++ b

[PATCH 1/2] src/cloner: check filesystem type

2014-06-11 Thread David Disseldorp
Limit clone requests to Btrfs only for the moment. Signed-off-by: David Disseldorp dd...@suse.de --- src/cloner.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/src/cloner.c b/src/cloner.c index ccc2354..6fb40fa 100644 --- a/src/cloner.c

Re: [Samba] Read offline attribute

2014-06-10 Thread David Disseldorp
Hi Peter, On Tue, 10 Jun 2014 16:05:49 +0100, Peter Flood wrote: I want to read the 'offline' extended attribute on files on a windows share mounted on a linux host, is it possible to get this info? The Linux CIFS client doesn't currently offer such support. However, the offline attribute

[PATCH] ioctl: add and ship public header

2014-06-05 Thread David Disseldorp
The header currently only exposes the CIFS_IOC_COPYCHUNK_FILE interface, but is still useful. Signed-off-by: David Disseldorp dd...@suse.de --- Makefile.am | 2 ++ ioctl.h | 34 ++ 2 files changed, 36 insertions(+) create mode 100644 ioctl.h diff --git

Re: copy chunk preliminary results

2013-11-21 Thread David Disseldorp
On Mon, 04 Nov 2013 10:07:22 + Pádraig Brady p...@draigbrady.com wrote: So cp --reflink has CoW semantics and so probably not an appropriate interface for this. Unless I'm misunderstanding, this SMB copy offload does result in a normal copy on the server right? It depends on how the SMB

Re: [PATCH][CIFS] SMB2/SMB3 Copy offload support (refcopy) finishup

2013-11-16 Thread David Disseldorp
On Sat, 16 Nov 2013 01:14:19 -0600 Steve French smfre...@gmail.com wrote: fs/cifs/smb2ops.c | 89 --- fs/cifs/smb2pdu.c | 2 +- 2 files changed, 79 insertions(+), 12 deletions(-) diff --git a/fs/cifs/smb2ops.c b/fs/cifs/smb2ops.c

Re: [CIFS][PATCH] set copy chunk defaults

2013-11-15 Thread David Disseldorp
*/ __u32 perf_sector_size; /* best sector size for perf */ + __u32 max_chunks; + __u32 max_bytes_chunk; + __u32 max_bytes_copy; Might be worth prefixing or nesting these to make it clear that they're copy-chunk specific. Anyhow, looks good as is. Reviewed-by: David Disseldorp dd...@samba.org Cheers

Re: cp --reflink and target file open flags

2013-10-17 Thread David Disseldorp
On Wed, 16 Oct 2013 18:36:19 -0500 Steve French smfre...@gmail.com wrote: cp --reflink opens the target file for O_WRONLY before invoking the (BTRFS) ioctl for clone file, but for copy offload over the network the SMB2 specification requires that the target file be open O_RDWR. I may be

Re: cp --reflink and BTRFS_IOC_CLONE

2013-10-17 Thread David Disseldorp
On Wed, 16 Oct 2013 15:02:11 -0500 Steve French smfre...@gmail.com wrote: Do any other file systems other than btrfs support cp --reflink (ie BTRFS_IOC_CLONE). I am cleaning the patches to cifs.ko to do this at least for SMB2/SMB2.1/SMB3, but I thought that at the kernel file system summit

Re: [[PATCH v2] [CIFS] Allow setting per-file compression via SMB2 and SMB3

2013-10-08 Thread David Disseldorp
Hi Steve, On Tue, 8 Oct 2013 15:41:17 -0500 Steve French smfre...@gmail.com wrote: + /* Currently only flag we can set is compressed flag */ + if ((ExtAttrBits FS_COMPR_FL) == 0) + break; + + /* Try to

Re: [RFC] extending splice for copy offloading

2013-09-26 Thread David Disseldorp
Hi Steve, On Thu, 26 Sep 2013 12:22:49 -0500 Steve French smfre...@gmail.com wrote: Windows clients seem to max out at 16MB chunk size when doing copy offload. I would like to increase chunk size larger than that if network bandwidth (returned at mount time in SMB3 on the query network

Re: [PATCH] cifs: use sensible file nlink values if unprovided

2013-07-05 Thread David Disseldorp
On Thu, 4 Jul 2013 14:43:23 -0500 Steve French smfre...@gmail.com wrote: I merged an equivalent but slightly smaller version of your patch into cifs-2.6.git (see below) and added stable since we should not be returning nlink of 0. Let me know if any objections. Looks good to me Steve. FWIW,