lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YovMeQO2n0XAxMhe@google.com>
Date:   Mon, 23 May 2022 11:03:37 -0700
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <chao@...nel.org>
Cc:     Daeho Jeong <daeho43@...il.com>, linux-kernel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net, kernel-team@...roid.com,
        Daeho Jeong <daehojeong@...gle.com>
Subject: Re: [f2fs-dev] [PATCH v3] f2fs: change the current atomic write way

On 05/22, Chao Yu wrote:
> On 2022/4/29 2:18, Daeho Jeong wrote:> +		*old_addr = dn.data_blkaddr;
> > +		f2fs_truncate_data_blocks_range(&dn, 1);
> > +		dec_valid_block_count(sbi, F2FS_I(inode)->cow_inode, count);
> > +		inc_valid_block_count(sbi, inode, &count);
> > +		f2fs_replace_block(sbi, &dn, dn.data_blkaddr, new_addr,
> > +					ni.version, true, false);
> 
> My concern is, if cow_inode's data was persisted into previous checkpoint,
> and then f2fs_replace_block() will update SSA from cow_inode to inode?

SSA for original file is intact, so we'll see the orignal file's block addresses
and SSA, if we flush cow_inode's SSA after committing the atomic writes?
It'd be good to flush any SSA for cow_inode, since we'll truncate
cow_inode after powercut by the ohphan recovery?

> it will cause inconsistent status of last valid checkpoint? Or am I mssing
> something?
> 
> > -		f2fs_submit_merged_write_cond(sbi, inode, NULL, 0, DATA);
> > +			new = f2fs_kmem_cache_alloc(revoke_entry_slab, GFP_NOFS,
> > +							true, NULL);
> > +			if (!new) {
> > +				f2fs_put_dnode(&dn);
> > +				ret = -ENOMEM;
> > +				goto out;
> 
> It doesn't need to handle failure of f2fs_kmem_cache_alloc()
> due to nofail parameter is true.
> 
> Thanks,
> 
> 
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ