[Sheepdog] [PATCH v4 01/12] sheep: hide some minor store layout aware operations

Liu Yuan namei.unix at gmail.com
Thu Dec 29 07:15:05 CET 2011


On 12/29/2011 12:56 AM, Christoph Hellwig wrote:

> On Wed, Dec 28, 2011 at 09:19:02PM +0800, Liu Yuan wrote:
>> I am suspecting that only Simple Store will assume epoch/data layout, so
>> I think we'd better put up with this ugliness, and see if there is a
>> real need to abstract out this operation when new backend store is added
>> later.
> 
> Doing conditionals based on a driver name in core code is a real
> maintainance hurden over the long term as it breaks the abstraction.
> 
> I'd prefer the method call, but the other options would be to add a
> flags field to the driver structure and then defined a flag for
> the epoch/data layout which gets set by the simple driver.
> 


Add two method to interface for get_store_dir() and update_epoch_store
would be overkill to me, in the assumption that only Simple Store needs
this. I think with more stores added in, we will be at better position
to restructure this core code. So for currently, we might make do with
this hack.

Thanks,
Yuan



More information about the sheepdog mailing list