Re: [PATCH] Btrfs: fix dio write vs buffered read race V3

2012-07-02 Thread Josef Bacik
On Sun, Jul 01, 2012 at 04:34:44AM -0600, Miao Xie wrote: On Thu, 28 Jun 2012 09:09:04 -0400, Josef Bacik wrote: fs/btrfs/file.c | 13 fs/btrfs/inode.c | 55 + 2 files changed, 50 insertions(+), 18 deletions(-)

Re: [PATCH] Btrfs: fix dio write vs buffered read race V3

2012-07-01 Thread Miao Xie
On Thu, 28 Jun 2012 09:09:04 -0400, Josef Bacik wrote: fs/btrfs/file.c | 13 fs/btrfs/inode.c | 55 + 2 files changed, 50 insertions(+), 18 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index

[PATCH] Btrfs: fix dio write vs buffered read race V3

2012-06-28 Thread Josef Bacik
From: Josef Bacik jo...@redhat.com Miao pointed out there's a problem with mixing dio writes and buffered reads. If the read happens between us invalidating the page range and actually locking the extent we can bring in pages into page cache. Then once the write finishes if somebody tries to