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


Groups > linux.kernel > #1588333

[LSF/MM TOPIC] do we really need PG_error at all?

From Jeff Layton <jlayton@redhat.com>
Newsgroups linux.kernel
Subject [LSF/MM TOPIC] do we really need PG_error at all?
Date 2017-02-26 15:50 +0100
Message-ID <tf8j8-84j-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Proposing this as a LSF/MM TOPIC, but it may turn out to be me just not
understanding the semantics here.

As I was looking into -ENOSPC handling in cephfs, I noticed that
PG_error is only ever tested in one place [1] __filemap_fdatawait_range,
which does this:

	if (TestClearPageError(page))
		ret = -EIO;

This error code will override any AS_* error that was set in the
mapping. Which makes me wonder...why don't we just set this error in the
mapping and not bother with a per-page flag? Could we potentially free
up a page flag by eliminating this?

The main argument I could see for keeping it is that removing it might
subtly change the behavior of sync_file_range if you have tasks syncing
different ranges in a file concurrently. I'm not sure if that would
break any guarantees though.

Even if we do need it, I think we might need some cleanup here anyway. A
lot of readpage operations end up setting that flag when they hit an
error. Isn't it wrong to return an error on fsync, just because we had a
read error somewhere in the file in a range that was never dirtied?

--
[1]: there is another place in f2fs, but it's more or less equivalent to
the call site in __filemap_fdatawait_range.

-- 
Jeff Layton <jlayton@redhat.com>

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


Thread

[LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-26 15:50 +0100
  Re: [LSF/MM TOPIC] do we really need PG_error at all? James Bottomley <James.Bottomley@HansenPartnership.com> - 2017-02-26 18:30 +0100
    Re: [LSF/MM TOPIC] do we really need PG_error at all? NeilBrown <neilb@suse.com> - 2017-02-26 22:30 +0100
      Re: [LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-26 23:50 +0100
      Re: [LSF/MM TOPIC] do we really need PG_error at all? James Bottomley <James.Bottomley@HansenPartnership.com> - 2017-02-27 00:50 +0100
        Re: [LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-27 01:00 +0100
        Re: [LSF/MM TOPIC] do we really need PG_error at all? NeilBrown <neilb@suse.com> - 2017-02-27 01:30 +0100
          Re: [LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-27 16:10 +0100
            Re: [LSF/MM TOPIC] do we really need PG_error at all? NeilBrown <neilb@suse.com> - 2017-02-28 00:40 +0100
              Re: [Lsf-pc] [LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-28 02:30 +0100
                Re: [Lsf-pc] [LSF/MM TOPIC] do we really need PG_error at all? Boaz Harrosh <openosd@gmail.com> - 2017-02-28 11:20 +0100
                Re: [Lsf-pc] [LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-28 12:40 +0100
                Re: [Lsf-pc] [LSF/MM TOPIC] do we really need PG_error at all? NeilBrown <neilb@suse.com> - 2017-02-28 22:10 +0100
            Re: [LSF/MM TOPIC] do we really need PG_error at all? Andreas Dilger <adilger@dilger.ca> - 2017-02-28 02:00 +0100
              Re: [LSF/MM TOPIC] do we really need PG_error at all? Jeff Layton <jlayton@redhat.com> - 2017-02-28 02:10 +0100

csiph-web