Trantow, Wayne D [wayne.d.trantow@xxxxxxxxx] wrote: > >Quick glance indicates that resume and suspend, they both, seem to use > >suspend ioctl command. DM_SUSPEND_FLAG is used to take the suspend > >operation, otherwise resume operation is done. See dev_suspend() in > >drivers/md/dm-ioctl.c > > Yes. At this point only __dev_status() in dm-ioctl sets the > DM_SUSPEND_FLAG. So it seems that most calls to dev_suspend in the > kernel are really doing a do_resume(). But the confusing part is that, > in user space, the add_dev_to_raid1() calls reload_subset() which calls > dm_suspend, followed by dm_resume. So, we are probably actually getting > the dm_suspend call eventuating in a 'do_resume' call (in the kernel) > followed by the dm_resume call which gets dropped on the floor in > device-mapper (because DM_DEV_RESUME is not mapped into the _cmd_data_v4 > table). > > Are there any docs that explain how to setup a debug environment where I > can trace the execution path from user space, i.e., from > add_dev_to_raid1(), down into kernel space via device-mapper to see how > it actually works? > > SkipT. I don't know anything about add_dev_to_raid1() (don't have dmraid1 code with me) but DM_SUSPEND_FLAG is set by the user level code in lib/ioctl/libdm-iface.c -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel