[sheepdog] [PATCH v2 4/7] md: add hot-plug and hot-unplug support
MORITA Kazutaka
morita.kazutaka at lab.ntt.co.jp
Wed Apr 3 07:26:31 CEST 2013
At Wed, 03 Apr 2013 12:58:48 +0800,
Liu Yuan wrote:
>
> On 04/03/2013 12:47 PM, MORITA Kazutaka wrote:
> > How about removing the broken disk here and continuing the loop? I
> > looks much better than returning an error to the user.
>
> This means we need to get a write lock, get_info is relatively time
> consuming and block IO requets. is this trade-off worthy of it?
Hmm, getting a write lock is not a good idea, but returning
SD_RES_UNKNOWN to users is not good too. How about simply setting
zero to info->disk[i].size and continuing the job? Then, users can
know that something goes wrong with the disk when the size of it is
zero.
Another way is calling md_handle_eio() against all the broken disks
after we unlock a read lock in md_get_info(), but it complicates the
codes a bit.
Thanks,
Kazutaka
More information about the sheepdog
mailing list