Project

General

Profile

Actions

Feature #39098

closed

mds: lock caching for asynchronous unlink

Added by Jeff Layton about 5 years ago. Updated over 4 years ago.

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

0%

Source:
Development
Tags:
Backport:
Reviewed:
Affected Versions:
Component(FS):
MDS
Labels (FS):
Pull request ID:

Description

In order to allow the client to asynchronously delete files, we need Fx caps on the parent, and Lx caps on the inode of the dentry being unlinked (because the link count will change). The MDS does not seem to hand out Lx caps today. When I use cephfs-shell to create a file, I see this in the client debug log:

2019-04-03 15:43:18.276 7f0fc17fa700 10 client.4196 add_update_cap issued - -> pAsxLsXsxFsxcrwb from mds.0 on 0x10000000002.head(faked_ino=0 ref=0 ll_ref=0 cap_refs={} open={} mode=100666 size=0/0 nlink=1 btime=2019-04-03 15:43:18.276971 mtime=2019-04-03 15:43:18.276971 ctime=2019-04-03 15:43:18.276971 caps=pAsxLsXsxFsxcrwb(0=pAsxLsXsxFsxcrwb) objectset[0x10000000002 ts 0/0 objects 0 dirty_or_tx 0] 0x7f0fb4006f40)

Notably absent from the caps= set is Lx. It would be good if the MDS would grant those by default, particularly when we're handing out exclusive caps of other flavors.


Files

0001-MDS-only-take-linklock-in-unlink-if-client-doesn-t-h.patch (1.46 KB) 0001-MDS-only-take-linklock-in-unlink-if-client-doesn-t-h.patch PATCH: only acquire linklock if client doesn't hold Lx Jeff Layton, 04/05/2019 03:29 PM

Related issues 1 (0 open1 closed)

Related to CephFS - Feature #38951: client: implement asynchronous unlink/createResolvedZheng Yan

Actions
Actions

Also available in: Atom PDF