Module Name: src Committed By: haad Date: Mon Dec 6 08:54:49 UTC 2010
Modified Files: src/sys/dev/dm: dm.h dm_ioctl.c Log Message: Add comment about dm_dev minor, and change it to 32bit value we realy not going to use so much device minor numbers. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/dev/dm/dm.h cvs rdiff -u -r1.22 -r1.23 src/sys/dev/dm/dm_ioctl.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/dm/dm.h diff -u src/sys/dev/dm/dm.h:1.19 src/sys/dev/dm/dm.h:1.20 --- src/sys/dev/dm/dm.h:1.19 Sat Oct 23 21:18:54 2010 +++ src/sys/dev/dm/dm.h Mon Dec 6 08:54:49 2010 @@ -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 @@ 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 */ Index: src/sys/dev/dm/dm_ioctl.c diff -u src/sys/dev/dm/dm_ioctl.c:1.22 src/sys/dev/dm/dm_ioctl.c:1.23 --- src/sys/dev/dm/dm_ioctl.c:1.22 Tue May 18 15:01:17 2010 +++ src/sys/dev/dm/dm_ioctl.c Mon Dec 6 08:54:49 2010 @@ -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 @@ 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;