Lines Matching refs:snapc

80 	struct ceph_snap_context *snapc;  in ceph_set_page_dirty()  local
100 snapc = ceph_get_snap_context(capsnap->context); in ceph_set_page_dirty()
104 snapc = ceph_get_snap_context(ci->i_head_snapc); in ceph_set_page_dirty()
115 snapc, snapc->seq, snapc->num_snaps); in ceph_set_page_dirty()
123 page->private = (unsigned long)snapc; in ceph_set_page_dirty()
139 struct ceph_snap_context *snapc = page_snap_context(page); in ceph_invalidatepage() local
159 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in ceph_invalidatepage()
160 ceph_put_snap_context(snapc); in ceph_invalidatepage()
506 struct ceph_snap_context *snapc = NULL; in get_oldest_context() local
517 if (snapc && capsnap->context != page_snapc) in get_oldest_context()
533 if (snapc) in get_oldest_context()
536 snapc = ceph_get_snap_context(capsnap->context); in get_oldest_context()
538 page_snapc == snapc || in get_oldest_context()
539 page_snapc->seq > snapc->seq) in get_oldest_context()
542 if (!snapc && ci->i_wrbuffer_ref_head) { in get_oldest_context()
543 snapc = ceph_get_snap_context(ci->i_head_snapc); in get_oldest_context()
545 snapc, ci->i_wrbuffer_ref_head); in get_oldest_context()
555 return snapc; in get_oldest_context()
562 struct ceph_snap_context *snapc = page_snap_context(page); in get_writepages_data_length() local
566 if (snapc != ci->i_head_snapc) { in get_writepages_data_length()
570 if (capsnap->context == snapc) { in get_writepages_data_length()
596 struct ceph_snap_context *snapc, *oldest; in writepage_nounlock() local
607 snapc = page_snap_context(page); in writepage_nounlock()
608 if (!snapc) { in writepage_nounlock()
612 oldest = get_oldest_context(inode, &ceph_wbc, snapc); in writepage_nounlock()
613 if (snapc->seq > oldest->seq) { in writepage_nounlock()
615 inode, page, snapc); in writepage_nounlock()
635 inode, page, page->index, page_off, len, snapc, snapc->seq); in writepage_nounlock()
643 CEPH_OSD_OP_WRITE, CEPH_OSD_FLAG_WRITE, snapc, in writepage_nounlock()
693 ceph_put_wrbuffer_cap_refs(ci, 1, snapc); in writepage_nounlock()
694 ceph_put_snap_context(snapc); /* page's reference */ in writepage_nounlock()
735 struct ceph_snap_context *snapc = req->r_snapc; in writepages_finish() local
801 ceph_put_wrbuffer_cap_refs(ci, total_pages, snapc); in writepages_finish()
822 struct ceph_snap_context *snapc = NULL, *last_snapc = NULL, *pgsnapc; in ceph_writepages_start() local
854 snapc = get_oldest_context(inode, &ceph_wbc, NULL); in ceph_writepages_start()
855 if (!snapc) { in ceph_writepages_start()
862 snapc, snapc->seq, snapc->num_snaps); in ceph_writepages_start()
865 if (ceph_wbc.head_snapc && snapc != last_snapc) { in ceph_writepages_start()
891 last_snapc = snapc; in ceph_writepages_start()
927 if (pgsnapc != snapc) { in ceph_writepages_start()
929 pgsnapc, pgsnapc->seq, snapc, snapc->seq); in ceph_writepages_start()
1067 snapc, ceph_wbc.truncate_seq, in ceph_writepages_start()
1077 snapc, ceph_wbc.truncate_seq, in ceph_writepages_start()
1202 if (page_snap_context(page) != snapc) in ceph_writepages_start()
1232 struct ceph_snap_context *snapc) in context_is_writeable_or_written() argument
1235 int ret = !oldest || snapc->seq <= oldest->seq; in context_is_writeable_or_written()
1265 struct ceph_snap_context *snapc, *oldest; in ceph_find_incompatible() local
1269 snapc = page_snap_context(page); in ceph_find_incompatible()
1270 if (!snapc || snapc == ci->i_head_snapc) in ceph_find_incompatible()
1278 if (snapc->seq > oldest->seq) { in ceph_find_incompatible()
1281 dout(" page %p snapc %p not current or oldest\n", page, snapc); in ceph_find_incompatible()
1282 return ceph_get_snap_context(snapc); in ceph_find_incompatible()
1287 dout(" page %p snapc %p not current, but oldest\n", page, snapc); in ceph_find_incompatible()
1346 struct ceph_snap_context *snapc; in ceph_write_begin() local
1360 snapc = ceph_find_incompatible(page); in ceph_write_begin()
1361 if (snapc) { in ceph_write_begin()
1362 if (IS_ERR(snapc)) { in ceph_write_begin()
1363 r = PTR_ERR(snapc); in ceph_write_begin()
1371 context_is_writeable_or_written(inode, snapc)); in ceph_write_begin()
1372 ceph_put_snap_context(snapc); in ceph_write_begin()
1640 struct ceph_snap_context *snapc; in ceph_page_mkwrite() local
1650 snapc = ceph_find_incompatible(page); in ceph_page_mkwrite()
1651 if (!snapc) { in ceph_page_mkwrite()
1660 if (IS_ERR(snapc)) { in ceph_page_mkwrite()
1667 context_is_writeable_or_written(inode, snapc)); in ceph_page_mkwrite()
1668 ceph_put_snap_context(snapc); in ceph_page_mkwrite()