]> git.baikalelectronics.ru Git - kernel.git/commit
ceph: allow rename operation under different quota realms
authorLuis Henriques <lhenriques@suse.com>
Tue, 7 Apr 2020 10:30:20 +0000 (11:30 +0100)
committerIlya Dryomov <idryomov@gmail.com>
Mon, 1 Jun 2020 11:22:53 +0000 (13:22 +0200)
commit31417611f4fd681f34644fb8177f90f8e31289f3
tree27649741f8a1fab8fca00cc7f68c4cb59e73d936
parente4dac3144688cb91ada9c697c938f801134383b5
ceph: allow rename operation under different quota realms

Returning -EXDEV when trying to 'mv' files/directories from different
quota realms results in copy+unlink operations instead of the faster
CEPH_MDS_OP_RENAME.  This will occur even when there aren't any quotas
set in the destination directory, or if there's enough space left for
the new file(s).

This patch adds a new helper function to be called on rename operations
which will allow these operations if they can be executed.  This patch
mimics userland fuse client commit b8954e5734b3 ("client:
optimize rename operation under different quota root").

Since ceph_quota_is_same_realm() is now called only from this new
helper, make it static.

URL: https://tracker.ceph.com/issues/44791
Signed-off-by: Luis Henriques <lhenriques@suse.com>
Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
fs/ceph/dir.c
fs/ceph/quota.c
fs/ceph/super.h