diff options
author | NeilBrown <neilb@suse.de> | 2014-07-10 15:54:02 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-07-10 15:54:02 +1000 |
commit | 5fe6f031d9a21a935f0ef1b1fbdb314b53f2199f (patch) | |
tree | 44f8fd5707a7a7ca7cde9a4abb1cf49c14e88466 /mdadm.h | |
parent | 0c21b485e4beb7bcfe631412a231f7c1ea1067bc (diff) |
mdmon: allow prepare_update to report failure.
If 'prepare_update' fails for some reason there is little
point continuing on to 'process_update'.
For now only malloc failures are caught, but other failures
will be considered in future.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'mdadm.h')
-rw-r--r-- | mdadm.h | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -929,7 +929,10 @@ extern struct superswitch { void (*sync_metadata)(struct supertype *st); void (*process_update)(struct supertype *st, struct metadata_update *update); - void (*prepare_update)(struct supertype *st, + /* Prepare updates allocates extra memory that might be + * needed. If the update cannot be understood, return 0. + */ + int (*prepare_update)(struct supertype *st, struct metadata_update *update); /* activate_spare will check if the array is degraded and, if it |