]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
UBUNTU: SAUCE: aufs: for v4.5, use vfs_clone_file_range() in copy-up
authorJ. R. Okajima <hooanon05g@gmail.com>
Thu, 17 Aug 2017 13:09:00 +0000 (15:09 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Wed, 23 Aug 2017 15:56:36 +0000 (17:56 +0200)
commitbd1592e6fdc9f33b109228ed4295c8f5022d4f5f
tree12bf8b7e45e25970b3f7bd94b16b48827c34c1ed
parent188d29ab2dd6b76445858c517edcddf6a05905b4
UBUNTU: SAUCE: aufs: for v4.5, use vfs_clone_file_range() in copy-up

BugLink: http://bugs.launchpad.net/bugs/1709749
In mainline, ioctl(FICLONE) is introduced by the commit
04b38d6 2015-12-07 vfs: pull btrfs clone API to vfs layer
so are vfs_clone_file_ranage() and f_op->clone_file_ranage().
Compared to copy_file_range(2), cloning doesn't return with the partial
success. Using this method in aufs copy-up, the speed will be improved.

But unfortunately this method is supported by nfs4.2, btrfs and cifs
only (currently). Additionally, linux nfs server 4.2 implementation
simply calls vfs_clone_file_ranage(), which means if the backend fs
doesn't support this operation, it returns EOPNOTSUPP.

So the benefit is rather limited, but it must be a good thing.

Signed-off-by: J. R. Okajima <hooanon05g@gmail.com>
(backported from commit b4d3dcc92a13d53952fe6e9a640201ef87475302
 https://github.com/sfjro/aufs4-standalone.git)
[saf: Resolved conflicts based primarily on resolution found in
 fd18affa818115edad7e1b7472f26ac4d73e73a1]
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
fs/aufs/cpup.c
fs/aufs/vfsub.h