Merge tag 'v3.3.7' into 3.3/master
[zen-stable.git] / drivers / md / dm-raid45.h
bloba55ee2e2fbe2e2375d4279c903148cde2f569383
1 /*
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.
12 #ifndef _DM_RAID45_H
13 #define _DM_RAID45_H
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);
30 #endif