| To: | David Chinner <dgc@xxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 1/2]: Fix BUG in cancel_dirty_pages on XFS |
| From: | Nick Piggin <nickpiggin@xxxxxxxxxxxx> |
| Date: | Thu, 25 Jan 2007 15:25:29 +1100 |
| Cc: | Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, akpm@xxxxxxxx |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com.au; h=Received:X-YMail-OSG:Message-ID:Date:From:User-Agent:X-Accept-Language:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=5h57CT11AypD6H/bJcdbn1stFHrby4IzQSH+BPnmINE+lW2FJCwQqQ1L6Kx9GRw8VSyC+m6IL48GM7MtcXoMgrzdi+OR8tfilK0Bg9l3pEi+SnNaubdJ7Soh3Iy63RDebtVzMUfJkjLBz3+khS4FjURO8xL8Pf+z5VXHycBejT8= ; |
| In-reply-to: | <20070125034227.GX33919298@melbourne.sgi.com> |
| References: | <20070123223702.GF33919298@melbourne.sgi.com> <1169640835.6189.14.camel@twins> <45B7627B.8050202@yahoo.com.au> <20070124224654.GN33919298@melbourne.sgi.com> <45B7F5F9.2070308@yahoo.com.au> <20070125003536.GS33919298@melbourne.sgi.com> <45B7FE1C.3070807@yahoo.com.au> <20070125015204.GV33919298@melbourne.sgi.com> <45B80F65.6010206@yahoo.com.au> <20070125034227.GX33919298@melbourne.sgi.com> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20051007 Debian/1.7.12-1 |
David Chinner wrote:
On Thu, Jan 25, 2007 at 01:01:09PM +1100, Nick Piggin wrote: No. The only thing that will happen here is that the direct read will see _none_ of the write because the mmap write occurred during the DIO read to a different set of pages in memory. There is no "some" or "all" case here.
Hence we have to prevent mmap for dirtying the same file offset we are doing direct reads on until the direct read has been issued.
IOWs, at a single point in time we have 2 different views of the one file which are both apparently valid and that is what we are trying to avoid. We have a coherency problem here which is solved by forcing the mmap write to reread the data off disk....
As I said, you can't avoid "none" or "all", and you can't say that userspace will see the most uptodate copy of the data. All you can say is that it will be no older than when the syscall is first made. Which is what you get if you simply writeback but do not invalidate pagecache for direct IO reads. -- SUSE Labs, Novell Inc. Send instant messages to your online friends http://au.messenger.yahoo.com |
| Previous by Date: | TAKE 960472 - Fix SEGV when using the xfs_io mwrite command #2, Barry Naujok |
|---|---|
| Next by Date: | TAKE 957441 - xfs_quota manpage contains errors for project quota., Donald Douwsma |
| Previous by Thread: | Re: [PATCH 1/2]: Fix BUG in cancel_dirty_pages on XFS, David Chinner |
| Next by Thread: | Re: [PATCH 1/2]: Fix BUG in cancel_dirty_pages on XFS, David Chinner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |