Skip to content

Commit

Permalink
ceph: use ->invalidatepage() length argument
Browse files Browse the repository at this point in the history
->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
  • Loading branch information
Lukas Czerner authored and Theodore Ts'o committed May 22, 2013
1 parent e5f8d30 commit 569d39f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 569d39f

Please sign in to comment.