Project

General

Profile

Actions

Bug #4738

closed

libceph: unlink vs. readdir (and other dir orders)

Added by Denis kaganovich about 11 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Samba/CIFS
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Combining (stacking) in samba vfs_scannedonly with vfs_ceph, I experienced some bugs, looks like libceph readdir problems.
Code illustration: http://raw.googlecode.com/svn/trunk/app-portage/ppatch/files/extensions/net-fs/samba/compile/samba-scan-ceph.patch
In human language: in time of readdir() loop, vfs_scannedonly stuck in ceph_unlink() (expired .scanned:filename in time of readdir of "filename"). Really there are more calls going before: at least ceph_stat() for both files.

Next - more problematic. This code do telldir(), walking forward and seekdir(). Probably - in this time created .scanned:filename again and next file readdir() order broken against system behaviour.

Second issue may be ignored in this code if there are unstrict system behaviour, but both looks like common ceph_readdir() mismatch in single context against normal system order. When unlink going around in kernel mount context - all fine.

PS About this vfs stacking: I just do "ln -s /mnt/ceph/shared /shared" and move clamav & unlink() into system fs context.

Actions

Also available in: Atom PDF