From 2962507ca204f886967e1a089d9bec206d427c22 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 27 May 2010 10:40:43 -0700 Subject: 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 --- fs/ceph/addr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/ceph/addr.c') diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c index d9c60b84949a..e00797eed29c 100644 --- a/fs/ceph/addr.c +++ b/fs/ceph/addr.c @@ -552,7 +552,7 @@ static void writepages_finish(struct ceph_osd_request *req, * page truncation thread, possibly losing some data that * raced its way in */ - if ((issued & CEPH_CAP_FILE_CACHE) == 0) + if ((issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_LAZYIO)) == 0) generic_error_remove_page(inode->i_mapping, page); unlock_page(page); -- cgit v1.2.3