Lines Matching refs:snapc
80 struct ceph_snap_context *snapc; in ceph_set_page_dirty() local
104 snapc = ceph_get_snap_context(capsnap->context); in ceph_set_page_dirty()
108 snapc = ceph_get_snap_context(ci->i_head_snapc); in ceph_set_page_dirty()
119 snapc, snapc->seq, snapc->num_snaps); in ceph_set_page_dirty()
127 page->private = (unsigned long)snapc; in ceph_set_page_dirty()
147 struct ceph_snap_context *snapc = page_snap_context(page); in ceph_invalidatepage() local
167 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in ceph_invalidatepage()
168 ceph_put_snap_context(snapc); in ceph_invalidatepage()
514 struct ceph_snap_context *snapc = NULL; in get_oldest_context() local
525 if (snapc && capsnap->context != page_snapc) in get_oldest_context()
541 if (snapc) in get_oldest_context()
544 snapc = ceph_get_snap_context(capsnap->context); in get_oldest_context()
546 page_snapc == snapc || in get_oldest_context()
547 page_snapc->seq > snapc->seq) in get_oldest_context()
550 if (!snapc && ci->i_wrbuffer_ref_head) { in get_oldest_context()
551 snapc = ceph_get_snap_context(ci->i_head_snapc); in get_oldest_context()
553 snapc, ci->i_wrbuffer_ref_head); in get_oldest_context()
563 return snapc; in get_oldest_context()
570 struct ceph_snap_context *snapc = page_snap_context(page); in get_writepages_data_length() local
574 if (snapc != ci->i_head_snapc) { in get_writepages_data_length()
578 if (capsnap->context == snapc) { in get_writepages_data_length()
604 struct ceph_snap_context *snapc, *oldest; in writepage_nounlock() local
615 snapc = page_snap_context(page); in writepage_nounlock()
616 if (!snapc) { in writepage_nounlock()
620 oldest = get_oldest_context(inode, &ceph_wbc, snapc); in writepage_nounlock()
621 if (snapc->seq > oldest->seq) { in writepage_nounlock()
623 inode, page, snapc); in writepage_nounlock()
643 inode, page, page->index, page_off, len, snapc, snapc->seq); in writepage_nounlock()
651 CEPH_OSD_OP_WRITE, CEPH_OSD_FLAG_WRITE, snapc, in writepage_nounlock()
701 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in writepage_nounlock()
702 ceph_put_snap_context(snapc); /* page's reference */ in writepage_nounlock()
743 struct ceph_snap_context *snapc = req->r_snapc; in writepages_finish() local
809 ceph_put_wrbuffer_cap_refs(ci, total_pages, snapc); in writepages_finish()
830 struct ceph_snap_context *snapc = NULL, *last_snapc = NULL, *pgsnapc; in ceph_writepages_start() local
862 snapc = get_oldest_context(inode, &ceph_wbc, NULL); in ceph_writepages_start()
863 if (!snapc) { in ceph_writepages_start()
870 snapc, snapc->seq, snapc->num_snaps); in ceph_writepages_start()
873 if (ceph_wbc.head_snapc && snapc != last_snapc) { in ceph_writepages_start()
899 last_snapc = snapc; in ceph_writepages_start()
935 if (pgsnapc != snapc) { in ceph_writepages_start()
937 pgsnapc, pgsnapc->seq, snapc, snapc->seq); in ceph_writepages_start()
1075 snapc, ceph_wbc.truncate_seq, in ceph_writepages_start()
1085 snapc, ceph_wbc.truncate_seq, in ceph_writepages_start()
1210 if (page_snap_context(page) != snapc) in ceph_writepages_start()
1240 struct ceph_snap_context *snapc) in context_is_writeable_or_written() argument
1243 int ret = !oldest || snapc->seq <= oldest->seq; in context_is_writeable_or_written()
1273 struct ceph_snap_context *snapc, *oldest; in ceph_find_incompatible() local
1277 snapc = page_snap_context(page); in ceph_find_incompatible()
1278 if (!snapc || snapc == ci->i_head_snapc) in ceph_find_incompatible()
1286 if (snapc->seq > oldest->seq) { in ceph_find_incompatible()
1289 dout(" page %p snapc %p not current or oldest\n", page, snapc); in ceph_find_incompatible()
1290 return ceph_get_snap_context(snapc); in ceph_find_incompatible()
1295 dout(" page %p snapc %p not current, but oldest\n", page, snapc); in ceph_find_incompatible()
1315 struct ceph_snap_context *snapc; in ceph_write_begin() local
1330 snapc = ceph_find_incompatible(page); in ceph_write_begin()
1331 if (snapc) { in ceph_write_begin()
1332 if (IS_ERR(snapc)) { in ceph_write_begin()
1333 r = PTR_ERR(snapc); in ceph_write_begin()
1341 context_is_writeable_or_written(inode, snapc)); in ceph_write_begin()
1342 ceph_put_snap_context(snapc); in ceph_write_begin()
1620 struct ceph_snap_context *snapc; in ceph_page_mkwrite() local
1630 snapc = ceph_find_incompatible(page); in ceph_page_mkwrite()
1631 if (!snapc) { in ceph_page_mkwrite()
1640 if (IS_ERR(snapc)) { in ceph_page_mkwrite()
1647 context_is_writeable_or_written(inode, snapc)); in ceph_page_mkwrite()
1648 ceph_put_snap_context(snapc); in ceph_page_mkwrite()