From 404b538bea9efc5bda96dbe7bc9be07775bde1e5 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. Signed-off-cy: Sunil Mushran --- 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 2446ac4f57263..87bcf38dfa213 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -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, -- 2.50.1