Project

General

Profile

Actions

Feature #48043

open

add a ->setlease implementation to kcephfs

Added by Jeff Layton over 3 years ago. Updated almost 2 years ago.

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

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:

Description

We've had a lease (delegation) implementation in libcephfs for some time, and I'd like to add the same to kcephfs, mainly for the use-case of samba sharing a kcephfs filesystem. It should be conceptually similar -- if we have an appropriate set of caps then we can give out a read or write lease to userland.

For a read lease:

pAsLsXsFsrc

For write lease:

pAsLsXsFsxrwbc
Actions #1

Updated by Jeff Layton over 3 years ago

I have an implementation that (mostly) works, but a truncate can deadlock the whole thing.

The client issues a truncate() call from userland, and the vfs dispatches the setattr op. We take that and bundle up a SETATTR call for the wire, but we can't encode a release in the caps because the refcounts are elevated. The MDS then has to revoke the caps, but the client can't release them until the lease is unlocked. The test program is stuck in the kernel at this point, waiting for the MDS reply, and can't service the SIGIO that it got. So, we deadlock...

Actions #2

Updated by Jeff Layton almost 2 years ago

  • Tracker changed from Bug to Feature
  • Assignee deleted (Jeff Layton)
Actions

Also available in: Atom PDF