When compressed file has blocks, f2fs_ioc_start_atomic_write will succeed,
but compressed flag will be remained in inode. If write partial compreseed
cluster and commit atomic write will cause data corruption.
This is the reproduction process:
Step 1:
create a compressed file ,write 64K data , cal
> -Original Message-
> From: Chao Yu
> Sent: Wednesday, March 9, 2022 11:33 AM
> To: 常凤楠 ; Fengnan Chang
> ; [email protected]
> Cc: [email protected]
> Subject: Re: [RFC PATCH] f2fs: fix compress file start atomic write may cause
> data corruption
>
> On 2022/3/7
On 2022/3/10 9:41, Dave Chinner wrote:
On Wed, Mar 09, 2022 at 03:34:27PM +0800, Chao Yu wrote:
On 2022/3/9 14:22, Dave Chinner wrote:
On Wed, Mar 09, 2022 at 12:31:17PM +0800, Chao Yu wrote:
On 2022/2/28 11:57, Sun Ke via Linux-f2fs-devel wrote:
The test fail on f2fs:
xattr names and
DIO preallocates physical blocks before writing data, but if an error occurrs
or power-cut happens, we can see block contents from the disk. This patch tries
to fix it by 1) turning to buffered writes for DIO into holes, 2) truncating
unwritten blocks from error or power-cut.
Signed-off-by: Jaegeu
On 03/10, Chao Yu wrote:
> On 2022/3/10 5:48, Jaegeuk Kim wrote:
> > [14696.634553] task:cat state:D stack:0 pid:1613738
> > ppid:1613735 flags:0x0004
> > [14696.638285] Call Trace:
> > [14696.639038]
> > [14696.640032] __schedule+0x302/0x930
> > [14696.640969] schedule+0x5
On 2022/3/9 19:09, Jia Yang via Linux-f2fs-devel wrote:
F2FS_FITS_IN_INODE only cares the type of f2fs inode, so there
is no need to read node page of f2fs inode.
Signed-off-by: Jia Yang
Reviewed-by: Chao Yu
Thanks,
___
Linux-f2fs-devel mailing
On 2022/3/10 5:48, Jaegeuk Kim wrote:
[14696.634553] task:cat state:D stack:0 pid:1613738
ppid:1613735 flags:0x0004
[14696.638285] Call Trace:
[14696.639038]
[14696.640032] __schedule+0x302/0x930
[14696.640969] schedule+0x58/0xd0
[14696.641799] schedule_preempt_disabled+
On 2022/3/10 5:48, Jaegeuk Kim wrote:
Let's purge inode cache in order to avoid the below deadlock.
[freeze test] shrinkder
freeze_super
- pwercpu_down_write(SB_FREEZE_FS)
- super_cache_scan
On Wed, Mar 09, 2022 at 03:34:27PM +0800, Chao Yu wrote:
> On 2022/3/9 14:22, Dave Chinner wrote:
> > On Wed, Mar 09, 2022 at 12:31:17PM +0800, Chao Yu wrote:
> > > On 2022/2/28 11:57, Sun Ke via Linux-f2fs-devel wrote:
> > > > The test fail on f2fs:
> > > >xattr names and values after seco
Hi Jens,
On 03/08, Jens Axboe wrote:
> On 3/7/22 11:06 PM, Christoph Hellwig wrote:
> > On Tue, Mar 01, 2022 at 10:49:06AM +0800, Chao Yu wrote:
> >> On 2022/2/28 20:41, Christoph Hellwig wrote:
> >>> Refactor block I/O code so that the bio operation and known flags are set
> >>> at bio allocation
On 03/01, Chao Yu wrote:
> On 2022/2/28 20:41, Christoph Hellwig wrote:
> > Refactor block I/O code so that the bio operation and known flags are set
> > at bio allocation time. Only the later updated flags are updated on the
> > fly.
> >
> > Signed-off-by: Christoph Hellwig
>
> Reviewed-by: Ch
On 03/01, Chao Yu wrote:
> On 2022/2/28 20:41, Christoph Hellwig wrote:
> > Set the bdev at bio allocation time by changing the f2fs_target_device
> > calling conventions, so that no bio needs to be passed in.
> >
> > Signed-off-by: Christoph Hellwig
>
> Reviewed-by: Chao Yu
Acked-by: Jaegeuk
Let's purge inode cache in order to avoid the below deadlock.
[freeze test] shrinkder
freeze_super
- pwercpu_down_write(SB_FREEZE_FS)
- super_cache_scan
- down_read(&sb->s_umount)
[14696.634553] task:cat state:D stack:0 pid:1613738
ppid:1613735 flags:0x0004
[14696.638285] Call Trace:
[14696.639038]
[14696.640032] __schedule+0x302/0x930
[14696.640969] schedule+0x58/0xd0
[14696.641799] schedule_preempt_disabled+0x18/0x30
[14696.642890] __mutex_lock.c
F2FS_FITS_IN_INODE only cares the type of f2fs inode, so there
is no need to read node page of f2fs inode.
Signed-off-by: Jia Yang
---
fs/f2fs/file.c | 17 -
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
index cfdc41f87f5d..7049be2
On 2022/3/9 17:37, Fengnan Chang wrote:
When compressed file has blocks, f2fs_ioc_start_atomic_write will succeed,
but compressed flag will be remained in inode. If write partial compreseed
cluster and commit atomic write will cause data corruption.
This is the reproduction process:
Step 1:
crea
On 2022/3/9 17:27, Jia Yang via Linux-f2fs-devel wrote:
F2FS_FITS_IN_INODE only cares the type of f2fs inode, so there
is no need to read node page of f2fs inode.
Signed-off-by: Jia Yang
---
v2:
- initialize ri with NULL
---
fs/f2fs/file.c | 15 ---
1 file changed, 4 insertions(+
When compressed file has blocks, f2fs_ioc_start_atomic_write will succeed,
but compressed flag will be remained in inode. If write partial compreseed
cluster and commit atomic write will cause data corruption.
This is the reproduction process:
Step 1:
create a compressed file ,write 64K data , cal
F2FS_FITS_IN_INODE only cares the type of f2fs inode, so there
is no need to read node page of f2fs inode.
Signed-off-by: Jia Yang
---
v2:
- initialize ri with NULL
---
fs/f2fs/file.c | 15 ---
1 file changed, 4 insertions(+), 11 deletions(-)
diff --git a/fs/f2fs/file.c b/fs/f2fs/fi
19 matches
Mail list logo