summaryrefslogtreecommitdiff
path: root/ubuntu/dm-raid4-5/dm-raid45.h
blob: 786ba7af6425cf3c6ecaa09f35595c73f6b3dc7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
 * Copyright (C) 2006-2008 Red Hat, Inc. All rights reserved.
 *
 * Module Author: Heinz Mauelshagen (Mauelshagen@RedHat.com)
 *
 * Locking definitions for the device-mapper RAID45 target.
 *
 * This file is released under the GPL.
 *
 */

#ifndef _DM_RAID45_H
#define _DM_RAID45_H

/* Factor out to dm.h! */
#define	STR_LEN(ptr, str)	(ptr), (str), strlen((ptr))

enum dm_lock_type { DM_RAID45_EX, DM_RAID45_SHARED };

struct dm_raid45_locking_type {
	/* Request a lock on a stripe. */
	void* (*lock)(sector_t key, enum dm_lock_type type);

	/* Release a lock on a stripe. */
	void (*unlock)(void *lock_handle);
};

#endif