typedef int (*section_fn) (struct format_instance * fid, struct dm_pool * mem,
struct volume_group * vg, struct config_node * pvn,
struct config_node * vgn,
- struct dm_hash_table * pv_hash);
+ struct dm_hash_table * pv_hash,
+ int *scan_done_once);
#define _read_int32(root, path, result) \
get_config_uint32(root, path, (uint32_t *) result)
static int _read_pv(struct format_instance *fid, struct dm_pool *mem,
struct volume_group *vg, struct config_node *pvn,
struct config_node *vgn __attribute((unused)),
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash, int *scan_done_once)
{
struct physical_volume *pv;
struct pv_list *pvl;
/*
* Convert the uuid into a device.
*/
- if (!(pv->dev = device_from_pvid(fid->fmt->cmd, &pv->id))) {
+ if (!(pv->dev = device_from_pvid(fid->fmt->cmd, &pv->id, scan_done_once))) {
char buffer[64] __attribute((aligned(8)));
if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
struct dm_pool *mem,
struct volume_group *vg, struct config_node *lvn,
struct config_node *vgn __attribute((unused)),
- struct dm_hash_table *pv_hash __attribute((unused)))
+ struct dm_hash_table *pv_hash __attribute((unused)),
+ int *scan_done_once __attribute((unused)))
{
struct logical_volume *lv;
struct config_node *cn;
struct dm_pool *mem,
struct volume_group *vg, struct config_node *lvn,
struct config_node *vgn __attribute((unused)),
- struct dm_hash_table *pv_hash)
+ struct dm_hash_table *pv_hash,
+ int *scan_done_once __attribute((unused)))
{
struct logical_volume *lv;
struct lv_list *lvl;
struct dm_hash_table *pv_hash, int optional)
{
struct config_node *n;
+ int scan_done_once = 0;
if (!(n = find_config_node(vgn, section))) {
if (!optional) {
}
for (n = n->child; n; n = n->sib) {
- if (!fn(fid, mem, vg, n, vgn, pv_hash))
+ if (!fn(fid, mem, vg, n, vgn, pv_hash, &scan_done_once))
return_0;
}