Re: [PATCH] Btrfs: fix corruption after write/fsync failure + fsync + log recovery

2014-08-26 Thread Liu Bo
On Tue, Aug 26, 2014 at 08:56:18AM +0100, Filipe David Manana wrote: > On Tue, Aug 26, 2014 at 4:32 AM, Liu Bo wrote: > > On Mon, Aug 25, 2014 at 10:43:00AM +0100, Filipe Manana wrote: > >> While writing to a file, in inode.c:cow_file_range() (and same applies to > >> submit_compressed_extents()),

Re: [PATCH] Btrfs: fix corruption after write/fsync failure + fsync + log recovery

2014-08-26 Thread Filipe David Manana
On Tue, Aug 26, 2014 at 4:32 AM, Liu Bo wrote: > On Mon, Aug 25, 2014 at 10:43:00AM +0100, Filipe Manana wrote: >> While writing to a file, in inode.c:cow_file_range() (and same applies to >> submit_compressed_extents()), after reserving an extent for the file data, >> we create a new extent map f

Re: [PATCH] Btrfs: fix corruption after write/fsync failure + fsync + log recovery

2014-08-25 Thread Liu Bo
On Mon, Aug 25, 2014 at 10:43:00AM +0100, Filipe Manana wrote: > While writing to a file, in inode.c:cow_file_range() (and same applies to > submit_compressed_extents()), after reserving an extent for the file data, > we create a new extent map for the written range and insert it into the > extent

[PATCH] Btrfs: fix corruption after write/fsync failure + fsync + log recovery

2014-08-25 Thread Filipe Manana
While writing to a file, in inode.c:cow_file_range() (and same applies to submit_compressed_extents()), after reserving an extent for the file data, we create a new extent map for the written range and insert it into the extent map cache. After that, we create an ordered operation, but if it fails