From: Sunil Mushran Date: Wed, 7 Sep 2011 18:39:30 +0000 (-0700) Subject: ocfs2/trivial: Limit unaligned aio+dio write messages to once per day X-Git-Tag: v2.6.39-400.9.0~576 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=404b538bea9efc5bda96dbe7bc9be07775bde1e5;p=users%2Fjedix%2Flinux-maple.git ocfs2/trivial: Limit unaligned aio+dio write messages to once per day It was printing more frequently. Signed-off-cy: Sunil Mushran --- diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 2446ac4f5726..87bcf38dfa21 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,