linux/fs/ceph
Sage Weil cd045cb42a ceph: fix rdcache_gen usage and invalidate
We used to use rdcache_gen to indicate whether we "might" have cached
pages.  Now we just look at the mapping to determine that.  However, some
old behavior remains from that transition.

First, rdcache_gen == 0 no longer means we have no pages.  That can happen
at any time (presumably when we carry FILE_CACHE).  We should not reset it
to zero, and we should not check that it is zero.

That means that the only purpose for rdcache_revoking is to resolve races
between new issues of FILE_CACHE and an async invalidate.  If they are
equal, we should invalidate.  On success, we decrement rdcache_revoking,
so that it is no longer equal to rdcache_gen.  Similarly, if we success
in doing a sync invalidate, set revoking = gen - 1.  (This is a small
optimization to avoid doing unnecessary invalidate work and does not
affect correctness.)

Signed-off-by: Sage Weil <sage@newdream.net>
2010-11-08 07:29:05 -08:00
..
addr.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
caps.c ceph: fix rdcache_gen usage and invalidate 2010-11-08 07:29:05 -08:00
ceph_frag.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
debugfs.c ceph: fix debugfs warnings 2010-10-20 15:38:21 -07:00
dir.c ceph: do not carry i_lock for readdir from dcache 2010-10-20 15:38:27 -07:00
export.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
file.c ceph: fix open for write on clustered mds 2010-11-07 09:07:15 -08:00
inode.c ceph: fix rdcache_gen usage and invalidate 2010-11-08 07:29:05 -08:00
ioctl.c ceph: add CEPH_MDS_OP_SETDIRLAYOUT and associated ioctl. 2010-10-20 15:38:23 -07:00
ioctl.h ceph: add CEPH_MDS_OP_SETDIRLAYOUT and associated ioctl. 2010-10-20 15:38:23 -07:00
Kconfig ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
locks.c ceph: preallocate flock state without locks held 2010-10-20 15:38:17 -07:00
Makefile ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
mds_client.c ceph: switch from BKL to lock_flocks() 2010-10-20 15:38:18 -07:00
mds_client.h ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
mdsmap.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
snap.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
strings.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
super.c ceph: factor out libceph from Ceph file system 2010-10-20 15:37:28 -07:00
super.h ceph: fix rdcache_gen usage and invalidate 2010-11-08 07:29:05 -08:00
xattr.c fs/ceph/xattr.c: Use kmemdup 2010-10-20 15:38:26 -07:00