summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2013-05-21 23:58:48 -0400
committerTheodore Ts'o <tytso@mit.edu>2013-05-21 23:58:48 -0400
commit569d39fc3e1dd9d23ad44f5e7e51ccf69d368720 (patch)
tree9472e48380bb007249d91235d55eebaace72a0dd /fs/ceph
parente5f8d30d6827633c9ac084143cbf8fffc1844da5 (diff)
downloadlinux-569d39fc3e1dd9d23ad44f5e7e51ccf69d368720.tar.bz2
ceph: use ->invalidatepage() length argument
->invalidatepage() aop now accepts range to invalidate so we can make use of it in ceph_invalidatepage(). Signed-off-by: Lukas Czerner <lczerner@redhat.com> Acked-by: Sage Weil <sage@inktank.com> Cc: ceph-devel@vger.kernel.org
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/addr.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ceph/addr.c b/fs/ceph/addr.c
index b1899400df1f..38b5c1bc6776 100644
--- a/fs/ceph/addr.c
+++ b/fs/ceph/addr.c
@@ -164,20 +164,20 @@ static void ceph_invalidatepage(struct page *page, unsigned int offset,
if (!PageDirty(page))
pr_err("%p invalidatepage %p page not dirty\n", inode, page);
- if (offset == 0)
+ if (offset == 0 && length == PAGE_CACHE_SIZE)
ClearPageChecked(page);
ci = ceph_inode(inode);
- if (offset == 0) {
- dout("%p invalidatepage %p idx %lu full dirty page %u\n",
- inode, page, page->index, offset);
+ if (offset == 0 && length == PAGE_CACHE_SIZE) {
+ dout("%p invalidatepage %p idx %lu full dirty page\n",
+ inode, page, page->index);
ceph_put_wrbuffer_cap_refs(ci, 1, snapc);
ceph_put_snap_context(snapc);
page->private = 0;
ClearPagePrivate(page);
} else {
- dout("%p invalidatepage %p idx %lu partial dirty page\n",
- inode, page, page->index);
+ dout("%p invalidatepage %p idx %lu partial dirty page %u(%u)\n",
+ inode, page, page->index, offset, length);
}
}