Update to 3.4-final.
[linux-flexiantxendom0-3.2.10.git] / drivers / md / dm-raid45.h
1 /*
2  * Copyright (C) 2006-2009 Red Hat, Inc. All rights reserved.
3  *
4  * Module Author: Heinz Mauelshagen (Mauelshagen@RedHat.com)
5  *
6  * Locking definitions for the device-mapper RAID45 target.
7  *
8  * This file is released under the GPL.
9  *
10  */
11
12 #ifndef _DM_RAID45_H
13 #define _DM_RAID45_H
14
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))
19
20 enum dm_lock_type { DM_RAID45_EX, DM_RAID45_SHARED };
21
22 struct dm_raid45_locking_type {
23         /* Request a lock on a stripe. */
24         void* (*lock)(sector_t key, enum dm_lock_type type);
25
26         /* Release a lock on a stripe. */
27         void (*unlock)(void *lock_handle);
28 };
29
30 #endif