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

[dm-devel] Re: [PATCH 07/18] Replicator: suspend/deactivate replicator

Dne 3.11.2009 17:46, Mike Snitzer napsal(a):
> On Mon, Nov 02 2009 at  9:20am -0500,
> Zdenek Kabelac <zkabelac redhat com> wrote:
>> Introducing dm_tree_set_replicator_suspend() to suspend
>> replicator control device before actual deactivation of replicator-dev
>> head device.
>>  	int activation_priority;	/* 0 gets activated first */
>> +	int replicator_suspend;		/* 1 gets suspend first */
>>  	uint16_t udev_flags;		/* Udev control flags */
> I think it would be wise to make this more generic,
> e.g. "suspend_priority".
> It could be that other future devices would like to prioritize the
> suspend sequence too.  Having a means to do so (without using a
> seemingly replicator-specific node attribute) would be good.
> So this really just amounts to: s/replicator_suspend/suspend_priority/

  I think using 'priority' would be more challenging here - for replicator it
is only needs to check parental node - while with priority you would probably
expect full tree traversal to see whether there is node which should be
suspend in front of current device - thought the code could be probably
extended in a way to specify recursive traversal depth - for replicator tree
depth 1 is enough.

  Previous implementation was probably more generic in this, but required API
changes - the use case for current implementation is rather focused on the
replicator's needs with the advantage, it will not influence anything else.

  I think at this moment this API is static internal and might be probably
easily changed/modified once some similar target would need to use it ?
(It's not easy to predict future use case)


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