/* when btree blocks are allocated, they have some corresponding bits set for them in one of two extent_io trees. This is used to make sure all of those extents are on disk for transaction or log commit  */
int btrfs_write_and_wait_marked_extents(struct btrfs_root *root, struct extent_io_tree *dirty_pages, int mark)
/* when btree blocks are allocated, they have some corresponding bits set for them in one of two extent_io trees. This is used to make sure all of those extents are on disk for transaction or log commit  */
int btrfs_write_and_wait_marked_extents(struct btrfs_root *root, struct extent_io_tree *dirty_pages, int mark)
{
	int ret;
	int ret2;
	ret = btrfs_write_marked_extents(root, dirty_pages, mark);
	ret2 = btrfs_wait_marked_extents(root, dirty_pages, mark);
	return ret || ret2;
}