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
-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to