All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hannes Reinecke <hare@suse.de>
To: lvm-devel@redhat.com
Subject: udev cookie on DM_DEVICE_RELOAD
Date: Mon, 29 Jun 2015 16:56:54 +0200	[thread overview]
Message-ID: <55915CB6.9070407@suse.de> (raw)
In-Reply-To: <55915B15.708@redhat.com>

On 06/29/2015 04:49 PM, Peter Rajnoha wrote:
[ .. ]
> 
> Actually, we don't check proper combination of dm_task_set_cookie with
> dm task type. So currently, if someone sets cookie on a task that does
> not produce uevents, it can hang if dm_udev_wait is called for such cookie.
> 
> I've noticed we have a FIXME in the code for this already, but clearly
> nobody has run into this issue yet. I'll add the check!
> 
> As for the DM_DEVICE_RELOAD - yes, it needs DM_DEVICE_RESUME to be called
> right after the reload for the new table to be used (and hence the uevent
> with the cookie generated as well). If you call RELOAD, the inactive
> table is loaded which is then switched to active with the RESUME.
> 
> The task that is transparently translated into 3 tasks internally is the
> DM_DEVICE_CREATE (with table) which translates into CREATE + LOAD + RESUME.
> 
> Anyway, yes, the check whether cookie is not misused is not there yet, so
> that's why you hit this.
> 
So how to circumvent this?
Should I do an explicit
SUSPEND/RELOAD/RESUME call sequence and add a cookie on the final
resume?
Or is it sufficient to call RESUME after RELOAD without suspending
first? Or another magic trick?

Cheers,

Hannes
-- 
Dr. Hannes Reinecke		               zSeries & Storage
hare at suse.de			               +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 N?rnberg
GF: F. Imend?rffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG N?rnberg)



  reply	other threads:[~2015-06-29 14:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-29 13:46 udev cookie on DM_DEVICE_RELOAD Hannes Reinecke
2015-06-29 14:02 ` Mike Snitzer
2015-06-29 14:02   ` Mike Snitzer
2015-06-29 14:49   ` Peter Rajnoha
2015-06-29 14:49     ` Peter Rajnoha
2015-06-29 14:56     ` Hannes Reinecke [this message]
2015-06-29 15:01       ` Peter Rajnoha
2015-06-29 15:10         ` Alasdair G Kergon
2015-06-29 14:45 ` Alasdair G Kergon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55915CB6.9070407@suse.de \
    --to=hare@suse.de \
    --cc=lvm-devel@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.