FreeBSD/sys/geom/virstor/g_virstor.c
/*
 * Update metadata on all components to reflect the current state
 * of these fields:
 *    - chunk_next
 *    - flags
 *    - md_count
 * Expects things to be set up so write_metadata() can work, i.e.
 * the topology lock must be held.
 */
Update metadata on all components to reflect the current state
of these fields:
- chunk_next
- flags
- md_count
Expects things to be set up so write_metadata() can work, i.e.
the topology lock must be held.
Update metadata on all components to reflect the current state of these fields : - chunk_next - flags - md_count Expects things to be set up so write_metadata () can work i . e . the topology lock must be held .
static void
update_metadata(struct g_virstor_softc *sc)
{
	struct g_virstor_metadata md;
	u_int n;
	if (virstor_valid_components(sc) != sc->n_components)
		return; 
	LOG_MSG(LVL_DEBUG, "Updating metadata on components for %s",
	    sc->geom->name);
	g_trace(G_T_TOPOLOGY, "%s(%s, %s)", __func__,
	    sc->geom->class->name, sc->geom->name);
	g_topology_assert();
	for (n = 0; n < sc->n_components; n++) {
		read_metadata(sc->components[n].gcons, &md);
		md.chunk_next = sc->components[n].chunk_next;
		md.flags = sc->components[n].flags;
		md.md_count = sc->n_components;
		write_metadata(sc->components[n].gcons, &md);
	}
}
static void update_metadata ( struct g_virstor_softc * sc ) { struct g_virstor_metadata md ; u_int n ; if ( virstor_valid_components ( sc ) != sc -> n_components ) return ; LOG_MSG ( LVL_DEBUG , " " , sc -> geom -> name ) ; g_trace ( G_T_TOPOLOGY , " " , __func__ , sc -> geom -> class -> name , sc -> geom -> name ) ; g_topology_assert ( ) ; for ( n = 0 ; n < sc -> n_components ; n ++ ) { read_metadata ( sc -> components [ n ] . gcons , & md ) ; md . chunk_next = sc -> components [ n ] . chunk_next ; md . flags = sc -> components [ n ] . flags ; md . md_count = sc -> n_components ; write_metadata ( sc -> components [ n ] . gcons , & md ) ; } }
Update metadata on all components to reflect the current state
 of these fields:
    - chunk_next
    - flags
    - md_count
 Expects things to be set up so write_metadata() can work, i.e.
Update metadata on all components to reflect the current state of these fields : - chunk_next - flags - md_count Expects things to be set up so write_metadata () can work i . e .
/* Incomplete device */ /* Update metadata on components */