Add comment about dm_dev minor, and change it to 32bit value we realy not
going to use so much device minor numbers.
This commit is contained in:
parent
c0795be10b
commit
50cad777f0
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dm.h,v 1.19 2010/10/23 21:18:54 haad Exp $ */
|
||||
/* $NetBSD: dm.h,v 1.20 2010/12/06 08:54:49 haad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -124,7 +124,7 @@ typedef struct dm_dev {
|
||||
char uuid[DM_UUID_LEN];
|
||||
|
||||
device_t devt; /* pointer to autoconf device_t structure */
|
||||
uint64_t minor;
|
||||
uint64_t minor; /* Device minor number */
|
||||
uint32_t flags; /* store communication protocol flags */
|
||||
|
||||
kmutex_t dev_mtx; /* mutex for generall device lock */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: dm_ioctl.c,v 1.22 2010/05/18 15:01:17 haad Exp $ */
|
||||
/* $NetBSD: dm_ioctl.c,v 1.23 2010/12/06 08:54:49 haad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2008 The NetBSD Foundation, Inc.
|
||||
@ -93,7 +93,7 @@
|
||||
#include "netbsd-dm.h"
|
||||
#include "dm.h"
|
||||
|
||||
static uint64_t sc_minor_num;
|
||||
static uint32_t sc_minor_num;
|
||||
extern const struct dkdriver dmdkdriver;
|
||||
uint64_t dm_dev_counter;
|
||||
|
||||
@ -236,7 +236,7 @@ dm_dev_create_ioctl(prop_dictionary_t dm_dict)
|
||||
if (name)
|
||||
strlcpy(dmv->name, name, DM_NAME_LEN);
|
||||
|
||||
dmv->minor = atomic_inc_64_nv(&sc_minor_num);
|
||||
dmv->minor = (uint64_t)atomic_inc_32_nv(&sc_minor_num);
|
||||
dmv->flags = 0; /* device flags are set when needed */
|
||||
dmv->ref_cnt = 0;
|
||||
dmv->event_nr = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user