Re: Set deactivation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Donnerstag, den 04.12.2008, 13:28 -0500 schrieb Phillip Susi:
> Heinz Mauelshagen wrote:
> > Before I search...
> > Which dmraid version are you referring to.
> 
> rc14.  I just checked rc15 and it has been changed to:
> 
>          if (DM_DEVICE_CREATE == type) {
>                  ret = dmraid_uuid(lc, rs, uuid, DM_UUID_LEN) &&
>                          dm_task_set_uuid(dmt, uuid) && dm_task_run(dmt);
>          } else
>                  ret = dm_task_run(dmt);
> 
> Which makes more sense, but I'm still left wondering how deactivation 
> ever worked in rc14.

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.

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.

Heinz

> 
> > Am Dienstag, den 02.12.2008, 14:43 -0500 schrieb Phillip Susi:
> >> I'm trying to debug why dmraid won't deactivate this raid set and am 
> >> very confused by the code I see.  Hopefully someone can shed some light 
> >> on this.
> >>
> >> change_set() calls deactivate_set() which calls dm_remove(), which calls 
> >> run_task() in lib/activate/devmapper.c.  run_task() looks like this:
> >>
> >>          if (ret &&
> >>              DM_DEVICE_CREATE == type)
> >>                  ret = dmraid_uuid(lc, rs, uuid, DM_UUID_LEN) &&
> >>                        dm_task_set_uuid(dmt, uuid) &&
> >>                        dm_task_run(dmt);
> >>
> >> Now that looks to me like the only kind of task it will run is a create 
> >> task, not a remove task, like the one it is being asked to do.  This 
> >> code looks like it will never work, as if the removal code was never 
> >> completed, yet I know that dmraid -an does work normally, so what gives?
> 

_______________________________________________
Ataraid-list mailing list
Ataraid-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/ataraid-list

[Index of Archives]     [Linux RAID]     [Linux Device Mapper]     [Linux IDE]     [Linux SCSI]     [Kernel]     [Linux Books]     [Linux Admin]     [GFS]     [RPM]     [Yosemite Campgrounds]     [AMD 64]

  Powered by Linux