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>
This commit is contained in:
@@ -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++;
|
||||
|
Reference in New Issue
Block a user