RFC Log transaction cancel error codes in the kernel log buffer
Get series with b4
b4 am [email protected]Versions newest first
- v1 RFC Latest3 patches 9 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | xfs: add xfs_error_report the ability to display an error codefs/ fs/ fs/ +2 more | +16 | 5 replies | |
| 2/3 | xfs: enable xfs_trans_cancel() to report and error codefs/ fs/ | +16 | 3 replies | |
| 3/3 | xfs: make xfs_iomap_write_direct() report an error to xfs_trans_cancelfs/ | +1 | 1 reply |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Darrick J. Wong |
|---|---|
| 1/3 | |
| 2/3 | |
| 3/3 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RFC PATCH 0/3] Log transaction cancel error codes in the kernel log buffer
From: Carlos Maiolino <[email protected]>
Hi, this is a big RFC which is just compiled tested and has the only goal to get opinions, please don't use it...
Once in a while we face some sort of failure where a transaction gets cancelled in the middle of an IO operation and it is not always easy to understand why.
One of these reasons is when xfs_bmapi_write() fails. It can fail for several reasons and sometimes we get to start a guessing game on why it actually failed.
So I thought it would be useful to have xfs_trans_cancel() to log the exact -ERRORCODE that caused the transaction to cancel.
The reason I used a variadic function was mostly to make it a smaller patch instead of a long sed-generated patch which would not make my point, although I kind'a liked it :P
Another approach I thought would be to add a t_error field to the transaction descriptor and report it via the tracepoint, so callers could opt to set an error code or not.
Does this seem useful to anybody else or should I just abort the idea?
Cheers.
Carlos Maiolino (3):
xfs: add xfs_error_report the ability to display an error code
xfs: enable xfs_trans_cancel() to report and error code
xfs: make xfs_iomap_write_direct() report an error to xfs_trans_cancel
fs/xfs/xfs_error.c | 7 ++++++- fs/xfs/xfs_error.h | 10 +++++----- fs/xfs/xfs_exchmaps_item.c | 6 +++--- fs/xfs/xfs_inode_item.c | 2 +- fs/xfs/xfs_iomap.c | 2 +- fs/xfs/xfs_log_recover.c | 2 +- fs/xfs/xfs_trans.c | 12 +++++++++--- fs/xfs/xfs_trans.h | 8 +++++++- 8 files changed, 33 insertions(+), 16 deletions(-)
Signature · 1 line
2.55.0