All of lore.kernel.org
 help / color / mirror / Atom feed
From: Milan Broz <mbroz@redhat.com>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: device-mapper development <dm-devel@redhat.com>
Subject: Re: [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl.
Date: Fri, 19 Mar 2010 10:10:05 +0100	[thread overview]
Message-ID: <4BA33F6D.7070306@redhat.com> (raw)
In-Reply-To: <ac3eb2511003190127n1aa2dda5pbd4e0841a46830bc@mail.gmail.com>

On 03/19/2010 09:27 AM, Kay Sievers wrote:
> On Thu, Mar 18, 2010 at 22:35, Milan Broz <mbroz@redhat.com> wrote:

> /sys is the direct export of kernel objects, if you create objects,
> they appear, and they get announced. If you don't want them to be
> announced at that time, just don't register them at that time.

Well, again, I used something what is already used (not on many places,
but it is there), just search for dev_set_uevent_suppress().

See

/* delay uevents, until we scanned partition table */
dev_set_uevent_suppress(ddev, 1);

... (part table scan etc. it reads disk, so there can be
significant delay if device retries read for example)

+ /* caller will send ADD event later */
+ if (disk->flags & GENHD_FL_SUPPRESS_ADD_EVENT)
+ return;
+
/* announce disk after possible partitions are created */
dev_set_uevent_suppress(ddev, 0);
kobject_uevent(&ddev->kobj, KOBJ_ADD);


So the comment says that base device is announced after all
partitions devices are created.

I thought it is exactly the same model I used - so there is for
some time unannounced fully created "dead" device in sysfs.

Probably I am still missing where the problem is - the ADD
event is sent later, so the problem in time interval?
Or the atomicity of the call?

Well, if it is not acceptable (is this what you want to say?),
what do you suggest?

Not use add_disk()/del_gendisk() in dm core and rewrite it?
This seems like change a lot of code. And after that someone
surely will say "why dm implements this differently".

But I think it always need a change in device core code.

Thanks,
Milan
--
mbroz@redhat.com

  parent reply	other threads:[~2010-03-19  9:10 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-18 13:58 [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl Milan Broz
2010-03-18 13:58 ` [PATCH 2/3] Add genhd flag requesting notification of partition changes only Milan Broz
2010-03-18 13:58 ` [PATCH 3/3] Do not send multiple REMOVE events for kobjects Milan Broz
2010-03-18 16:13 ` [PATCH 1/3] Send KOBJ_ADD event after dm resume ioctl Kay Sievers
2010-03-18 17:24   ` Alasdair G Kergon
2010-03-18 21:35   ` Milan Broz
2010-03-19  8:27     ` Kay Sievers
2010-03-19  9:06       ` Lars Ellenberg
2010-03-19  9:24         ` Kay Sievers
2010-03-19  9:49           ` Milan Broz
2010-03-19 10:16             ` Kay Sievers
2010-03-19 11:14               ` Milan Broz
2010-03-19 11:44                 ` Kay Sievers
2010-03-19 12:08                   ` Milan Broz
2010-03-19 12:14                     ` Kay Sievers
2010-03-19 11:50                 ` Hannes Reinecke
2010-03-19 12:00               ` Alasdair G Kergon
2010-03-19 12:12               ` Alasdair G Kergon
2010-03-19 12:16                 ` Kay Sievers
2010-03-19 13:17                   ` Peter Rajnoha
2010-03-19 13:24           ` Peter Rajnoha
2010-03-19 13:43             ` Kay Sievers
2010-03-19 13:47               ` Alasdair G Kergon
2010-03-19 13:58               ` David Zeuthen
2010-03-19 14:34                 ` Alasdair G Kergon
2010-03-19 14:59                   ` David Zeuthen
2010-03-19 15:24                     ` Alasdair G Kergon
2010-03-19 16:01                       ` David Zeuthen
2010-03-19 16:36                         ` Alasdair G Kergon
2010-03-22 10:11                         ` Milan Broz
2010-03-19 15:55                 ` Mike Snitzer
2010-03-19 16:08                   ` David Zeuthen
2010-03-19 14:08             ` Hannes Reinecke
2010-03-19 15:05               ` Peter Rajnoha
2010-03-19 15:14                 ` David Zeuthen
2010-03-19 15:51                   ` Peter Rajnoha
2010-03-19  9:10       ` Milan Broz [this message]
2010-03-19  9:22         ` Kay Sievers
2010-03-19  9:42 ` Hannes Reinecke
2010-03-19 12:27   ` 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=4BA33F6D.7070306@redhat.com \
    --to=mbroz@redhat.com \
    --cc=dm-devel@redhat.com \
    --cc=kay.sievers@vrfy.org \
    /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.