[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230213142815.24095-1-frank.li@vivo.com>
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