public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: sandeen@sandeen.net
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 00/14] xfsprogs: make buffer functions return error codes
Date: Wed, 19 Feb 2020 17:53:17 -0800	[thread overview]
Message-ID: <20200220015317.GQ9506@magnolia> (raw)
In-Reply-To: <158216306957.603628.16404096061228456718.stgit@magnolia>

On Wed, Feb 19, 2020 at 05:44:29PM -0800, Darrick J. Wong wrote:
> Hi all,
> 
> Let's fix all the xfs read/get buffer functions to return the usual
> integer error codes and pass the buffer pointer as a out-argument.  This
> makes it so that we can return useful error output instead of making
> callers infer ENOMEM or EAGAIN or whatever other reality they crave from
> the NULL pointer that they get when things don't go perfectly.
> 
> FWIW, all XBF_TRYLOCK callers must now trigger retries if they receive
> EAGAIN.  This may lead to a slight behavioral change in that TRYLOCK
> callers will no longer retry for things like ENOMEM, though I didn't see
> any obvious changes in user-visible behavior when running fstests.
> 
> After finishing the error code conversion, we straighten out the TRYLOCK
> callers to remove all this null pointer checks in favor of explicit
> EAGAIN checks; and then we change the buffer IO/corruption error
> reporting so that we report whoever called the buffer code even when
> reading a buffer in transaction context.
> 
> The userspace port of the kernel patchset was very difficult, so I am
> submitting this series to avoid dumping the work on Eric.

I should've noted that the "xfsprogs: refactor buffer function names"
series applies against 5.5; this series is a backport of the second half
of the kernel 5.6 merge.  I didn't send that part because I didn't feel
that it was significant enough to increase the patchbomb spew.

SO... the order is:

1. "refactor buffer function names", which is the thread before this one
2. "sync with 5.6", available at [1]
3. "make buffer functions return error codes", which is this one

--D

[1] https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfsprogs-dev.git/tag/?h=libxfs-5.6-sync_2020-02-19

> If you're going to start using this mess, you probably ought to just
> pull from my git trees, which are linked below.
> 
> This is an extraordinary way to destroy everything.  Enjoy!
> Comments and questions are, as always, welcome.
> 
> --D
> 
> xfsprogs git tree:
> https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=buf-return-errorcodes

      parent reply	other threads:[~2020-02-20  1:53 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20  1:44 [PATCH 00/14] xfsprogs: make buffer functions return error codes Darrick J. Wong
2020-02-20  1:44 ` [PATCH 01/14] libxfs: make __cache_lookup return an error code Darrick J. Wong
2020-02-21 14:55   ` Christoph Hellwig
2020-02-20  1:44 ` [PATCH 02/14] libxfs: make libxfs_getbuf_flags " Darrick J. Wong
2020-02-21 14:56   ` Christoph Hellwig
2020-02-20  1:44 ` [PATCH 03/14] libxfs: make libxfs_buf_get_map " Darrick J. Wong
2020-02-21 14:57   ` Christoph Hellwig
2020-02-21 16:01     ` Darrick J. Wong
2020-02-20  1:44 ` [PATCH 04/14] libxfs: refactor libxfs_readbuf out of existence Darrick J. Wong
2020-02-21 15:00   ` Christoph Hellwig
2020-02-21 22:13     ` Darrick J. Wong
2020-02-20  1:45 ` [PATCH 05/14] libxfs: make libxfs_buf_read_map return an error code Darrick J. Wong
2020-02-21 15:03   ` Christoph Hellwig
2020-02-21 16:15     ` Darrick J. Wong
2020-02-21 16:28       ` Christoph Hellwig
2020-02-20  1:45 ` [PATCH 06/14] xfs: make xfs_buf_read_map " Darrick J. Wong
2020-02-20  1:45 ` [PATCH 07/14] xfs: make xfs_buf_get " Darrick J. Wong
2020-02-20  1:45 ` [PATCH 08/14] xfs: make xfs_buf_get_uncached " Darrick J. Wong
2020-02-20  1:45 ` [PATCH 09/14] xfs: make xfs_buf_read " Darrick J. Wong
2020-02-20  1:45 ` [PATCH 10/14] xfs: make xfs_trans_get_buf_map " Darrick J. Wong
2020-02-20  1:45 ` [PATCH 11/14] xfs: make xfs_trans_get_buf " Darrick J. Wong
2020-02-20  1:45 ` [PATCH 12/14] xfs: remove the xfs_btree_get_buf[ls] functions Darrick J. Wong
2020-02-20  1:45 ` [PATCH 13/14] xfs: make xfs_*read_agf return EAGAIN to ALLOC_FLAG_TRYLOCK callers Darrick J. Wong
2020-02-20  1:45 ` [PATCH 14/14] xfs: remove unnecessary null pointer checks from _read_agf callers Darrick J. Wong
2020-02-20  1:53 ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200220015317.GQ9506@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox