two 3.1.3 regression fixes (incremental assembly)
cover two 3.1.3 regression fixes (incremental assembly)
Hi Neil,
The mdadm -I --no-degraded option needs to be acceptable for some time to come, do you have a policy for when deprecated options can be scheduled for removal? The error code for -I shall be zero in the 'not enough' case to restore the correct and established pre-3.1.3 behavior.
Also available via git:
git://github.com/djbw/mdadm.git master
---
Dan Williams (2):
Incremental: return success in 'container not enough' case
Incremental: accept '--no-degraded' as a deprecated option
Incremental.c | 2 +- mdadm.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletions(-)
PATCH 1/2 Incremental: return success in 'container not enough' case
Commit 97b4d0e9 "Incremental: honor an 'enough' flag from external handlers" introduced a regression in that it changed the error return code for successful invocations.
--- Incremental.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
Incremental.c +1 -1
@@ -264,7 +264,7 @@ int Incremental(char *devname, int verbose, int runstop,else {if (verbose)fprintf (stderr, Name": not enough devices to start the container\n" ); -return 1 ; +return 0 ; }/* This is a pre-built container array, so we do something
PATCH 2/2 Incremental: accept '--no-degraded' as a deprecated option
In reply to Dan WilliamsCommit 3288b419 (Revert "Incremental: honor --no-degraded to delay assembly") killed the --no-degraded flag since commit 97b4d0e9 (Incremental: honor an 'enough' flag from external handlers) made this the default behavior of -I, and brought -I usage for external/container formats in line with native metadata. However, this breaks existing usages of '-I --no-degraded', so allow it as a deprecated option.
Starting a degraded container, like the native metadata case, requires -R.
--- mdadm.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
mdadm.c +2 -0
@@ -691,6 +691,8 @@ int main(int argc, char *argv[]) " 'summaries', 'homehost', 'byteorder', 'devicesize'.\n");exit (outf == stdout ?0 :2 ); +case O (INCREMENTAL ,NoDegraded): +fprintf (stderr, Name": --no-degraded is deprecated in Incremental mode\n" );case O (ASSEMBLE ,NoDegraded):/* --no-degraded */ runstop =-1 ;/* --stop isn't allowed for --assemble, * so we overload slightly */
Quoted 9 lines · Dan J
Hi Neil,
The mdadm -I --no-degraded option needs to be acceptable for some time to come, do you have a policy for when deprecated options can be scheduled for removal? The error code for -I shall be zero in the 'not enough' case to restore the correct and established pre-3.1.3 behavior.
Also available via git:
Quoted 7 lines
git://github.com/djbw/mdadm.gitmaster---
Dan Williams (2):
Incremental: return success in 'container not enough' case
Incremental: accept '--no-degraded' as a deprecated option
Note, both of these should have been tagged:
If you take the patches directly.
Thanks,
Dan
Quoted 18 lines · On Tue, 10 Aug 2010 16:40:46 -0700 Dan Williams <[email protected]>…
Quoted 9 lines · Dan J
Hi Neil,
The mdadm -I --no-degraded option needs to be acceptable for some time to come, do you have a policy for when deprecated options can be scheduled for removal? The error code for -I shall be zero in the 'not enough' case to restore the correct and established pre-3.1.3 behavior.
Also available via git:
Quoted 7 lines
git://github.com/djbw/mdadm.gitmaster---
Dan Williams (2):
Incremental: return success in 'container not enough' case
Incremental: accept '--no-degraded' as a deprecated option
Quoted 5 lines
Note, both of these should have been tagged:
Reported-by Ignacy Kasperowicz <[email protected]>If you take the patches directly.
Thanks,
I've taken both and added that line.
I'm beginning to think we should treat 3.1.3 like an -rc and do a 3.1.4 soon with all these little fix-ups...
NeilBrown
Quoted 6 lines · On Tue, 10 Aug 2010 09:46:38 -0700 Dan Williams <[email protected]>…
Hi Neil,
The mdadm -I --no-degraded option needs to be acceptable for some time to come, do you have a policy for when deprecated options can be scheduled for removal? The error code for -I shall be zero in the 'not enough' case to restore the correct and established pre-3.1.3 behavior.
No, I don't have a policy. Given that this was introduced fairly recently I don't feel a need to keep it around for very long. I'd probably be happy to see in go in 12 months, or with mdadm-v4.0, whichever is first.
Thanks,
NeilBrown