Bug #24028
closed
CephFS flock() on a directory is broken
Added by Марк Коренберг about 6 years ago.
Updated over 5 years ago.
Category:
Correctness/Safety
Description
Accroding to man page, flock() semantics must work also on directory. Actually it works with, say, Ext4. It does not work with CephFS.
Luminous 12.2.5, Debian 9 (kernel mount)
I'm setting "major" since irreversible data loss may occur on user's data due to this bug.
I tested flock() logic on different hosts.
on one host:
flock my_dir sleep 1000
on second:
flock my_dir echo test
This work as expected for plain files. And does not work on directories.
- Project changed from Ceph to CephFS
- Category set to Correctness/Safety
- Target version changed from v12.2.5 to v14.0.0
- Source set to Community (user)
- Backport set to mimic,luminous
- Severity changed from 2 - major to 4 - irritation
- Affected Versions deleted (
v12.2.5)
- ceph-qa-suite deleted (
fs, kcephfs)
- Component(FS) Common/Protocol added
- Labels (FS) task(intern) added
- Status changed from New to 7
- Assignee set to Zheng Yan
- Component(FS) kceph added
- Component(FS) deleted (
Common/Protocol)
Does ceph-fuse not have this problem?
Patrick Donnelly, why you set version to 14 ? Will this change be merged to Luminous ?
Марк Коренберг wrote:
Patrick Donnelly, why you set version to 14 ? Will this change be merged to Luminous ?
Because master is now 14.0.0. The backports field tracks where the fix will be backported.
ceph-fuse does not support file lock on directory. It's limitation of fuse kernel module.
In that case flock() syscall over FUSEd directory should return an ENOTSUPP?. In any case we must not allow unsafe locking (i.e. return success when no cluster-wide locking occurred).
In fuse filesystem, flock on directory is handled by VFS, there is nothing ceph-fuse can do.
- Status changed from 7 to Resolved
- Backport deleted (
mimic,luminous)
Also available in: Atom
PDF