Thread (18 messages) flat view 18 messages, 2 authors, 2016-03-08

Re: [PATCH 4/7] cxlflash: Simplify attach path error cleanup

From: Uma Krishnan <hidden>
Date: 2016-03-08 17:55:48
Also in: linux-scsi

On 3/4/2016 3:55 PM, Uma Krishnan wrote:
From: "Matthew R. Ochs" <redacted>

The cxlflash_disk_attach() routine currently uses a cascading error
gate strategy for its error cleanup path. While this strategy is
commonly used to handle cleanup scenarios, it is too restrictive when
function callouts need to be restructured. Problems range from
inserting error path bugs in previously 'good' code to the cleanup
path imposing design changes to how the normal path is structured.
A less restrictive approach is needed to support ordering changes
that come about when operating in different environments.

To overcome this restriction, the error cleanup path is modified to
have a single entrypoint and use conditional logic to cleanup where
necessary. Entities that require multiple cleanup steps must be
carefully vetted to ensure their APIs support state. In cases where
they do not (none as of this commit) additional local variables can
be used to maintain state on their behalf.

Signed-off-by: Matthew R. Ochs <redacted>
Reviewed-by: Uma Krishnan <redacted>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help