]> 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)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 29 Jun 2015 15:30:26 +0000 (08:30 -0700)
It was printing more frequently.

Orabug: 17342255

Signed-off-cy: Sunil Mushran <sunil.mushran@oracle.com>
Signed-off-by: Srinivas Eeda <srinivas.eeda@oracle.com>
(cherry picked from commit 8a2aa282cf9e003337f6c6949b1c7ed78347d59c)

fs/ocfs2/file.c

index e6e174649974bcefc2dc36a062b0af298751330e..b18e75ee421432ec3c34edc93cf2f78d2295692f 100644 (file)
@@ -2359,9 +2359,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,