File:  [DragonFly] / src / sys / sys / disk.h
Revision 1.4: download - view: text, annotated - select for diffs
Wed Aug 20 07:31:21 2003 UTC (11 years, 11 months ago) by rob
Branches: MAIN
CVS tags: HEAD
__P() != wanted, begin removal, in order to preserve white space this needs
to be done by hand, as I accidently killed a source tree that I had gotten
this far on. I'm committing this now, LINT and GENERIC both build with
these changes, there are many more to come.

 * ----------------------------------------------------------------------------
 * "THE BEER-WARE LICENSE" (Revision 42):
 * <phk@FreeBSD.ORG> wrote this file.  As long as you retain this notice you
 * can do whatever you want with this stuff. If we meet some day, and you think
 * this stuff is worth it, you can buy me a beer in return.   Poul-Henning Kamp
 * ----------------------------------------------------------------------------
 * $FreeBSD: src/sys/sys/disk.h,v 2001/06/20 16:11:01 scottl Exp $
 * $DragonFly: src/sys/sys/disk.h,v 1.4 2003/08/20 07:31:21 rob Exp $

#ifndef _SYS_DISK_H_
#define	_SYS_DISK_H_

#include <sys/diskslice.h>

#include <sys/disklabel.h>

#include <sys/msgport.h>

struct disk {
	struct lwkt_port	d_port;		/* interception port */
	struct lwkt_port	*d_fwdport;	/* forward to real port */
	u_int			d_flags;
	u_int			d_dsflags;
	dev_t			d_dev;
	struct diskslices	*d_slice;
	struct disklabel	d_label;
	LIST_ENTRY(disk)	d_list;

#define DISKFLAG_LOCK		0x1
#define DISKFLAG_WANTED		0x2

dev_t disk_create (int unit, struct disk *disk, int flags, struct cdevsw *cdevsw);
void disk_destroy (struct disk *disk);
int disk_dumpcheck (dev_t dev, u_int *count, u_int *blkno, u_int *secsize);
struct disk *disk_enumerate (struct disk *disk);
void disk_invalidate (struct disk *disk);

#endif /* _SYS_DISK_H_ */