summaryrefslogtreecommitdiffstats
path: root/fs/ceph/inode.c
diff options
context:
space:
mode:
authorSage Weil <sage@newdream.net>2010-05-27 10:40:43 -0700
committerSage Weil <sage@newdream.net>2010-08-01 20:11:39 -0700
commit2962507ca204f886967e1a089d9bec206d427c22 (patch)
treee9cec16b13ad1d8e41c288658e62fb3bf1c66859 /fs/ceph/inode.c
parent33caad324b88f75f42d836735d86feaafb3b40cf (diff)
downloadop-kernel-dev-2962507ca204f886967e1a089d9bec206d427c22.zip
op-kernel-dev-2962507ca204f886967e1a089d9bec206d427c22.tar.gz
ceph: perform lazy reads when file mode and caps permit
If the file mode is marked as "lazy," perform cached/buffered reads when the caps permit it. Adjust the rdcache_gen and invalidation logic accordingly so that we manage our cache based on the FILE_CACHE -or- FILE_LAZYIO cap bits. Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/inode.c')
-rw-r--r--fs/ceph/inode.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index 389f9db..5d893d3 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -442,8 +442,9 @@ int ceph_fill_file_size(struct inode *inode, int issued,
* the file is either opened or mmaped
*/
if ((issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_RD|
- CEPH_CAP_FILE_WR|CEPH_CAP_FILE_BUFFER|
- CEPH_CAP_FILE_EXCL)) ||
+ CEPH_CAP_FILE_WR|CEPH_CAP_FILE_BUFFER|
+ CEPH_CAP_FILE_EXCL|
+ CEPH_CAP_FILE_LAZYIO)) ||
mapping_mapped(inode->i_mapping) ||
__ceph_caps_file_wanted(ci)) {
ci->i_truncate_pending++;
OpenPOWER on IntegriCloud