Project

General

Profile

Bug #1513

kclient: cap migration can race with cap addition on client

Added by Sage Weil over 12 years ago. Updated over 9 years ago.

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

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

mds0 > client .. mknod reply (creates cap
mds0 -> mds1 ... migrate cap
mds1 -> client .. import cap
client <
mds1 .. import cap ... ignores (we don't have the inode yet)
client <- mds0 .. mknod reply

Looks like import needs to unconditionally add the cap.

Associated revisions

Revision bce271ee (diff)
Added by Sage Weil over 12 years ago

client: add inode on IMPORT

If we get an IMPORT and don't have the inode, add it. This fixes a race
like:

mds0 > client .. mknod reply (or similar)
mds0 -> mds1 .. migrate cap
mds1 -> client .. send IMPORT
client <
mds1 .. rx IMPORT, but don't have inode
client <- mds0 .. rx mknod reply, add it.

With this fix, we add the inode and set up the cap on IMPORT, and when we
get the mknod reply we update the inode immutable fields that aren't
present in the cap message (rdev, symlink target).

Fixes: #1513
Signed-off-by: Sage Weil <>

History

#1 Updated by Greg Farnum over 12 years ago

Doesn't the cap migrate right there include the proper cap? As I recall when we looked at this last, caps aren't encoded for migrate until after the MDS has stopped accepting client requests.

#2 Updated by Sage Weil over 12 years ago

  • Subject changed from mds: cap migration can race with cap addition on client to kclient: cap migration can race with cap addition on client
  • Priority changed from Low to Normal

Fixed in libceph, still need to fix kclient.

#3 Updated by Sage Weil over 12 years ago

  • Target version changed from v0.36 to v0.37

#4 Updated by Sage Weil over 12 years ago

  • Target version changed from v0.37 to v0.38

#5 Updated by Sage Weil over 12 years ago

  • translation missing: en.field_position set to 1
  • translation missing: en.field_position changed from 1 to 937

#6 Updated by Sage Weil over 12 years ago

  • Assignee deleted (Sage Weil)

#7 Updated by Sage Weil over 12 years ago

  • Target version changed from v0.38 to v0.39

#8 Updated by Sage Weil over 12 years ago

  • Target version changed from v0.39 to v0.40

#9 Updated by Sage Weil about 12 years ago

  • Project changed from Ceph to Linux kernel client
  • Category deleted (1)
  • Target version deleted (v0.40)

#10 Updated by Zheng Yan over 9 years ago

  • Status changed from New to Resolved

now cap import/export are ordered.
(commit 186e4f7a4b1883f3f46aa15366c0bcebc28fdda7, 4ee6a914edbbd2543884f0ad7d58ea471136be32, 5d72d13c425bb41f7752962f168fb402b86b7ac0, 11df2dfb610d68e8050c2183c344b1002351a99d)

Also available in: Atom PDF