Re: [PATCH 1/2] Btrfs: serialize unlocked dio reads with truncate

2013-02-01 Thread Josef Bacik
On Thu, Jan 31, 2013 at 10:56:34PM -0700, Miao Xie wrote: On Thu, 31 Jan 2013 11:40:41 -0500, Josef Bacik wrote: On Thu, Jan 31, 2013 at 02:23:19AM -0700, Miao Xie wrote: Currently, we can do unlocked dio reads, but the following race is possible: dio_read_task

[PATCH 1/2] Btrfs: serialize unlocked dio reads with truncate

2013-01-31 Thread Miao Xie
Currently, we can do unlocked dio reads, but the following race is possible: dio_read_task truncate_task -btrfs_setattr() -btrfs_direct_IO -__blockdev_direct_IO -btrfs_get_block -btrfs_truncate()

Re: [PATCH 1/2] Btrfs: serialize unlocked dio reads with truncate

2013-01-31 Thread Josef Bacik
On Thu, Jan 31, 2013 at 02:23:19AM -0700, Miao Xie wrote: Currently, we can do unlocked dio reads, but the following race is possible: dio_read_task truncate_task -btrfs_setattr() -btrfs_direct_IO -__blockdev_direct_IO

Re: [PATCH 1/2] Btrfs: serialize unlocked dio reads with truncate

2013-01-31 Thread Miao Xie
On Thu, 31 Jan 2013 11:40:41 -0500, Josef Bacik wrote: On Thu, Jan 31, 2013 at 02:23:19AM -0700, Miao Xie wrote: Currently, we can do unlocked dio reads, but the following race is possible: dio_read_tasktruncate_task -btrfs_setattr()