]> Pileus Git - ~andy/linux/commit
UBI: add notification API
authorDmitry Pervushin <dpervushin@embeddedalley.com>
Wed, 29 Apr 2009 15:29:38 +0000 (19:29 +0400)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Tue, 2 Jun 2009 10:53:35 +0000 (13:53 +0300)
commit0e0ee1cc33de8f0cc603269b354085dee340afa0
tree5dfd658b85eabadfbf0c94bee94d46f8d74b839b
parentb86a2c56e512f46d140a4bcb4e35e8a7d4a99a4b
UBI: add notification API

UBI volume notifications are intended to create the API to get clients
notified about volume creation/deletion, renaming and re-sizing. A
client can subscribe to these notifications using 'ubi_volume_register()'
and cancel the subscription using 'ubi_volume_unregister()'. When UBI
volumes change, a blocking notifier is called. Clients also can request
"added" events on all volumes that existed before client subscribed
to the notifications.

If we use notifications instead of calling functions like 'ubi_gluebi_xxx()',
we can make the MTD emulation layer to be more flexible: build it as a
separate module and load/unload it on demand.

[Artem: many cleanups, rework locking, add "updated" event, provide
 device/volume info in notifiers]

Signed-off-by: Dmitry Pervushin <dpervushin@embeddedalley.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
drivers/mtd/ubi/build.c
drivers/mtd/ubi/cdev.c
drivers/mtd/ubi/kapi.c
drivers/mtd/ubi/ubi.h
drivers/mtd/ubi/vmt.c
include/linux/mtd/ubi.h