Re: [PATCH 4/9] staging/lustre: clean up and remove libcfs/linux/linux-fs.c

2013-06-04 Thread Peng Tao
On Tue, Jun 4, 2013 at 4:32 PM, Dan Carpenter wrote: > On Mon, Jun 03, 2013 at 09:58:17PM +0800, Peng Tao wrote: >> int libcfs_kkuc_msg_put(struct file *filp, void *payload) >> { >> struct kuc_hdr *kuch = (struct kuc_hdr *)payload; >> + ssize

Re: [PATCH 4/9] staging/lustre: clean up and remove libcfs/linux/linux-fs.c

2013-06-04 Thread Peng Tao
On Tue, Jun 4, 2013 at 6:23 PM, Peng Tao wrote: > On Tue, Jun 4, 2013 at 4:32 PM, Dan Carpenter > wrote: >> On Mon, Jun 03, 2013 at 09:58:17PM +0800, Peng Tao wrote: >>> int libcfs_kkuc_msg_put(struct file *filp, void *payload) >>> { >>> struct ku

[PATCH RFC 02/11] vfs/btrfs: add .clone_range file operation

2015-08-25 Thread Peng Tao
Also add vfs callers in do_vfs_ioctl(). Now btrfs CLONE ioctl goes through vfs_file_clone_range(). Cc: linux-btrfs@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Signed-off-by: Peng Tao --- fs/btrfs/ctree.h | 2 ++ fs/btrfs/file.c| 1 + fs/btrfs/ioctl.c | 68

[PATCH RFC 01/11] vfs: pull btrfs clone API to vfs layer

2015-08-25 Thread Peng Tao
allow underlying filesystems to clone between regular files. The change in do_vfs_ioctl() is defered to next patch where btrfs .clone_range is added, just so that we don't break btrfs CLONE ioctl with this patch. Cc: linux-btrfs@vger.kernel.org Cc: linux-fsde...@vger.kernel.org Signed-off-by:

Re: [PATCH RFC 01/11] vfs: pull btrfs clone API to vfs layer

2015-08-25 Thread Peng Tao
On Tue, Aug 25, 2015 at 11:33 PM, Peng Tao wrote: > Now that a few file systems are adding clone functionality, namingly > btrfs, NFS (later in the series) and XFS > (ttp://oss.sgi.com/archives/xfs/2015-06/msg00407.html), it makes sense > to pull the ioctl to common c

Re: [PATCH RFC 01/11] vfs: pull btrfs clone API to vfs layer

2015-08-26 Thread Peng Tao
On Wed, Aug 26, 2015 at 12:09 PM, Darrick J. Wong wrote: > On Tue, Aug 25, 2015 at 11:33:39PM +0800, Peng Tao wrote: >> Now that a few file systems are adding clone functionality, namingly >> btrfs, NFS (later in the series) and XFS >> (ttp://oss.sgi.com/archives/xfs/2015-

[PATCH-RFC-RESEND 2/9] vfs/btrfs: add .clone_range file operation

2015-08-26 Thread Peng Tao
Also add vfs callers in do_vfs_ioctl(). Now btrfs CLONE ioctl goes through vfs_file_clone_range(). One question to btrfs developers: Does btrfs_clone() ever return a positive value? If it does, what does it mean to users? Signed-off-by: Peng Tao --- fs/btrfs/ctree.h | 2 ++ fs/btrfs

[PATCH-RFC-RESEND 0/9] NFS/NFSD: add NFSv42 CLONE operation support

2015-08-26 Thread Peng Tao
na Schumaker (2): nfsd: Pass filehandle to nfs4_preprocess_stateid_op() NFSD: Implement the CLONE call Peng Tao (7): vfs: pull btrfs clone API to vfs layer vfs/btrfs: add .clone_range file operation nfs42: add CLONE xdr functions nfs42: add CLONE proc functions nfs42: add .copy_range

[PATCH-RFC-RESEND 1/9] vfs: pull btrfs clone API to vfs layer

2015-08-26 Thread Peng Tao
allow underlying filesystems to clone between regular files. The change in do_vfs_ioctl() is defered to next patch where btrfs .clone_range is added, just so that we don't break btrfs CLONE ioctl with this patch. Signed-off-by: Peng Tao --- fs/ioctl.c | 24 +++

[PATCH-RFC-RESEND 3/9] nfs42: add CLONE xdr functions

2015-08-26 Thread Peng Tao
xdr definitions per draft-ietf-nfsv4-minorversion2-38.txt Signed-off-by: Peng Tao --- fs/nfs/nfs42xdr.c | 97 - fs/nfs/nfs4xdr.c| 1 + include/linux/nfs4.h| 2 + include/linux/nfs_xdr.h | 19 ++ 4 files changed, 118

[PATCH-RFC-RESEND 4/9] nfs42: add CLONE proc functions

2015-08-26 Thread Peng Tao
Signed-off-by: Peng Tao --- fs/nfs/nfs42.h| 1 + fs/nfs/nfs42proc.c| 71 +++ fs/nfs/nfs4proc.c | 3 +- include/linux/nfs_fs_sb.h | 1 + 4 files changed, 75 insertions(+), 1 deletion(-) diff --git a/fs/nfs/nfs42.h b/fs

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

2015-08-26 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 | 5 ++--- fs/nfsd/state.h | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-

[PATCH-RFC-RESEND 7/9] nfs42: respect clone_blksize

2015-08-26 Thread Peng Tao
be cloned is equal to the source file size. Signed-off-by: Peng Tao --- fs/nfs/nfs4file.c | 8 1 file changed, 8 insertions(+) diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index c335cb0..ee8c014 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -174,12 +174,20

[PATCH-RFC-RESEND 9/9] NFSD: Implement the CLONE call

2015-08-26 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 Signed-off-by: Peng Tao --- fs/nfsd

[PATCH-RFC-RESEND 6/9] nfs: get clone_blksize when probing fsinfo

2015-08-26 Thread Peng Tao
NFSv42 CLONE operation is supposed to respect it. Signed-off-by: Peng Tao --- fs/nfs/client.c | 1 + fs/nfs/nfs4proc.c | 1 + fs/nfs/nfs4xdr.c | 25 + include/linux/nfs4.h | 1 + include/linux/nfs_fs_sb.h | 1 + include/linux/nfs_xdr.h

[PATCH-RFC-RESEND 5/9] nfs42: add .copy_range file operation

2015-08-26 Thread Peng Tao
Signed-off-by: Peng Tao --- fs/nfs/nfs4file.c | 50 ++ 1 file changed, 50 insertions(+) diff --git a/fs/nfs/nfs4file.c b/fs/nfs/nfs4file.c index dcd39d4..c335cb0 100644 --- a/fs/nfs/nfs4file.c +++ b/fs/nfs/nfs4file.c @@ -4,6 +4,7 @@ * Copyright

Re: [PATCH RFC 02/11] vfs/btrfs: add .clone_range file operation

2015-08-26 Thread Peng Tao
On Wed, Aug 26, 2015 at 4:01 PM, David Sterba wrote: > On Tue, Aug 25, 2015 at 11:33:40PM +0800, Peng Tao wrote: >> --- a/include/uapi/linux/btrfs.h >> +++ b/include/uapi/linux/btrfs.h >> @@ -316,12 +316,6 @@ struct btrfs_ioctl_search_args_v2 { >> __u64 buf[0];

Re: [PATCH-RFC-RESEND 2/9] vfs/btrfs: add .clone_range file operation

2015-08-26 Thread Peng Tao
On Wed, Aug 26, 2015 at 9:17 PM, Christoph Hellwig wrote: > You need to eep the existing defintion, either as a duplicate with a > comment, or by including the uapi fs.h and defininin it to the new name. OK. will keep it. > > Also this will break cifs, which uses the BTRFS_IOC_CLONE defintion > a

Re: [PATCH-RFC-RESEND 5/9] nfs42: add .copy_range file operation

2015-08-26 Thread Peng Tao
On Thu, Aug 27, 2015 at 6:48 AM, Dave Chinner wrote: > On Wed, Aug 26, 2015 at 04:16:46PM +0800, Peng Tao wrote: >> Signed-off-by: Peng Tao >> --- >> fs/nfs/nfs4file.c | 50 ++ >> 1 file changed, 50 insertions(+

Re: [PATCH-RFC-RESEND 1/9] vfs: pull btrfs clone API to vfs layer

2015-08-26 Thread Peng Tao
On Thu, Aug 27, 2015 at 6:52 AM, Dave Chinner wrote: > On Wed, Aug 26, 2015 at 04:16:42PM +0800, Peng Tao wrote: >> Now that a few file systems are adding clone functionality, namingly >> btrfs, NFS (later in the series) and XFS >> (ttp://oss.sgi.com/archives/xfs/2015-06/msg

Re: [PATCH-RFC-RESEND 0/9] NFS/NFSD: add NFSv42 CLONE operation support

2015-08-26 Thread Peng Tao
On Wed, Aug 26, 2015 at 9:11 PM, Christoph Hellwig wrote: > On Wed, Aug 26, 2015 at 04:16:41PM +0800, Peng Tao wrote: >> 2. vfs_file_clone_range() does not expect file systems to do data copy, and >> thus >> no rw_verify_area() required. > > While there is no physi

Re: [PATCH-RFC-RESEND 1/9] vfs: pull btrfs clone API to vfs layer

2015-08-27 Thread Peng Tao
On Wed, Aug 26, 2015 at 9:37 PM, David Sterba wrote: > On Wed, Aug 26, 2015 at 04:16:42PM +0800, Peng Tao wrote: >> +struct file_clone_range { >> + __s64 src_fd; >> + __u64 src_offset; >> + __u64 src_length; >> + __u64 dest_offset; >> +}; >

[PATCH 1/9] vfs: add COPY_FILE_CLONE_ONLY flag

2015-10-24 Thread Peng Tao
x27;s COPY_FR_REFLINK in uapi/fs.h when implementing new user visiable APIs like sys_clone. Signed-off-by: Peng Tao --- fs/read_write.c| 9 + include/linux/fs.h | 3 +++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/fs/read_write.c b/fs/read_write.c index d2da7e4..da11a7f 100644

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

2015-10-24 Thread Peng Tao
LONE_RANGE ioctls through the .copy_file_range method instead of each implementing them in the private ioctl handlers. Cheers, Tao Anna Schumaker (2): nfsd: Pass filehandle to nfs4_preprocess_stateid_op() NFSD: Implement the CLONE call Peng Tao (7): vfs: add COPY_FILE_CLONE_ONLY flag

[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 a/fs/nfs/nfs4file.c b/fs

[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 b/fs/cifs/cifsfs.c index e739950..6ef7c3c

[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 +++ b/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 +++-- 3 files changed, 15 insertions(+), 12 deletions

[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 bbab940..5dfc63a 100644 --- a/fs/cifs

[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 a/fs/btrfs/ioctl.c b/fs/btrfs

[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 Signed-off-by: Peng Tao --- fs/nfsd

[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 | 40

[PATCH] add btrfs-image man page

2009-03-30 Thread Peng Tao
add man/btrfs-image.8.in Signed-off-by: Peng Tao --- man/Makefile |5 - man/btrfs-image.8.in | 34 ++ 2 files changed, 38 insertions(+), 1 deletions(-) create mode 100644 man/btrfs-image.8.in diff --git a/man/Makefile b/man/Makefile index

[PATCH] add btrfs-show man page

2009-03-30 Thread Peng Tao
add man/btrfs-show.8.in Signed-off-by: Peng Tao --- man/Makefile|6 +- man/btrfs-show.8.in | 19 +++ 2 files changed, 24 insertions(+), 1 deletions(-) create mode 100644 man/btrfs-show.8.in diff --git a/man/Makefile b/man/Makefile index b7a7340..4e8893b

[PATCH] add comments for extent_fiemap

2009-06-02 Thread Peng Tao
This also explains btrfs fiemap ioctl() return values, especially the positive return value, which may confuse users. Signed-off-by: Peng Tao --- fs/btrfs/extent_io.c |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index

Re: grub-0.97: btrfs multidevice support [PATCH]

2009-09-26 Thread Peng Tao
ignored any day. > > -- > Colin Watson                                       [cjwat...@ubuntu.com] > -- > 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

Re: grub-0.97: btrfs multidevice support [PATCH]

2009-09-27 Thread Peng Tao
On Sun, Sep 27, 2009 at 6:18 PM, Robert Millan wrote: > On Sun, Sep 27, 2009 at 11:29:11AM +0800, Peng Tao wrote: >> > >> > It would be great if somebody could take up Edward's work and port it to >> > GRUB 2. If nobody else does then I'd be interested in d