Lines Matching +full:system +full:- +full:on +full:- +full:module
1 .\" ----------------------------------------------------------------------------
2 .\" "THE BEER-WARE LICENSE" (Revision 42):
5 .\" this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp
6 .\" ----------------------------------------------------------------------------
13 - or -
17 Poul-Henning Kamp <phk@FreeBSD.org>
21 Historically, the only translation performed on I/O requests after
22 they they left the file-system layer were logical sub disk implementation
25 and operating system have done it their own way. As FreeBSD migrates to
27 able to co-exist with other operating systems on the same disk.
37 This paper contains the road-map for a stackable "BIO" system in
44 of struct buf, it is a most enlightening case of not exactly bit-rot
45 but more appropriately design-rot.
59 struct buf *av_forw; /* position on free list, */
65 char *b_blkno; /* block # on device */
84 \(bu Where on disk is the data located (b_dev, b_blkno)
89 used by the disk device drivers to put requests on a linked list.
93 If we step forward to the BSD 4.4-Lite-2 release, struct buf has grown
132 The main piece of action is the addition of vnodes, a VM system and a
133 prototype LFS filesystem, all of which needed some handles on struct
140 aspect, link buffers to the VM system, provide hacks for file-systems
143 By the time we get to FreeBSD 3.0 more stuff has grown on struct buf:
196 …added which allows the driver to hang local data off the buf while working on it have been added (…
201 which the device driver operates on.
210 of code have emerged which need to do non-trivial translations of
217 routine (p. 16-2) writes \fIThe code in this procedure incorporates
227 or equally magic "MBR" sectors on a disk must be caught, examined and in
228 some cases modified before being passed on to the device driver. This need
235 these and pass them on to other device drivers.
265 will have for future work on struct buf, I will try to address
321 opposed to "hi-jacked" fields).
322 One field was found to have "dual-use": the b_flags field.
349 dev_t bio_dev; /* Device to do I/O on. */
411 which means that certain pieces of code can be left un-converted with the
413 The ccd and vinum modules have been left un-converted like this for now.
415 This is basically where FreeBSD-current stands today.
439 Retaining the aliasing for the b_* and bio_* name-spaces this way
443 into the drivers to full-fill the I/O request and this provides us
444 with a single isolated location for performing non-trivial translations.
448 on-disk location of the data. b_blkno is a 32bit offset of B_DEVSIZE
450 of data. Using b_offset as a 64 bit byte-address would not only allow
452 possible to accommodate disks which use non-power-of-two sector-size,
453 Audio CD-ROMs for instance.
467 Another possible transition could be to not have a "built-in" struct bio
470 un-alias the fields and have DEV_STRATEGY() allocate a struct bio and populate
484 In traditional UNIX semantics a "disk" is a one-dimensional array of
486 …lemented with a sort of "don't ask-don't tell" policy where system administrator would specify a l…
492 \(bu What is the sector size. Sector-size these days may not be a power
500 devices where a wear-distribution software or hardware function uses
504 \(bu Is opening this device in a specific mode, (read-only or read-write)
505 allowed. The VM system and the file-systems generally assume that nobody
510 This is useful for staying compatible with badly designed on-disk formats
515 at any time. While some devices like CD-ROMs can lock the media in
521 Mirroring, RAID, striping, interleaving, disk-labels and sub-disks, all of
527 all hard to emulate so implementation-wise this is a non-issue.
531 Today the plumbing might look like this on a machine:
546 DML: box dashed width 4i height .9i with .sw at SL0.sw + (-.2,-.2)
547 "Disk-mini-layer" with .n at DML.s + (0, .1)
628 The first thing we notice is that the disk mini-layer is gone, instead
643 A number of the geometry modules have registered as "auto-discovering"
645 is on this disk. The MBR module finds a MBR in sector 0 and attach
659 BSD label module recognises a FreeBSD label on one of the slices and
677 The BSD module finds three partitions, creates them as disks and the
679 and the process ends. In theory one could have a module recognise
681 on, but this is probably better implemented in a general "device-daemon"
682 in user-land.
685 accessed from user-land or kernel. The VM and file-systems generally
688 a particular module implements, we need to ask the modules if the open
691 We decide to mount a filesystem on one of the BSD partitions at the very top.
692 The open request is passed to the BSD module, which finds that none of
694 objections. It then passes the open to the MBR module, which goes through
699 Next we mount a filesystem on the next BSD partition. The
700 BSD module again checks for overlapping open partitions and find none.
705 Next we mount a msdos filesystem on the other MBR slice. This is the
710 BSD module attached already. The open is passed to the MBR module which
711 notes that the device is already opened for writing by a module (the BSD
712 module) and consequently the open is refused.
718 of intent to eject, a call-up from the driver can try to get devices synchronised
720 a unplugged parallel zip drive, a floppy disk or a PC-card, we have no
721 choice but to dismantle the setup. The device driver sends a "gone" notification to the MBR module…
722 and the BSD module. The msdosfs unmounts forcefully, invalidates any blocks
723 in the buf/vm system and returns. The BSD module replicates the "gone" to
724 the two mounted file-systems which in turn unmounts forcefully, invalidates
725 blocks and return, after which the BSD module releases any resources held
726 and returns, the MBR module releases any resources held and returns and all
764 but the mirror module still has a valid mirror from disk da1, so it
766 file-systems mounted are not affected.
771 insert a mirroring module, since it has a 1:1 mapping from input
774 and remove the mirror module. We have now in essence moved a partition
784 of all the NFOO limits on the number of instances of a particular
788 \(bu The disk-mini-layer has
790 majority of the disk-drivers, saving on average 100 lines of code per
795 VM system users of struct buf.
812 The next step is to re-implement the monolithic disk-mini-layer so
813 that it becomes the stackable BIO system. Vinum and CCD and all
815 the current and the new disk-mini-layer. The new implementation
824 BIO system: CCD can be re-implemented as a mirror module and a stripe
825 module. Vinum can be integrated either as one "macro-module" or
827 purposes can be added, sub-disk handling for Solaris, MacOS, etc