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

Re: [dm-devel] [PATCH] dm snapshot: allow live exception store handover between tables



> +	/*
> +	 * 'is_handover_destination' denotes another snapshot with the same
> +	 * cow block device (as identified with find_snapshot_using_cow)
> +	 * will hand over its exception store to this snapshot.
> +	 *
> +	 * 'is_handover_destination' is set in snapshot_ctr if an existing
> +	 * snapshot has the same cow device. The handover is performed,
> +	 * and 'is_handover_destination' is cleared, when either of the
> +	 * following occurs:
> +	 * - src (old) snapshot, that is handing over, is destructed
> +	 * - dest (new) snapshot, that is accepting the handover, is resumed
> +	 */
> +	int is_handover_destination;
> +
> +	/*
> +	 * reference to the other snapshot that will participate in the
> +	 * exception store handover; src references dest, dest references src
> +	 */
> +	struct dm_snapshot *handover_snap;

Hi

Please drop snapshot-linking through this "handover_snap" field, it will 
create real or possible problems with locking or with dangling pointers 
(i.e. are both properly locked? Which to lock first? If you destroy a 
snapshot, you must check if something links to it, etc. --- these problems 
could be solved, but if they can be avoided by dropping linking, it's 
better to avoid them).

When you are about to do a handover (Alasdair is arranging generic dm core 
do handover only un resume), just search for a possible handover candidate 
with find_snapshot_using_cow.

Mikulas


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