]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
quincy: client/fuse: handle case of renameat2 with non-zero flags 55010/head
authorShachar Sharon <ssharon@redhat.com>
Thu, 30 Nov 2023 11:29:30 +0000 (13:29 +0200)
committerLeonid Usov <leonid.usov@ibm.com>
Tue, 26 Dec 2023 14:46:42 +0000 (16:46 +0200)
commit9d5a37c566711695205c004fd1e213682227f7fa
treef00b9ca22b532810c98fad036152f3595e777cf7
parent886a68c76ebc263dc369b4992f667c73e2991821
quincy: client/fuse: handle case of renameat2 with non-zero flags

When user issues renameat(2) with non-zero flags (RENAME_EXCHANGE or
RENAME_NOREPALCE) the current code ignores those flags and treat the
call as ordinary rename. This, in turn, may yield successful rename with
wrong semantics then those expected by the caller.

Follow the same semantics as kernel's cephfs client: return -EINVAL when
having non-zero flags to renameat2 (see 'ceph_rename' at fs/ceph/dir.c).

Fixes: https://tracker.ceph.com/issues/63823
Original-Issue: https://tracker.ceph.com/issues/63722
Original-PR: https://github.com/ceph/ceph/pull/54733
Signed-off-by: Leonid Usov <leonid.usov@ibm.com>
Signed-off-by: Shachar Sharon <ssharon@redhat.com>
(cherry picked from commit 19509ce650367de8dfb979d3c6a40d5752c822f2)
src/client/fuse_ll.cc