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: <20170308213955.GC5483@jaegeuk.local>
Date:   Wed, 8 Mar 2017 13:39:55 -0800
From:   Jaegeuk Kim <jaegeuk@...nel.org>
To:     Chao Yu <yuchao0@...wei.com>
Cc:     linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
        linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 2/2] f2fs: don't overwrite node block by SSR

On 03/08, Chao Yu wrote:
> On 2017/3/7 5:51, Jaegeuk Kim wrote:
> > This patch fixes that SSR can overwrite previous warm node block consisting of
> > a node chain since the last checkpoint.
> 
> Good catch!
> 
> Need to consider the impact to other accesser, e.g. is_checkpointed_data,
> add_discard_addrs?

I've checked them. is_checkpointed_data() has nothing to do with this warm node
and this prevents add_discard_addrs to issue discard command.

Thanks,

> 
> Thanks,
> 
> > 
> > Fixes: 5b6c6be2d878 ("f2fs: use SSR for warm node as well")
> > Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> > ---
> >  fs/f2fs/segment.c | 6 ++++++
> >  1 file changed, 6 insertions(+)
> > 
> > diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
> > index 2ae36d04d03e..684b869e1861 100644
> > --- a/fs/f2fs/segment.c
> > +++ b/fs/f2fs/segment.c
> > @@ -1177,6 +1177,12 @@ static void update_sit_entry(struct f2fs_sb_info *sbi, block_t blkaddr, int del)
> >  		if (f2fs_discard_en(sbi) &&
> >  			!f2fs_test_and_set_bit(offset, se->discard_map))
> >  			sbi->discard_blks--;
> > +
> > +		/* don't overwrite by SSR to keep node chain */
> > +		if (se->type == CURSEG_WARM_NODE) {
> > +			if (!f2fs_test_and_set_bit(offset, se->ckpt_valid_map))
> > +				se->ckpt_valid_blocks++;
> > +		}
> >  	} else {
> >  		if (!f2fs_test_and_clear_bit(offset, se->cur_valid_map)) {
> >  #ifdef CONFIG_F2FS_CHECK_FS
> > 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ