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: <ZtuHv9ZbCxLmzuZp@google.com>
Date: Fri, 6 Sep 2024 22:52:47 +0000
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Chao Yu <chao@...nel.org>
Cc: Wu Bo <bo.wu@...o.com>, Wu Bo <wubo.oduw@...il.com>,
	linux-kernel@...r.kernel.org, stable@...r.kernel.org,
	linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] Revert "f2fs: stop allocating pinned sections
 if EAGAIN happens"

On 09/06, Chao Yu wrote:
> On 2024/9/6 16:31, Wu Bo wrote:
> > On Tue, Feb 20, 2024 at 02:50:11PM +0800, Chao Yu wrote:
> > > On 2024/2/8 16:11, Wu Bo wrote:
> > > > On 2024/2/5 11:54, Chao Yu wrote:
> > > > > How about calling f2fs_balance_fs() to double check and make sure there is
> > > > > enough free space for following allocation.
> > > > > 
> > > > >          if (has_not_enough_free_secs(sbi, 0,
> > > > >              GET_SEC_FROM_SEG(sbi, overprovision_segments(sbi)))) {
> > > > >              f2fs_down_write(&sbi->gc_lock);
> > > > >              stat_inc_gc_call_count(sbi, FOREGROUND);
> > > > >              err = f2fs_gc(sbi, &gc_control);
> > > > >              if (err == -EAGAIN)
> > > > >                  f2fs_balance_fs(sbi, true);
> > > > >              if (err && err != -ENODATA)
> > > > >                  goto out_err;
> > > > >          }
> > > > > 
> > > > > Thanks,
> > > > 
> > > > f2fs_balance_fs() here will not change procedure branch and may just trigger another GC.
> > > > 
> > > > I'm afraid this is a bit redundant.
> > > 
> > > Okay.
> > > 
> > > I guess maybe Jaegeuk has concern which is the reason to commit
> > > 2e42b7f817ac ("f2fs: stop allocating pinned sections if EAGAIN happens").
> > 
> > Hi Jaegeuk,
> > 
> > We occasionally receive user complaints about OTA failures caused by this issue.
> > Please consider merging this patch.

What about adding a retry logic here, as it's literally EAGAIN?

> 
> I'm fine w/ this patch, but one another quick fix will be triggering
> background GC via f2fs ioctl after fallocate() failure, once
> has_not_enough_free_secs(, ovp_segs) returns false, fallocate() will
> succeed.

> 
> Reviewed-by: Chao Yu <chao@...nel.org>
> 
> Thanks,
> 
> > 
> > Thanks
> > 
> > > 
> > > 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