Project

General

Profile

Bug #75

mds: fix rdlock semantics

Added by Sage Weil almost 9 years ago. Updated over 2 years ago.

Status:
Resolved
Priority:
High
Assignee:
-
Category:
-
Target version:
-
Start date:
05/03/2010
Due date:
% Done:

0%

Source:
Tags:
Backport:
Regression:
Severity:
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
Labels (FS):
Pull request ID:

Description

The rdlock does not take which client is doing the locking into account.

Consequently,

clienta$ ls
clientb$ touch foo
clienta$ la

in quick succession will now show 'foo' on clienta.

History

#1 Updated by Sage Weil almost 9 years ago

rdlock does, actually. The problem was specifically the LOCK->SYNC transition allows rdlock on auth, when it shouldn't.

#2 Updated by Sage Weil almost 9 years ago

broken result: rdlock succeedes during lock->sync:

10.05.03 13:56:19.316016 7fb391bb0910 mds0.locker rdlock_start on (ifile lock->sync w=1) on [inode 10000000006 [...2,head] /s/2/ auth v48 pv50 ap=3 f(v0 m10.05.03 13:56:10.607981 6=6+0) ds=6=6+0 rb=0(0/0) rf=6(7/7) rd=1(1/1) (iauth sync) (ilink sync) (idft sync) (isnap sync r=1) (inest mix w=1) (ifile lock->s
ync w=1) (ixattr sync) (iversion lock w=1 last_client=4110) caps={4108=pAsLsXs/p@23,4110=pAsLsXs/-@15} | nref=9 0x7fb388019a90]
10.05.03 13:56:19.316053 7fb391bb0910 mds0.locker got rdlock on (ifile lock->sync r=1 w=1) [inode 10000000006 [...2,head] /s/2/ auth v48 pv50 ap=3 f(v0 m10.05.03 13:56:10.607981 6=6+0) ds=6=6+0 rb=0(0/0) rf=6(7/7) rd=1(1/1) (iauth sync) (ilink sync) (idft sync) (isnap sync r=1) (inest mix w=1) (ifile lock->sy
nc r=1 w=1) (ixattr sync) (iversion lock w=1 last_client=4110) caps={4108=pAsLsXs/p@23,4110=pAsLsXs/-@15} | nref=10 0x7fb388019a90]

#3 Updated by Sage Weil almost 9 years ago

  • Status changed from New to Resolved

fixed by commit:409a54f17515a417f72fb0e1d70733624fe4b609

#4 Updated by John Spray over 2 years ago

  • Project changed from Ceph to fs
  • Category deleted (1)
  • Target version deleted (v0.21)

Bulk updating project=ceph category=mds bugs so that I can remove the MDS category from the Ceph project to avoid confusion.

Also available in: Atom PDF