]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ocfs2/trivial: Limit unaligned aio+dio write messages to once per day
authorSunil Mushran <sunil.mushran@oracle.com>
Wed, 7 Sep 2011 18:39:30 +0000 (11:39 -0700)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Fri, 23 Mar 2012 01:39:49 +0000 (18:39 -0700)
It was printing more frequently.

Signed-off-cy: Sunil Mushran <sunil.mushran@oracle.com>

fs/ocfs2/file.c

index 2446ac4f57263cf2844039c984f3c876c3d9f874..87bcf38dfa213e5286471adbadbc3305d66d2b89 100644 (file)
@@ -2321,9 +2321,11 @@ relock:
 
        if (unaligned_dio) {
                static unsigned long unaligned_warn_time;
-
-               /* Warn about this once per day */
-               if (printk_timed_ratelimit(&unaligned_warn_time, 60*60*24*HZ))
+               /*
+                * Warn max once per day. This should be enough to warn users
+                * about the loss in performance.
+                */
+               if (printk_timed_ratelimit(&unaligned_warn_time, 24*60*60*1000))
                        printk(KERN_NOTICE "ocfs2: Unaligned AIO/DIO on inode "
                               "%lld on device %s by %s\n",
                                (unsigned long long)OCFS2_I(inode)->ip_blkno,