From owner-freebsd-current@FreeBSD.ORG Thu Jun 11 13:22:09 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 79D34106564A for ; Thu, 11 Jun 2009 13:22:09 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: from onelab2.iet.unipi.it (onelab2.iet.unipi.it [131.114.9.129]) by mx1.freebsd.org (Postfix) with ESMTP id 428CD8FC17 for ; Thu, 11 Jun 2009 13:22:09 +0000 (UTC) (envelope-from luigi@onelab2.iet.unipi.it) Received: by onelab2.iet.unipi.it (Postfix, from userid 275) id 19066730A1; Thu, 11 Jun 2009 15:08:00 +0200 (CEST) Date: Thu, 11 Jun 2009 15:08:00 +0200 From: Luigi Rizzo To: current@freebsd.org Message-ID: <20090611130800.GA22241@onelab2.iet.unipi.it> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i Cc: Subject: proposed bio.h change X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Jun 2009 13:22:09 -0000 I noticed that sys/sys/bio.h unnecessarily exposes various structures to userland. If there are no objections I would like to commit the following change (moving the bio_cmd values up because they are used by ggatectl) cheers luigi Index: head/sys/sys/bio.h =================================================================== --- head/sys/sys/bio.h (revision 193988) +++ head/sys/sys/bio.h (working copy) @@ -40,6 +40,17 @@ #include +/* bio_cmd */ +#define BIO_READ 0x01 +#define BIO_WRITE 0x02 +#define BIO_DELETE 0x04 +#define BIO_GETATTR 0x08 +#define BIO_FLUSH 0x10 +#define BIO_CMD0 0x20 /* Available for local hacks */ +#define BIO_CMD1 0x40 /* Available for local hacks */ +#define BIO_CMD2 0x80 /* Available for local hacks */ + +#ifdef _KERNEL struct disk; struct bio; @@ -95,22 +106,12 @@ daddr_t bio_pblkno; /* physical block number */ }; -/* bio_cmd */ -#define BIO_READ 0x01 -#define BIO_WRITE 0x02 -#define BIO_DELETE 0x04 -#define BIO_GETATTR 0x08 -#define BIO_FLUSH 0x10 -#define BIO_CMD0 0x20 /* Available for local hacks */ -#define BIO_CMD1 0x40 /* Available for local hacks */ -#define BIO_CMD2 0x80 /* Available for local hacks */ /* bio_flags */ #define BIO_ERROR 0x01 #define BIO_DONE 0x02 #define BIO_ONQUEUE 0x04 -#ifdef _KERNEL struct uio; struct devstat;