Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-18 Thread Christoph Hellwig
> that update of the timestamp and i_size needs to be moved to an I/O > completion handler. We do this already to convert unwritten requests > to be written in fs/ext4/page_io.c. See ext4_put_io_end_defer() in > fs/ext4/page_io.c; if we need to convert unwritten extents the >

Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-18 Thread Christoph Hellwig
> that update of the timestamp and i_size needs to be moved to an I/O > completion handler. We do this already to convert unwritten requests > to be written in fs/ext4/page_io.c. See ext4_put_io_end_defer() in > fs/ext4/page_io.c; if we need to convert unwritten extents the >

Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-16 Thread Theodore Ts'o
On Sat, Dec 16, 2017 at 01:33:26PM +0900, Seongbae Son wrote: > > > Details can be found as follows. > > > > > > Son et al. "Guaranteeing the Metadata Update Atomicity in EXT4 > > > Filesystem”, > > > In Proc. of APSYS 2017, Mumbai, India > > > This is behind a paywall, so I can't access it. I

Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-16 Thread Theodore Ts'o
On Sat, Dec 16, 2017 at 01:33:26PM +0900, Seongbae Son wrote: > > > Details can be found as follows. > > > > > > Son et al. "Guaranteeing the Metadata Update Atomicity in EXT4 > > > Filesystem”, > > > In Proc. of APSYS 2017, Mumbai, India > > > This is behind a paywall, so I can't access it. I

[PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-15 Thread Seongbae Son
> > 1. Current file offset of fileA is 14 KB. An application appends 2 KB data > > to > > fileA by executing a write() system call. At this time, the file size in > > the ext4_inode of fileA is updated to 16 KB by ext4_da_write_end(). > > 2. Current file offset of fileB is 14 KB. An application

[PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-15 Thread Seongbae Son
> > 1. Current file offset of fileA is 14 KB. An application appends 2 KB data > > to > > fileA by executing a write() system call. At this time, the file size in > > the ext4_inode of fileA is updated to 16 KB by ext4_da_write_end(). > > 2. Current file offset of fileB is 14 KB. An application

Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-10 Thread Theodore Ts'o
On Sun, Dec 10, 2017 at 09:12:57PM +0900, seongbaeSon wrote: > 1. Current file offset of fileA is 14 KB. An application appends 2 KB data to > fileA by executing a write() system call. At this time, the file size in > the ext4_inode of fileA is updated to 16 KB by ext4_da_write_end(). > 2.

Re: [PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-10 Thread Theodore Ts'o
On Sun, Dec 10, 2017 at 09:12:57PM +0900, seongbaeSon wrote: > 1. Current file offset of fileA is 14 KB. An application appends 2 KB data to > fileA by executing a write() system call. At this time, the file size in > the ext4_inode of fileA is updated to 16 KB by ext4_da_write_end(). > 2.

[PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-10 Thread seongbaeSon
For one write() system call, the file size in the ext4_inode can be updated twice; at the write() system call and when dirty pages of the file are written to storage (i.g. fsync() or kworker thread). The write() system call that appends data to a file but does not need to allocate a block updates

[PATCH] ext4: delayed inode update for the consistency of file size after a crash

2017-12-10 Thread seongbaeSon
For one write() system call, the file size in the ext4_inode can be updated twice; at the write() system call and when dirty pages of the file are written to storage (i.g. fsync() or kworker thread). The write() system call that appends data to a file but does not need to allocate a block updates