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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday June 22, rmichael-raid@xxxxxxxxxxxxxxxx wrote:
> 
> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux