From: Dave Chinner <david@fromorbit.com> To: Roman Kononov <roman@binarylife.net> Cc: xfs@oss.sgi.com, linux-kernel@vger.kernel.org Subject: Re: WARNING in xfs_lwr.c, xfs_write() Date: Mon, 24 May 2010 11:19:07 +1000 [thread overview] Message-ID: <20100524011907.GC12087@dastard> (raw) In-Reply-To: <20100523092344.0fcaab42@aaa.pulp.binarylife.net> On Sun, May 23, 2010 at 09:23:44AM -0500, Roman Kononov wrote: > On 2010-05-23, 20:18:56 +1000, Dave Chinner <david@fromorbit.com> wrote: > > You've got some workload that is mixing direct IO writes with some > > form of buffered or mmap IO on the same file and they are racing. > > Mixing different types of IO on the one inode is also known as A > > Really Bad Idea because there is no guarantee of coherency between > > them.... > > > > Can you find out what the application is triggering this? > > This is severely modified Postgresql, which does mix direct IO with > buffered one. I hope you keep plenty of backups, then... > You say "they are racing". Do you mean that this can cause file system > corruption? ... because it's Not filesystem corruption you need to be worried about, it's *silent data corruption* that these races can cause. > Doest it simply warn that direct user data races with > buffered user data and one of them wins? Yes, that's right. No guarantee of who wins is given, though. > This warning "taints" the kernel. Yup, the application is doing something dangerous, and this warning is there to let us know that the data corruption is the user's fault, not the filesystem... > Should it be safe to do different types of IOs on different > non-overlapping 4-KiB-aligned regions of the same file (I am unsure > if this is what the application really does)? Yes, it should be safe, but the kernel code can't know whether this is true or not - there are no specific interlocks with direct IO to prevent concurrent buffered IO to the same region while a direct IO is in progress. XFS does best effort attempts to maintain coherency does not provide any guarantees, hence the warning when known race conditions are tripped. Cheers, Dave. -- Dave Chinner david@fromorbit.com
WARNING: multiple messages have this Message-ID (diff)
From: Dave Chinner <david@fromorbit.com> To: Roman Kononov <roman@binarylife.net> Cc: linux-kernel@vger.kernel.org, xfs@oss.sgi.com Subject: Re: WARNING in xfs_lwr.c, xfs_write() Date: Mon, 24 May 2010 11:19:07 +1000 [thread overview] Message-ID: <20100524011907.GC12087@dastard> (raw) In-Reply-To: <20100523092344.0fcaab42@aaa.pulp.binarylife.net> On Sun, May 23, 2010 at 09:23:44AM -0500, Roman Kononov wrote: > On 2010-05-23, 20:18:56 +1000, Dave Chinner <david@fromorbit.com> wrote: > > You've got some workload that is mixing direct IO writes with some > > form of buffered or mmap IO on the same file and they are racing. > > Mixing different types of IO on the one inode is also known as A > > Really Bad Idea because there is no guarantee of coherency between > > them.... > > > > Can you find out what the application is triggering this? > > This is severely modified Postgresql, which does mix direct IO with > buffered one. I hope you keep plenty of backups, then... > You say "they are racing". Do you mean that this can cause file system > corruption? ... because it's Not filesystem corruption you need to be worried about, it's *silent data corruption* that these races can cause. > Doest it simply warn that direct user data races with > buffered user data and one of them wins? Yes, that's right. No guarantee of who wins is given, though. > This warning "taints" the kernel. Yup, the application is doing something dangerous, and this warning is there to let us know that the data corruption is the user's fault, not the filesystem... > Should it be safe to do different types of IOs on different > non-overlapping 4-KiB-aligned regions of the same file (I am unsure > if this is what the application really does)? Yes, it should be safe, but the kernel code can't know whether this is true or not - there are no specific interlocks with direct IO to prevent concurrent buffered IO to the same region while a direct IO is in progress. XFS does best effort attempts to maintain coherency does not provide any guarantees, hence the warning when known race conditions are tripped. Cheers, Dave. -- Dave Chinner david@fromorbit.com _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2010-05-24 1:19 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-05-23 5:20 WARNING in xfs_lwr.c, xfs_write() Roman Kononov 2010-05-23 5:20 ` Roman Kononov 2010-05-23 10:18 ` Dave Chinner 2010-05-23 10:18 ` Dave Chinner 2010-05-23 14:23 ` Roman Kononov 2010-05-23 14:23 ` Roman Kononov 2010-05-24 1:19 ` Dave Chinner [this message] 2010-05-24 1:19 ` Dave Chinner 2010-06-12 5:00 ` Ilia Mirkin 2010-06-12 5:00 ` Ilia Mirkin 2010-06-13 22:47 ` Dave Chinner 2010-06-13 22:47 ` Dave Chinner 2010-06-13 23:10 ` Ilia Mirkin 2010-06-13 23:10 ` Ilia Mirkin 2010-06-14 1:29 ` Dave Chinner 2010-06-14 1:29 ` Dave Chinner 2010-06-14 3:27 ` Ilia Mirkin 2010-06-14 3:27 ` Ilia Mirkin 2010-06-14 15:11 ` Roman Kononov 2010-06-14 15:11 ` Roman Kononov 2010-05-24 4:12 ` Stan Hoeppner 2010-05-24 5:16 ` Stewart Smith 2010-05-24 19:34 ` Roman Kononov 2010-05-26 7:06 ` Dave Chinner 2010-05-26 15:07 ` NOW: o_direct -- WAS: " Stan Hoeppner 2010-05-27 11:05 ` Michael Monnerie 2010-05-27 11:47 ` Christoph Hellwig 2010-05-27 13:58 ` Stewart Smith 2010-05-27 14:57 ` Christoph Hellwig 2010-05-27 15:45 ` Stewart Smith 2010-05-28 0:25 ` Stan Hoeppner 2010-05-27 14:05 ` Stewart Smith 2010-05-28 0:42 ` Stan Hoeppner
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20100524011907.GC12087@dastard \ --to=david@fromorbit.com \ --cc=linux-kernel@vger.kernel.org \ --cc=roman@binarylife.net \ --cc=xfs@oss.sgi.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.