[0/9] xfs: make buffer functions return error codes
mbox series

Message ID 157910781961.2028217.1250106765923436515.stgit@magnolia
Headers show
  • xfs: make buffer functions return error codes
Related show


Darrick J. Wong Jan. 15, 2020, 5:03 p.m. UTC
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.

This has been lightly tested with fstests.  Enjoy!
Comments and questions are, as always, welcome.