/* Convert & write out a cluster of pages in the same extent as defined by mp and following the start page.  */
STATIC void xfs_cluster_write(struct inode *inode, pgoff_t tindex, xfs_iomap_t *iomapp, xfs_ioend_t **ioendp, struct writeback_control *wbc, int startio, int all_bh, pgoff_t tlast)
/* Convert & write out a cluster of pages in the same extent as defined by mp and following the start page.  */
STATIC void xfs_cluster_write(struct inode *inode, pgoff_t tindex, xfs_iomap_t *iomapp, xfs_ioend_t **ioendp, struct writeback_control *wbc, int startio, int all_bh, pgoff_t tlast)
{
	struct pagevec		pvec;
	int			done = 0, i;
	pagevec_init(&pvec, 0);
	while (!done && tindex <= tlast) {
		unsigned len = min_t(pgoff_t, PAGEVEC_SIZE, tlast - tindex + 1);
		if (!pagevec_lookup(&pvec, inode->i_mapping, tindex, len))
			break;
		for (i = 0; i < pagevec_count(&pvec); i++) {
			done = xfs_convert_page(inode, pvec.pages[i], tindex++,
					iomapp, ioendp, wbc, startio, all_bh);
			if (done)
				break;
		}
		pagevec_release(&pvec);
		cond_resched();
	}
}