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: <20230914065853.qmvkymchyamx43k5@quack3>
Date:   Thu, 14 Sep 2023 08:58:53 +0200
From:   Jan Kara <jack@...e.cz>
To:     郭纯海 <guochunhai@...o.com>
Cc:     Jan Kara <jack@...e.cz>, "chao@...nel.org" <chao@...nel.org>,
        "jaegeuk@...nel.org" <jaegeuk@...nel.org>,
        "brauner@...nel.org" <brauner@...nel.org>,
        "viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
        "linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: 答复: [PATCH] fs-writeback: writeback_sb_inodes: Do not increase 'total_wrote'
 when nothing is written

On Thu 14-09-23 04:12:31, 郭纯海 wrote:
> > On Wed 13-09-23 07:15:01, Chunhai Guo wrote:
> > > From the dump info, there are only two pages as shown below. One is
> > > updated and another is under writeback. Maybe f2fs counts the
> > > writeback page as a dirty one, so get_dirty_pages() got one. As you
> > > said, maybe this is unreasonable.
> > >
> > > Jaegeuk & Chao, what do you think of this?
> > >
> > >
> > > crash_32> files -p 0xE5A44678
> > >  INODE    NRPAGES
> > > e5a44678        2
> > >
> > >   PAGE    PHYSICAL   MAPPING    INDEX CNT FLAGS
> > > e8d0e338  641de000  e5a44810         0  5 a095
> > locked,waiters,uptodate,lru,private,writeback
> > > e8ad59a0  54528000  e5a44810         1  2 2036
> > referenced,uptodate,lru,active,private
> > 
> > Indeed, incrementing pages_skipped when there's no dirty page is a bit odd.
> > That being said we could also harden requeue_inode() - in particular we could do
> > there:
> > 
> >         if (wbc->pages_skipped) {
> >                 /*
> >                  * Writeback is not making progress due to locked buffers.
> >                  * Skip this inode for now. Although having skipped pages
> >                  * is odd for clean inodes, it can happen for some
> >                  * filesystems so handle that gracefully.
> >                  */
> >                 if (inode->i_state & I_DIRTY_ALL)
> >                         redirty_tail_locked(inode, wb);
> >                 else
> >                         inode_cgwb_move_to_attached(inode, wb);
> >         }
> > 
> > Does this fix your problem as well?
> > 
> >                                                                 Honza
> 
> Thank you for your reply. Did you forget the 'return' statement? Since I encountered this issue on the 4.19 kernel and there is not inode_cgwb_move_to_attached() yet, I replaced it with inode_io_list_del_locked(). So, below is the test patch I am applying. Please have a check. By the way, the test will take some time. I will provide feedback when it is finished. Thanks.

Yeah, I forgot about the return.

> 	if (wbc->pages_skipped) {
> 		/*
> 		 * writeback is not making progress due to locked
> 		 * buffers. Skip this inode for now.
> 		 */
> -		redirty_tail_locked(inode, wb);
> +		if (inode->i_state & I_DIRTY_ALL)
> +			redirty_tail_locked(inode, wb);
> +		else
> +			inode_io_list_del_locked(inode, wb);
>  		return;
>  	}

Looks good. Thanks for testing!

								Honza
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ