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] [day] [month] [year] [list]
Message-Id: <20080528014615.2583e8dc.akpm@linux-foundation.org>
Date:	Wed, 28 May 2008 01:46:15 -0700
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Dave Chinner <david@...morbit.com>
Cc:	Guillaume Chazarain <guichaz@...il.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] fs-writeback: handle errors in sync_sb_inodes()

On Wed, 28 May 2008 18:43:13 +1000 Dave Chinner <david@...morbit.com> wrote:

> On Wed, May 28, 2008 at 01:35:49AM -0700, Andrew Morton wrote:
> > On Wed, 28 May 2008 18:25:50 +1000 Dave Chinner <david@...morbit.com> wrote:
> > > On Tue, May 27, 2008 at 10:38:32PM -0700, Andrew Morton wrote:
> > > > On Fri, 23 May 2008 22:34:29 +0200 Guillaume Chazarain <guichaz@...il.com> wrote:
> > > > > diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> > > > > index 495214d..0e6881e 100644
> > > > > --- a/fs/fs-writeback.c
> > > > > +++ b/fs/fs-writeback.c
> > > > > @@ -454,6 +454,7 @@ void generic_sync_sb_inodes(struct super_block *sb,
> > > > >  		struct address_space *mapping = inode->i_mapping;
> > > > >  		struct backing_dev_info *bdi = mapping->backing_dev_info;
> > > > >  		long pages_skipped;
> > > > > +		int err;
> > > > >  
> > > > >  		if (!bdi_cap_writeback_dirty(bdi)) {
> > > > >  			redirty_tail(inode);
> > > > > @@ -498,7 +499,8 @@ void generic_sync_sb_inodes(struct super_block *sb,
> > > > >  		BUG_ON(inode->i_state & I_FREEING);
> > > > >  		__iget(inode);
> > > > >  		pages_skipped = wbc->pages_skipped;
> > > > > -		__writeback_single_inode(inode, wbc);
> > > > > +		err = __writeback_single_inode(inode, wbc);
> > > > > +		mapping_set_error(mapping, err);
> > > > >  		if (wbc->sync_mode == WB_SYNC_HOLD) {
> > > > >  			inode->dirtied_when = jiffies;
> > > > >  			list_move(&inode->i_list, &sb->s_dirty);
> > > > 
> > > > ho hum, I've forgotten why I didn't like this.  Let's give it a run.
> > > 
> > > IIRC, it'll produce lots of spurious EIO errors under writeback on
> > > XFS as XFS will return EAGAIN if we've been asked for a non-blocking
> > > flush and we would have blocked....
> > 
> > OIC.  This, I guess...
> > 
> > --- a/fs/fs-writeback.c~fs-writeback-handle-errors-in-sync_sb_inodes-fix
> > +++ a/fs/fs-writeback.c
> > @@ -500,7 +500,8 @@ void generic_sync_sb_inodes(struct super
> >  		__iget(inode);
> >  		pages_skipped = wbc->pages_skipped;
> >  		err = __writeback_single_inode(inode, wbc);
> > -		mapping_set_error(mapping, err);
> > +		if (err == -EIO || err == -ENOSPC) /* xfs can return -EAGAIN */
> > +			mapping_set_error(mapping, err);
> 
> Rapidly gets messy. XFS can also return at least EDQUOT and EUCLEAN
> (i.e. EFSCORRUPTED) from here as well, and it's likely that there's
> other real errors I can't think of right now as well.
> 

argh.  Who said it was allowed to do that :(

Give up.  We (ie: I) need to fix this one properly.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ