linux/fs/ceph
Jeff Layton 1cf03a68e7 ceph: convert mdsc->cap_dirty to a per-session list
This is a per-sb list now, but that makes it difficult to tell when
the cap is the last dirty one associated with the session. Switch
this to be a per-session list, but continue using the
mdsc->cap_dirty_lock to protect the lists.

This list is only ever walked in ceph_flush_dirty_caps, so change that
to walk the sessions array and then flush the caps for inodes on each
session's list.

If the auth cap ever changes while the inode has dirty caps, then
move the inode to the appropriate session for the new auth_cap. Also,
ensure that we never remove an auth cap while the inode is still on the
s_cap_dirty list.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: "Yan, Zheng" <zyan@redhat.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-06-01 13:22:52 +02:00
..
acl.c ceph: add caps perf metric for each superblock 2020-06-01 13:22:51 +02:00
addr.c ceph: add read/write latency metric support 2020-06-01 13:22:51 +02:00
cache.c ceph: replace zero-length array with flexible-array member 2020-03-30 12:42:40 +02:00
cache.h libceph, rbd, ceph: convert to use the new mount API 2019-11-27 22:28:37 +01:00
caps.c ceph: convert mdsc->cap_dirty to a per-session list 2020-06-01 13:22:52 +02:00
ceph_frag.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debugfs.c ceph: add metadata perf metric support 2020-06-01 13:22:51 +02:00
dir.c ceph: add caps perf metric for each superblock 2020-06-01 13:22:51 +02:00
export.c ceph: return ceph_mdsc_do_request() errors from __get_parent() 2020-03-30 12:42:42 +02:00
file.c ceph: add read/write latency metric support 2020-06-01 13:22:51 +02:00
inode.c ceph: add caps perf metric for each superblock 2020-06-01 13:22:51 +02:00
io.c ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
io.h ceph: add buffered/direct exclusionary locking for reads and writes 2019-09-16 12:06:25 +02:00
ioctl.c ceph: consider inode's last read/write when calculating wanted caps 2020-03-30 12:42:42 +02:00
ioctl.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
Kconfig ceph: add selinux support 2019-07-08 14:01:42 +02:00
locks.c ceph: check if file lock exists before sending unlock request 2020-03-30 12:42:40 +02:00
Makefile ceph: add dentry lease metric support 2020-06-01 13:22:51 +02:00
mds_client.c ceph: convert mdsc->cap_dirty to a per-session list 2020-06-01 13:22:52 +02:00
mds_client.h ceph: convert mdsc->cap_dirty to a per-session list 2020-06-01 13:22:52 +02:00
mdsmap.c ceph: add possible_max_rank and make the code more readable 2020-01-27 16:53:40 +01:00
metric.c ceph: add metadata perf metric support 2020-06-01 13:22:51 +02:00
metric.h ceph: add metadata perf metric support 2020-06-01 13:22:51 +02:00
quota.c ceph: demote quotarealm lookup warning to a debug message 2020-05-08 18:44:40 +02:00
snap.c ceph: fix memory leak in ceph_cleanup_snapid_map() 2020-03-23 13:07:08 +01:00
strings.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
super.c ceph: perform asynchronous unlink if we have sufficient caps 2020-03-30 12:42:42 +02:00
super.h ceph: convert mdsc->cap_dirty to a per-session list 2020-06-01 13:22:52 +02:00
util.c ceph: move net/ceph/ceph_fs.c to fs/ceph/util.c 2020-01-27 16:53:40 +01:00
xattr.c ceph: add caps perf metric for each superblock 2020-06-01 13:22:51 +02:00