2 * vdi.h - The driver for virtual disks of VirtualBox
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <http://www.gnu.org/licenses/>.
25 #define VDI_BLKSIZE 512
26 #define VDI_SECTORS 20
27 #define VDI_HARDSECT_SIZE 512
29 #define KERNEL_SECTOR_SIZE 512
31 typedef struct vdi_dev
{
32 unsigned long size
; // Device size in bytes
33 spinlock_t lock
; // Mutual exclusion
34 //TODO: remove this?struct request_queue *queue; // Device request queue
35 struct gendisk
*gd
; // gendisk structure