1*40654Smckusick /* 2*40654Smckusick * Copyright (c) 1990 The Regents of the University of California. 3*40654Smckusick * All rights reserved. 4*40654Smckusick * 5*40654Smckusick * Redistribution and use in source and binary forms are permitted 6*40654Smckusick * provided that the above copyright notice and this paragraph are 7*40654Smckusick * duplicated in all such forms and that any documentation, 8*40654Smckusick * advertising materials, and other materials related to such 9*40654Smckusick * distribution and use acknowledge that the software was developed 10*40654Smckusick * by the University of California, Berkeley. The name of the 11*40654Smckusick * University may not be used to endorse or promote products derived 12*40654Smckusick * from this software without specific prior written permission. 13*40654Smckusick * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14*40654Smckusick * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15*40654Smckusick * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16*40654Smckusick * 17*40654Smckusick * @(#)specdev.h 7.1 (Berkeley) 03/27/90 18*40654Smckusick */ 19*40654Smckusick 20*40654Smckusick /* 21*40654Smckusick * This structure defines the information maintained about 22*40654Smckusick * special devices. It is allocated in checkalias and freed 23*40654Smckusick * in vgone. 24*40654Smckusick */ 25*40654Smckusick struct specinfo { 26*40654Smckusick struct vnode **si_hashchain; 27*40654Smckusick struct vnode *si_specnext; 28*40654Smckusick long si_flags; 29*40654Smckusick dev_t si_rdev; 30*40654Smckusick }; 31*40654Smckusick /* 32*40654Smckusick * Exported shorthand 33*40654Smckusick */ 34*40654Smckusick #define v_rdev v_specinfo->si_rdev 35*40654Smckusick #define v_hashchain v_specinfo->si_hashchain 36*40654Smckusick #define v_specnext v_specinfo->si_specnext 37*40654Smckusick #define v_specflags v_specinfo->si_flags 38*40654Smckusick 39*40654Smckusick /* 40*40654Smckusick * Flags for specinfo 41*40654Smckusick */ 42*40654Smckusick #define SI_MOUNTEDON 0x0001 /* block special device is mounted on */ 43*40654Smckusick 44*40654Smckusick /* 45*40654Smckusick * Special device management 46*40654Smckusick */ 47*40654Smckusick #define SPECHSZ 64 48*40654Smckusick #if ((SPECHSZ&(SPECHSZ-1)) == 0) 49*40654Smckusick #define SPECHASH(rdev) (((rdev>>5)+(rdev))&(SPECHSZ-1)) 50*40654Smckusick #else 51*40654Smckusick #define SPECHASH(rdev) (((unsigned)((rdev>>5)+(rdev)))%SPECHSZ) 52*40654Smckusick #endif 53*40654Smckusick 54*40654Smckusick struct vnode *speclisth[SPECHSZ]; 55