Li Zefan f0dd9592a1 Btrfs: fix direct-io vs nodatacow
To reproduce the bug:

  # mount -o nodatacow /dev/sda7 /mnt/
  # dd if=/dev/zero of=/mnt/tmp bs=4K count=1
  1+0 records in
  1+0 records out
  4096 bytes (4.1 kB) copied, 0.000136115 s, 30.1 MB/s
  # dd if=/dev/zero of=/mnt/tmp bs=4K count=1 conv=notrunc oflag=direct
  dd: writing `/mnt/tmp': Input/output error
  1+0 records in
  0+0 records out

btrfs_ordered_update_i_size() may return 1, but btrfs_endio_direct_write()
mistakenly takes it as an error.

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
2011-10-20 18:10:44 +02:00
..
2011-10-20 18:10:41 +02:00
2011-07-26 16:49:47 -07:00
2011-10-19 15:12:48 -04:00
2011-10-20 18:10:44 +02:00
2011-05-26 17:52:15 -04:00
2011-06-17 14:54:18 -04:00
2011-05-28 07:00:39 -04:00
2011-08-16 21:09:15 -04:00