heinzm at redhat.com
Fri Dec 5 20:44:05 UTC 2008
Am Freitag, den 05.12.2008, 11:49 -0500 schrieb Phillip Susi:
> Heinz Mauelshagen wrote:
> > Because "type = DM_DEVICE_REMOVE" is passed via dm_remove().
> > See the dm_task_create(type) call in run_task, which hence receives a
> > DM_REMOVE_DEVICE as the type.
> But in rc14 run_task() is not called for DM_DEVICE_REMOVE.
It actually is being called in -rc14:
/* Remove a mapped device. */
int dm_remove(struct lib_context *lc, struct raid_set *rs)
/* Remove <dev_name> */
return run_task(lc, rs, NULL, DM_DEVICE_REMOVE);
> > Code you reference in rc15 has been added for mapped device UUID
> > support. It only creates and sets a UUID on DM_DEVICE_CREATE for obvious
> > reasons.
> They both call dmraid_uuid for DM_DEVICE_CREATE.
No, -rc15 does set the UUID, -rc14 doesn't.
> The difference is that
> rc14 only calls dm_task_run for DM_DEVICE_CREATE,
No, -rc14 calls dm_task_run for both DM_DEVICE_CREATE and
/* Create a task, set its name and run it. */
static int run_task(struct lib_context *lc, struct raid_set *rs,
char *table, int type)
struct dm_task *dmt;
ret = (dmt = dm_task_create(type)) && dm_task_set_name(dmt,
if (ret && table)
ret = parse_table(lc, dmt, table);
/**** Here dm_task_run() is being called for *and* type, unless dm
infrastructure or table parse failure ****/
ret = dm_task_run(dmt);
> and rc15 calls it no
> matter what the type is. This looks to me like in rc14 it sets up a
> task to remove the device, but never actually executes it since
> dm_task_run is never called.
It is: see above explanation and code sample.
More information about the Ataraid-list