diff options
| author | sborrill <sborrill@NetBSD.org> | 2014-08-16 19:27:27 +0000 |
|---|---|---|
| committer | sborrill <sborrill@NetBSD.org> | 2014-08-16 19:27:27 +0000 |
| commit | 4aef3cb5ec15bc51ff067a7ef8f439736940aaa7 (patch) | |
| tree | 951210ccd3b668ed1e017d195514956eb87da53a /sys/dev/ccdvar.h | |
| parent | 73c8734f09edd65d5a1fa2ce01e1971cdb16d393 (diff) | |
Switch size_t to uint64_t in appropriate places to ensure that ccd(4) works
with component and total sizes of > 2TB.
Add COMPAT_60 code for platforms where this alters userland-accessible
structures.
Make kernel print device information when a ccd configured.
Fix some typos in comments.
Diffstat (limited to 'sys/dev/ccdvar.h')
| -rw-r--r-- | sys/dev/ccdvar.h | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/sys/dev/ccdvar.h b/sys/dev/ccdvar.h index f2a5c495beb..257f1fa02c4 100644 --- a/sys/dev/ccdvar.h +++ b/sys/dev/ccdvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: ccdvar.h,v 1.33 2013/04/27 17:13:34 christos Exp $ */ +/* $NetBSD: ccdvar.h,v 1.34 2014/08/16 19:27:27 sborrill Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 1999, 2007, 2009 The NetBSD Foundation, Inc. @@ -93,9 +93,10 @@ struct ccd_ioctl { int ccio_ileave; /* interleave (DEV_BSIZE blocks) */ int ccio_flags; /* see sc_flags below */ int ccio_unit; /* unit number: use varies */ - size_t ccio_size; /* (returned) size of ccd */ + uint64_t ccio_size; /* (returned) size of ccd */ }; + /* * Component info table. * Describes a single component of a concatenated disk. @@ -103,7 +104,7 @@ struct ccd_ioctl { struct ccdcinfo { struct vnode *ci_vp; /* device's vnode */ dev_t ci_dev; /* XXX: device's dev_t */ - size_t ci_size; /* size */ + uint64_t ci_size; /* size */ char *ci_path; /* path to component */ size_t ci_pathlen; /* length of component path */ }; @@ -160,7 +161,7 @@ struct ccdbuf; struct ccd_softc { int sc_unit; int sc_flags; /* flags */ - size_t sc_size; /* size of ccd */ + uint64_t sc_size; /* size of ccd */ int sc_ileave; /* interleave */ u_int sc_nccdisks; /* number of components */ #define CCD_MAXNDISKS 65536 @@ -203,13 +204,29 @@ struct ccd_softc { #define CCDIOCSET _IOWR('F', 16, struct ccd_ioctl) /* enable ccd */ #define CCDIOCCLR _IOW('F', 17, struct ccd_ioctl) /* disable ccd */ +#if defined(COMPAT_60) && !defined(_LP64) +/* + * Old version with incorrect ccio_size + */ +struct ccd_ioctl_60 { + char **ccio_disks; /* pointer to component paths */ + u_int ccio_ndisks; /* number of disks to concatenate */ + int ccio_ileave; /* interleave (DEV_BSIZE blocks) */ + int ccio_flags; /* see sc_flags below */ + int ccio_unit; /* unit number: use varies */ + size_t ccio_size; /* (returned) size of ccd */ +}; + +#define CCDIOCSET_60 _IOWR('F', 16, struct ccd_ioctl_60) /* enable ccd */ +#define CCDIOCCLR_60 _IOW('F', 17, struct ccd_ioctl_60) /* disable ccd */ +#endif /* COMPAT_60 && !LP64*/ /* * Sysctl information */ struct ccddiskinfo { int ccd_ileave; u_int ccd_ndisks; - size_t ccd_size; + uint64_t ccd_size; int ccd_flags; }; |
