From 0596d92ba6f7ea450b4deb2eb65ea42aa3ee11ad Mon Sep 17 00:00:00 2001 From: Sunil Mushran Date: Mon, 15 Aug 2011 13:49:11 -0700 Subject: [PATCH] ocfs2/trivial: Print message indicating unaligned aio+dio write Print a message indicating unaligned aio+dio writes. It prints a message once per 24 hrs. Orabug: 17342255 Signed-off-by: Sunil Mushran Signed-off-by: Srinivas Eeda (cherry picked from commit dd146cf4c67bfce3a1fe1495c2f68d149d1c6db0) --- fs/ocfs2/file.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index d8b670cbd909..e6e174649974 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c @@ -2358,6 +2358,14 @@ 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)) + printk(KERN_NOTICE "ocfs2: Unaligned AIO/DIO on inode " + "%lld on device %s by %s\n", + (unsigned long long)OCFS2_I(inode)->ip_blkno, + inode->i_sb->s_id, current->comm); /* * Wait on previous unaligned aio to complete before * proceeding. -- 2.50.1