aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/dm.h
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2006-06-26 03:27:32 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:36 -0400
commit2b06cfff12f0f87c4bc4d4c4dd76997e72c360ba (patch)
tree68e9085593ef64b78a60daec94898e620bf716c3 /drivers/md/dm.h
parent814d68629b40e863997fa0eea459be4cc99a06cc (diff)
[PATCH] dm: consolidate creation functions
Merge dm_create() and dm_create_with_minor() by introducing the special value DM_ANY_MINOR to request the allocation of the next available minor number. Signed-off-by: Alasdair G Kergon <agk@redhat.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/dm.h')
-rw-r--r--drivers/md/dm.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/md/dm.h b/drivers/md/dm.h
index fd90bc8f9e45..2901ab943191 100644
--- a/drivers/md/dm.h
+++ b/drivers/md/dm.h
@@ -2,7 +2,7 @@
2 * Internal header file for device mapper 2 * Internal header file for device mapper
3 * 3 *
4 * Copyright (C) 2001, 2002 Sistina Software 4 * Copyright (C) 2001, 2002 Sistina Software
5 * Copyright (C) 2004 Red Hat, Inc. All rights reserved. 5 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
6 * 6 *
7 * This file is released under the LGPL. 7 * This file is released under the LGPL.
8 */ 8 */
@@ -45,16 +45,21 @@ struct mapped_device;
45 * Functions for manipulating a struct mapped_device. 45 * Functions for manipulating a struct mapped_device.
46 * Drop the reference with dm_put when you finish with the object. 46 * Drop the reference with dm_put when you finish with the object.
47 *---------------------------------------------------------------*/ 47 *---------------------------------------------------------------*/
48int dm_create(struct mapped_device **md); 48
49int dm_create_with_minor(unsigned int minor, struct mapped_device **md); 49/*
50 * DM_ANY_MINOR allocates any available minor number.
51 */
52#define DM_ANY_MINOR (-1)
53int dm_create(int minor, struct mapped_device **md);
54
50void dm_set_mdptr(struct mapped_device *md, void *ptr); 55void dm_set_mdptr(struct mapped_device *md, void *ptr);
51void *dm_get_mdptr(struct mapped_device *md); 56void *dm_get_mdptr(struct mapped_device *md);
52struct mapped_device *dm_get_md(dev_t dev);
53 57
54/* 58/*
55 * Reference counting for md. 59 * Reference counting for md.
56 */ 60 */
57void dm_get(struct mapped_device *md); 61void dm_get(struct mapped_device *md);
62struct mapped_device *dm_get_md(dev_t dev);
58void dm_put(struct mapped_device *md); 63void dm_put(struct mapped_device *md);
59 64
60/* 65/*