2 * Copyright (C) 2006-2009 Red Hat, Inc. All rights reserved.
4 * Module Author: Heinz Mauelshagen (Mauelshagen@RedHat.com)
6 * Locking definitions for the device-mapper RAID45 target.
8 * This file is released under the GPL.
15 /* Factor out to dm.h! */
16 #define STR_LEN(ptr, str) (ptr), (str), strlen((ptr))
17 /* Reference to array end. */
18 #define ARRAY_END(a) ((a) + ARRAY_SIZE(a))
20 enum dm_lock_type
{ DM_RAID45_EX
, DM_RAID45_SHARED
};
22 struct dm_raid45_locking_type
{
23 /* Request a lock on a stripe. */
24 void* (*lock
)(sector_t key
, enum dm_lock_type type
);
26 /* Release a lock on a stripe. */
27 void (*unlock
)(void *lock_handle
);