diff options
author | Namhyung Kim <namhyung@gmail.com> | 2011-10-31 16:18:54 -0400 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2011-10-31 16:18:54 -0400 |
commit | 71a16736a15e3fd11d283c42aa86bf704f6d25ff (patch) | |
tree | 1c6c54e8229b422756ec775cc04ad0066d1ad0c8 /drivers/md/dm.c | |
parent | 4693c9668fdcec229825b3763876b4744f9e6d5e (diff) |
dm: use local printk ratelimit
printk_ratelimit() shares global ratelimiting state with all
other subsystems, so its usage is discouraged. Instead,
define and use dm's local state.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers/md/dm.c')
-rw-r--r-- | drivers/md/dm.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 52b39f335bb3..52a8fd8eb17f 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c | |||
@@ -25,6 +25,16 @@ | |||
25 | 25 | ||
26 | #define DM_MSG_PREFIX "core" | 26 | #define DM_MSG_PREFIX "core" |
27 | 27 | ||
28 | #ifdef CONFIG_PRINTK | ||
29 | /* | ||
30 | * ratelimit state to be used in DMXXX_LIMIT(). | ||
31 | */ | ||
32 | DEFINE_RATELIMIT_STATE(dm_ratelimit_state, | ||
33 | DEFAULT_RATELIMIT_INTERVAL, | ||
34 | DEFAULT_RATELIMIT_BURST); | ||
35 | EXPORT_SYMBOL(dm_ratelimit_state); | ||
36 | #endif | ||
37 | |||
28 | /* | 38 | /* |
29 | * Cookies are numeric values sent with CHANGE and REMOVE | 39 | * Cookies are numeric values sent with CHANGE and REMOVE |
30 | * uevents while resuming, removing or renaming the device. | 40 | * uevents while resuming, removing or renaming the device. |