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]
Date:   Mon, 13 Feb 2023 22:28:15 +0800
From:   Yangtao Li <frank.li@...o.com>
To:     jaegeuk@...nel.org, chao@...nel.org
Cc:     linux-f2fs-devel@...ts.sourceforge.net,
        linux-kernel@...r.kernel.org, hanqi@...o.com
Subject: Re: f2fs: fix to release compress file for F2FS_IOC_RESERVE_COMPRESS_BLOCKS when has no space

> > -		if (reserved != cluster_size - compr_blocks)
> > -			return -ENOSPC;
> > +		if (reserved != cluster_size - compr_blocks) {
> > +			dec_valid_block_count(sbi, dn->inode, reserved);
>
> This looks breaking the consistency?

Sorry, I didn't get what you meant. Can you tell me which data is inconsistent.
After executing the F2FS_IOC_RESERVE_COMPRESS_BLOCKS ioctl call,
use the fsck.f2fs tool to check and find no abnormalities.

Chao, any comment?

> > +
> > +			for (i = cluster_size - 1; i > 0; i--) {
> > +				dn->ofs_in_node--;
> > +				blkaddr = f2fs_data_blkaddr(dn);
> > +
> > +				if (__is_valid_data_blkaddr(blkaddr)) {
> > +					dn->ofs_in_node -= i;
> > +					return -ENOSPC;
> > +				}
> > +
> > +				dn->data_blkaddr = NULL_ADDR;
> > +				f2fs_set_data_blkaddr(dn);
> > +			}
> > +		}

Thx,
Yangtao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ