Re: [PATCH] fs/buffer.c: Fix data corruption when buffer write with IO error

2019-04-09 Thread Jan Kara
On Tue 09-04-19 21:11:22, zhangxiaoxu (A) wrote: > > > On 4/8/2019 7:11 PM, Jan Kara wrote: > > On Sat 06-04-19 15:13:13, ZhangXiaoxu wrote: > > > When the buffer write failed, 'end_buffer_write_sync' and > > > 'end_buffer_async_write' will clear the uptodate flag. But the > > > data in the buffe

Re: [PATCH] fs/buffer.c: Fix data corruption when buffer write with IO error

2019-04-09 Thread zhangxiaoxu (A)
On 4/8/2019 7:11 PM, Jan Kara wrote: On Sat 06-04-19 15:13:13, ZhangXiaoxu wrote: When the buffer write failed, 'end_buffer_write_sync' and 'end_buffer_async_write' will clear the uptodate flag. But the data in the buffer maybe newer than disk. In some case, this will lead data corruption. F

Re: [PATCH] fs/buffer.c: Fix data corruption when buffer write with IO error

2019-04-08 Thread Jan Kara
On Sat 06-04-19 15:13:13, ZhangXiaoxu wrote: > When the buffer write failed, 'end_buffer_write_sync' and > 'end_buffer_async_write' will clear the uptodate flag. But the > data in the buffer maybe newer than disk. In some case, this > will lead data corruption. > > For example: ext4 flush metadata