Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 188723
b: refs/heads/master
c: e63dc5c
h: refs/heads/master
i:
  188721: 135fd15
  188719: 2b0c335
v: v3
  • Loading branch information
Yehuda Sadeh authored and Sage Weil committed Feb 19, 2010
1 parent 524b8ee commit ecc211e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5ecad6fd7bfd30b3eaea51345f546b81de7a6473
refs/heads/master: e63dc5c780ba32d6d8b3662eecce2b8d96489b41
11 changes: 11 additions & 0 deletions trunk/fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,7 @@ static void writepages_finish(struct ceph_osd_request *req,
u64 bytes = 0;
struct ceph_client *client = ceph_inode_to_client(inode);
long writeback_stat;
unsigned issued = __ceph_caps_issued(ci, NULL);

/* parse reply */
replyhead = msg->front.iov_base;
Expand Down Expand Up @@ -559,6 +560,16 @@ static void writepages_finish(struct ceph_osd_request *req,
ceph_put_snap_context(snapc);
dout("unlocking %d %p\n", i, page);
end_page_writeback(page);

/*
* We lost the cache cap, need to truncate the page before
* it is unlocked, otherwise we'd truncate it later in the
* page truncation thread, possibly losing some data that
* raced its way in
*/
if ((issued & CEPH_CAP_FILE_CACHE) == 0)
generic_error_remove_page(inode->i_mapping, page);

unlock_page(page);
}
dout("%p wrote+cleaned %d pages\n", inode, wrote);
Expand Down

0 comments on commit ecc211e

Please sign in to comment.