Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1697597

Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error reporting for fsync

From Jeff Layton <jlayton@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error reporting for fsync
Date 2017-07-27 00:30 +0200
Message-ID <u7CYy-6ee-9@gated-at.bofh.it> (permalink)
References <u7yLg-3p3-3@gated-at.bofh.it> <u7yLh-3p3-27@gated-at.bofh.it> <u7Aam-4qo-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, 2017-07-26 at 12:21 -0700, Matthew Wilcox wrote:
> On Wed, Jul 26, 2017 at 01:55:38PM -0400, Jeff Layton wrote:
> > @@ -668,12 +668,14 @@ static int gfs2_fsync(struct file *file, loff_t start, loff_t end,
> >  		if (ret)
> >  			return ret;
> >  		if (gfs2_is_jdata(ip))
> > -			filemap_write_and_wait(mapping);
> > +			ret = file_write_and_wait(file);
> > +		if (ret)
> > +			return ret;
> >  		gfs2_ail_flush(ip->i_gl, 1);
> >  	}
> 
> Do we want to skip flushing the AIL if there was an error (possibly
> previously encountered)?  I'd think we'd want to flush the AIL then report
> the error, like this:
> 

I wondered about that. Note that earlier in the function, we also bail
out without flushing the AIL if sync_inode_metadata fails, so I assumed
that we'd want to do the same here. 

I could definitely be wrong and am fine with changing it if so.
Discarding the error like we do today seems wrong though.

Bob, thoughts?


>  		if (gfs2_is_jdata(ip))
> -			filemap_write_and_wait(mapping);
> +			ret = file_write_and_wait(file);
>  		gfs2_ail_flush(ip->i_gl, 1);
> +		if (ret)
> +			return ret;
>  	}
-- 
Jeff Layton <jlayton@redhat.com>

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/4] mm/gfs2: extend file_* API, and convert gfs2 to errseq_t error reporting Jeff Layton <jlayton@kernel.org> - 2017-07-26 20:00 +0200
  [PATCH v2 1/4] mm: consolidate dax / non-dax checks for writeback Jeff Layton <jlayton@kernel.org> - 2017-07-26 20:00 +0200
    Re: [PATCH v2 1/4] mm: consolidate dax / non-dax checks for writeback Jan Kara <jack@suse.cz> - 2017-07-27 10:50 +0200
  [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error reporting for fsync Jeff Layton <jlayton@kernel.org> - 2017-07-26 20:00 +0200
    Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error  reporting for fsync Matthew Wilcox <willy@infradead.org> - 2017-07-26 21:30 +0200
      Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error  reporting for fsync Jeff Layton <jlayton@redhat.com> - 2017-07-27 00:30 +0200
        Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error  reporting for fsync Bob Peterson <rpeterso@redhat.com> - 2017-07-27 14:50 +0200
          Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error  reporting for fsync Steven Whitehouse <swhiteho@redhat.com> - 2017-07-28 14:40 +0200
            Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error  reporting for fsync Jeff Layton <jlayton@redhat.com> - 2017-07-28 14:50 +0200
              Re: [PATCH v2 4/4] gfs2: convert to errseq_t based writeback error  reporting for fsync Steven Whitehouse <swhiteho@redhat.com> - 2017-07-28 15:00 +0200
  [PATCH v2 3/4] fs: convert sync_file_range to use errseq_t based error-tracking Jeff Layton <jlayton@kernel.org> - 2017-07-26 20:00 +0200

csiph-web