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

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

 



Dne 3.11.2009 17:46, Mike Snitzer napsal(a):
> On Mon, Nov 02 2009 at  9:20am -0500,
> Zdenek Kabelac <zkabelac@xxxxxxxxxx> 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)

Zdenek



--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux