Commit graph

8 commits

Author SHA1 Message Date
David van Moolenbroek 6700874deb Block drivers: make IOCTL request unsigned long
The block driver protocol and libblockdriver's bdr_ioctl hook are
changed, as well as the users of this hook. Other parts of the system
are expected to change accordingly eventually, since the ioctl(2)
prototype has been aligned with NetBSD's.

Change-Id: Ide46245b22cfa89ed267a38088fb0ab7696eba92
2014-02-19 11:22:15 +01:00
David van Moolenbroek 95624ae072 Block protocol: add user endpoint to IOCTL request
I/O control requests now come with the endpoint of the user process
that initiated the ioctl(2) call. It is stored in a new BDEV_USER
field, which is an alias for BDEV_FLAGS. The contents of this field
are to be used only in highly specific situations. It should be
preserved (not replaced!) by services that forward IOCTL requests,
and may be set to NONE for service-initiated IOCTL requests.

Change-Id: I68a01b9ce43eca00e61b985a9cf87f55ba683de4
2014-02-19 11:22:15 +01:00
David van Moolenbroek 113635b019 Block protocol: use own [RW]_BIT definitions
The original R_BIT and W_BIT definitions have nothing to do with the
way these bits are used. Their distinct usage is more apparent when
they have different names.

Change-Id: Ia984457f900078b2e3502ceed565fead4e5bb965
2014-02-19 11:22:15 +01:00
David van Moolenbroek 0f7f3c0d54 libblockdriver: various updates
- internal structure rearrangement;
- respond to char device open requests to avoid hanging VFS threads;
- make drivers use designated initializers;
- use devminor_t for all minor device numbers;
- change bdr_other hook to take ipc_status and return nothing;
- fix default geometry computation;
- add support for sef_cancel.

Change-Id: Ia063a136a3ddb2b78de36180feda870605753d70
2014-02-19 11:22:15 +01:00
David van Moolenbroek 26cb85535e Block drivers: reply ENOTTY to unknown IOCTLs
Change-Id: Ie2e82d2491d546f4dd73b009100646e249a147b5
2014-02-19 11:22:15 +01:00
David van Moolenbroek a1f00d5527 Move SUB_PER_DRIVE definition into minix/drvlib.h
Change-Id: Id25761085ce1868955da34d8e530e170448ea154
2014-02-19 11:21:56 +01:00
David van Moolenbroek 3be9c7c33b Rename "struct partition" to "struct part_geom"
Change-Id: Ifaf9795ba70f5b933599b2a6ec9415e6bd13200c
2013-03-20 16:14:21 +00:00
Arne Welzel a27b60af75 virtio: virtio-blk driver 2013-01-23 09:03:03 +00:00