Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188700
b: refs/heads/master
c: 3d497d8
h: refs/heads/master
v: v3
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Feb 11, 2010
1 parent 12f9856 commit 3050dad
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4af6b2257ee0eb8f4bf3b1dc8acb643c0e8a887f
refs/heads/master: 3d497d858ae6e5f23a28783030aecc69074e102d
12 changes: 10 additions & 2 deletions trunk/fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -416,9 +416,17 @@ int ceph_fill_file_size(struct inode *inode, int issued,
dout("truncate_seq %u -> %u\n",
ci->i_truncate_seq, truncate_seq);
ci->i_truncate_seq = truncate_seq;
if (issued & (CEPH_CAP_FILE_CACHE|CEPH_CAP_FILE_RD|
/*
* If we hold relevant caps, or in the case where we're
* not the only client referencing this file and we
* don't hold those caps, then we need to check whether
* 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_EXCL)) ||
mapping_mapped(inode->i_mapping) ||
__ceph_caps_file_wanted(ci)) {
ci->i_truncate_pending++;
queue_trunc = 1;
}
Expand Down

0 comments on commit 3050dad

Please sign in to comment.