[sheepdog] [PATCH v3 3/6] md: add hot-plug and hot-unplug support
Liu Yuan
namei.unix at gmail.com
Wed Apr 3 11:12:27 CEST 2013
On 04/03/2013 04:21 PM, MORITA Kazutaka wrote:
> At Wed, 3 Apr 2013 14:27:44 +0800,
> Liu Yuan wrote:
>>
>> static void md_do_recover(struct work *work)
>> {
>> struct md_work *mw = container_of(work, struct md_work, work);
>> @@ -383,7 +408,10 @@ static void md_do_recover(struct work *work)
>> if (idx < 0)
>> /* Just ignore the duplicate EIO of the same path */
>> goto out;
>> - unplug_disk(idx);
>> + remove_disk(idx);
>> + sys->disk_space = md_init_space();
>
> tests/055 emulates disk failure by removing the md direcotry, but
> md_init_space() creates a new directory if it doesn't exist. So, if
> simultaneous two disk failures happen, the first md_do_recover() will
> create a new md directory for the second disk and the second disk
> failure will be cancelled (objects in the directory will be removed
> though).
>
> This might not be a problem because the md directory is a mount point
> in the actual use cases. However, it is cleaner to call mkdir() only
> when starting sheepdog, I think.
But md plug also need mkdir. Maybe we can try to mkdir at collie side.
Then we can move mkdir out of md_init_space().
Thanks,
Yuan
More information about the sheepdog
mailing list