diff options
author | Dmitry Fomichev <[email protected]> | 2019-08-10 14:43:09 -0700 |
---|---|---|
committer | Mike Snitzer <[email protected]> | 2019-08-15 15:57:40 -0400 |
commit | b234c6d7a703661b5045c5bf569b7c99d2edbf88 (patch) | |
tree | 6abae89e96c65649665dad40d8a866bb5569a4b5 /tools/perf/util/trace-event-scripting.c | |
parent | d1fef41465f0e8cae0693fb184caa6bfafb6cd16 (diff) |
dm zoned: improve error handling in reclaim
There are several places in reclaim code where errors are not
propagated to the main function, dmz_reclaim(). This function
is responsible for unlocking zones that might be still locked
at the end of any failed reclaim iterations. As the result,
some device zones may be left permanently locked for reclaim,
degrading target's capability to reclaim zones.
This patch fixes these issues as follows -
Make sure that dmz_reclaim_buf(), dmz_reclaim_seq_data() and
dmz_reclaim_rnd_data() return error codes to the caller.
dmz_reclaim() function is renamed to dmz_do_reclaim() to avoid
clashing with "struct dmz_reclaim" and is modified to return the
error to the caller.
dmz_get_zone_for_reclaim() now returns an error instead of NULL
pointer and reclaim code checks for that error.
Error logging/debug messages are added where necessary.
Fixes: 3b1a94c88b79 ("dm zoned: drive-managed zoned block device target")
Cc: [email protected]
Signed-off-by: Dmitry Fomichev <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Signed-off-by: Mike Snitzer <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions