Project

General

Profile

Actions

Bug #17522

closed

ceph_readdirplus_r does not acquire caps before sending back attributes

Added by Jeff Layton over 7 years ago. Updated over 7 years ago.

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

100%

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

Description

In order to send a reliable set of attributes back to the caller, cephfs should ensure that the client has shared caps for all types. When handling a readdirplus however, the client code does not do this. It will gather shared caps for the directory, but the stat structs are generally filled out with whatever is in the cache.

I think (but am not sure) that exclusive caps on the entries are recalled by the MDS before satisfying a readdir request on the wire, so the problem of stale attributes is limited to entries that are satisfied out of the cache.

AFAICT, only a few internal callers and ganesha use ceph_readdirplus_r, so the impact here is pretty minimal so far. Still, it's probably
worth fixing.

I have a patchset in progress to clean this up in conjunction with the conversion to ceph_statx.

Actions #1

Updated by John Spray over 7 years ago

  • Status changed from New to In Progress
Actions #2

Updated by Jeff Layton over 7 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Fixed as of commit f7028e48936cb70f623fe7ba408708a403e60270. This requires moving to libcephfs2, however.

Actions

Also available in: Atom PDF