sys/dev/disk/dm/targets/striped/dm_target_striped.c
static int
dm_target_stripe_deps(dm_table_entry_t *table_en, prop_array_t prop_array)
{
	dm_target_stripe_config_t *tsc;
	struct vattr va;
	int error;
	int n;

	if (table_en->target_config == NULL)
		return ENOENT;

	tsc = table_en->target_config;
	error = 0;
	for (n = 0; n < tsc->stripe_num; ++n) {
		error = VOP_GETATTR(tsc->stripe_devs[n].pdev->pdev_vnode, &va);
		if (error)
			break;
		prop_array_add_uint64(prop_array,
				(uint64_t)makeudev(va.va_rmajor, va.va_rminor));
	}
	return (error);
}
/*
 * Generate properties from stripe table entry.
 */
Generate properties from stripe table entry.
Generate properties from stripe table entry .
static int
dm_target_stripe_deps(dm_table_entry_t *table_en, prop_array_t prop_array)
{
	dm_target_stripe_config_t *tsc;
	struct vattr va;
	int error;
	int n;
	if (table_en->target_config == NULL)
		return ENOENT;
	tsc = table_en->target_config;
	error = 0;
	for (n = 0; n < tsc->stripe_num; ++n) {
		error = VOP_GETATTR(tsc->stripe_devs[n].pdev->pdev_vnode, &va);
		if (error)
			break;
		prop_array_add_uint64(prop_array,
				(uint64_t)makeudev(va.va_rmajor, va.va_rminor));
	}
	return (error);
}
static int dm_target_stripe_deps ( dm_table_entry_t * table_en , prop_array_t prop_array ) { dm_target_stripe_config_t * tsc ; struct vattr va ; int error ; int n ; if ( table_en -> target_config == NULL ) return ENOENT ; tsc = table_en -> target_config ; error = 0 ; for ( n = 0 ; n < tsc -> stripe_num ; ++ n ) { error = VOP_GETATTR ( tsc -> stripe_devs [ n ] . pdev -> pdev_vnode , & va ) ; if ( error ) break ; prop_array_add_uint64 ( prop_array , ( uint64_t ) makeudev ( va . va_rmajor , va . va_rminor ) ) ; } return ( error ) ; }
Generate properties from stripe table entry.
Generate properties from stripe table entry .