diff options
author | Jason Gunthorpe <jgg@nvidia.com> | 2020-11-30 09:58:39 +0200 |
---|---|---|
committer | Jason Gunthorpe <jgg@nvidia.com> | 2020-12-07 14:06:23 -0400 |
commit | ef3642c4f54d3493c92c71faf46139b2473bc532 (patch) | |
tree | 059c7e09aa22874b96829ef07cb71c0ce6b9b33c /mm/page-writeback.c | |
parent | 38f8ff5b4438876a7d5b2f8b54eb46c7d5154457 (diff) |
RDMA/mlx5: Fix error unwinds for rereg_mr
This is all a giant train wreck of error handling, in many cases the MR is
left in some corrupted state where continuing on is going to lead to
chaos, or various unwinds/order is missed.
rereg had three possible completely different actions, depending on flags
and various details about the MR. Split the three actions into three
functions, and call the right action from the start.
For each action carefully design the error handling to fit the action:
- UMR access/PD update is a simple UMR, if it fails the MR isn't changed,
so do nothing
- PAS update over UMR is multiple UMR operations. To keep everything sane
revoke access to the MKey while it is being changed and restore it once
the MR is correct.
- Recreating the mkey should completely build a parallel MR with a fully
loaded PAS then swap and destroy the old one. If it fails the original
should be left untouched. This is handled in the core code. Directly
call the normal MR creation functions, possibly re-using the existing
umem.
Add support for working with ODP MRs. The READ/WRITE access flags can be
changed by UMR and we can trivially convert to/from ODP MRs using the
logic to build a completely new MR.
This new logic also fixes various problems with MRs continuing to work
while their PAS lists are no longer valid, eg during a page size change.
Link: https://lore.kernel.org/r/20201130075839.278575-6-leon@kernel.org
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Diffstat (limited to 'mm/page-writeback.c')
0 files changed, 0 insertions, 0 deletions