Re: Why can't I stop these arrays? PATCH

From
Neil Brown <hidden>
Date
2008-06-23 22:42:10
On Sunday June 22, rmichael-raid@edgeofthenet.org wrote:
quoted hunk
Since this has come up on the mailing before, is there any interest in
this trivial one liner?  (Perhaps it needs to go elsewhere in the code
as well.)

diff -u -r mdadm-2.6.7/Manage.c mdadm-2.6.7-local/Manage.c
--- mdadm-2.6.7/Manage.c        2008-06-05 22:11:04.000000000 -0400
+++ mdadm-2.6.7-local/Manage.c  2008-06-22 20:35:25.000000000 -0400
@@ -115,6 +115,7 @@
                        if (quiet==0)
                                fprintf(stderr, Name ": fail to stop array %s: %s\n",
                                        devname, strerror(errno));
+                               fprintf(stderr, "Perhaps a running process, mounted filesystem or active volume group?\n");
                        return 1;
                }
                if (quiet <= 0)
Somewhere way down on my TODO list is
  Improve error messages to try and really explain what is
  going on.

This is in line with that so I'm happy to take it.
However I would at least like the new message to be conditional on
   errno == EBUSY

I don't think any other error are possible, but it is good practice,
provides implicit documentation, and guards against possible future
changes.

NeilBrown
Thread (1 message) 1 message, 1 author, last reply 2008-06-23
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help