]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
drbd: use drbd specific ratelimit instead of global printk_ratelimit
authorLars Ellenberg <lars.ellenberg@linbit.com>
Thu, 27 May 2010 09:51:56 +0000 (11:51 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 1 Jun 2010 09:12:27 +0000 (11:12 +0200)
using the global printk_ratelimit() may mask other messages.

Signed-off-by: Philipp Reisner <philipp.reisner@linbit.com>
Signed-off-by: Lars Ellenberg <lars.ellenberg@linbit.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
drivers/block/drbd/drbd_int.h
drivers/block/drbd/drbd_main.c

index 86605f6d08543a7178ebecc103a514e57283bb7d..485ed8c7d623986b1aabbcd19ee50768f6c60c4c 100644 (file)
@@ -1725,7 +1725,7 @@ static inline void __drbd_chk_io_error_(struct drbd_conf *mdev, int forcedetach,
        switch (mdev->ldev->dc.on_io_error) {
        case EP_PASS_ON:
                if (!forcedetach) {
-                       if (printk_ratelimit())
+                       if (__ratelimit(&drbd_ratelimit_state))
                                dev_err(DEV, "Local IO failed in %s."
                                             "Passing error on...\n", where);
                        break;
index c978557b4b805b0107e9d1c3c82d722cabd77c22..6b077f93acc620eaf40fa85599dbe83745779c28 100644 (file)
@@ -3783,7 +3783,7 @@ _drbd_insert_fault(struct drbd_conf *mdev, unsigned int type)
        if (ret) {
                fault_count++;
 
-               if (printk_ratelimit())
+               if (__ratelimit(&drbd_ratelimit_state))
                        dev_warn(DEV, "***Simulating %s failure\n",
                                _drbd_fault_str(type));
        }