From 34419e0fa1118b1adb4a21b98fe83ac279eb78a4 Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Wed, 7 Sep 2011 11:39:30 -0700 Subject: [PATCH] ocfs2/trivial: Limit unaligned aio+dio write messages to once per day It was printing more frequently. Orabug: 17342255 Signed-off-cy: Sunil Mushran Signed-off-by: Srinivas Eeda (cherry picked from commit 8a2aa282cf9e003337f6c6949b1c7ed78347d59c) --- fs/ocfs2/file.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index e6e174649974..b18e75ee4214 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -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, -- 2.50.1