Ejemplo n.º 1
0
/*
 * This function computes the actual size, in blocks, that can be prefetched,
 * and fetches it.
 */
static uint64_t
dmu_zfetch_fetch(dnode_t *dn, uint64_t blkid, uint64_t nblks)
{
	uint64_t	fetchsz;
	uint64_t	i;

	fetchsz = dmu_zfetch_fetchsz(dn, blkid, nblks);

	for (i = 0; i < fetchsz; i++) {
		dbuf_prefetch(dn, blkid + i);
	}

	return (fetchsz);
}
Ejemplo n.º 2
0
/*
 * This function computes the actual size, in blocks, that can be prefetched,
 * and fetches it.
 */
static uint64_t
dmu_zfetch_fetch(dnode_t *dn, uint64_t blkid, uint64_t nblks)
{
	uint64_t	fetchsz;
	uint64_t	i;

	fetchsz = dmu_zfetch_fetchsz(dn, blkid, nblks);

	for (i = 0; i < fetchsz; i++) {
		dbuf_prefetch(dn, 0, blkid + i, ZIO_PRIORITY_ASYNC_READ,
		    ARC_FLAG_PREFETCH);
	}

	return (fetchsz);
}