DragonFly BSD

CVS log for src/sys/sys/disk.h

[BACK] Up to [DragonFly] / src / sys / sys

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.17.2.1: download - view: text, markup, annotated - select for diffs
Tue Jul 31 22:40:50 2007 UTC (7 years, 2 months ago) by dillon
Branches: DragonFly_RELEASE_1_10
CVS tags: DragonFly_RELEASE_1_10_Slip
Diff to: previous 1.17: preferred, unified; next MAIN 1.18: preferred, unified
Changes since revision 1.17: +1 -0 lines
Synchronize all changes made in HEAD to date with the 1.10 release branch.

* usbdevs update
* header file fixes
* vinum root
* vinum device I/O fixes
* MD fixes
* New PCI ids for netif rum and ural
* New USB uplcom ids
* linux exec memory leak
* devclass ordering fixes (sound devices)
* rate-limited kprintf support (filesystem full console spams)
* msdosfs fixes
* Manual page work

Revision 1.18: download - view: text, markup, annotated - select for diffs
Mon Jul 30 08:02:40 2007 UTC (7 years, 2 months ago) by dillon
Branches: MAIN
CVS tags: HEAD, DragonFly_RELEASE_2_0_Slip, DragonFly_RELEASE_2_0, DragonFly_RELEASE_1_12_Slip, DragonFly_RELEASE_1_12, DragonFly_Preview
Diff to: previous 1.17: preferred, unified
Changes since revision 1.17: +1 -0 lines
Add infrastructure to locate a disk device by name by scanning the disk
list.  Note: This doesn't work with the 'vn' device yet but it does work
with ccd.

Add a VFS with a dummy mount which is capable of synthesizing vnodes for
devices.

Add infrastructure that allows easy opening and closing of a device-backed
vnode.

Revision 1.17: download - view: text, markup, annotated - select for diffs
Sun Jun 17 23:50:12 2007 UTC (7 years, 4 months ago) by dillon
Branches: MAIN
Branch point for: DragonFly_RELEASE_1_10
Diff to: previous 1.16: preferred, unified
Changes since revision 1.16: +0 -3 lines
Disklabel separation work - Generally shift all disklabel-specific
procedures for the kernel proper to a new source file, subr_disklabel32.c.
Move the DTYPE_ and FS_ defines out of sys/disklabel.h and into a new
header files sys/dtype.h

Make adjustments to the uuids file, renaming "DragonFly Label" to
"DragonFly Label32" and creating a "DragonFly Label64" uuid.

Revision 1.16: download - view: text, markup, annotated - select for diffs
Sat May 19 02:39:04 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.15: preferred, unified
Changes since revision 1.15: +1 -0 lines
Implement raw extensions for WHOLE_DISK_SLICE device accesses for acd0.
Disallow special accesses on devices that do not support the extensions.

Implement direct track reading via /dev/acd0 or /dev/acd0t* (use
MAKEDEV acd0t to create per-track devices).

Fix a few bugs with the minor device numbers generated by MAKEDEV for
/dev/acd*.  /dev/acd0a and /dev/acd0c were improperly specifying the
WHOLE_DISK_SLICE instead of the compatibility slice.

Change all mountroot operations that were trying to access disks via
RAW_PART to instead access them via WHOLE_SLICE_PART (removing more
dependancies on the old disklabel structure).

Replace the unconditional sector sanity check in dsopen() with better
sanity checks in dscheck().  The checks are not made for special
WHOLE_DISK_SLICE accesses, allowing weird sector sizes to feed through to
the device.

Revision 1.15: download - view: text, markup, annotated - select for diffs
Sat May 19 00:52:02 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.14: preferred, unified
Changes since revision 1.14: +3 -1 lines
Continue untangling the disklabel.

* Move dk*() inline functions and other related stuff not directly related
  to the BSD disklabel out of sys/disklabel.h and into sys/diskslice.h.
  Add additional functions to sys/diskslice.h

* Extend the slice and partition fields in the device minor number.  We
  now support up to 128 slices and up to 256 partitions.

* Implement new minor device numbers for 'raw slices', such as ad0s1.
  Previously raw slices used the same minor number as partition c within
  the slice.  e.g. ad0s1 and ad0s1c had the same device number.
  This made it impossible to distinguish between the two.

  The 'whole disk' device's minor number has also changed.  Our new whole-slice
  and whole-disk devices specify a partition number of (DKMAXPARTITIONS - 1)
  (aka 255).

* Completely disable disklabel related operations on the raw disk, e.g.
  da0, and on partitions, e.g. da0s1a.  Only allow disklabel
  operations on whole slices, e.g. da0s1.

  NOTE!! For compatibility while booting drivers which set DSO_COMPATLABEL,
  the compat disklabel may be read, but not written, via the whole-disk
  device.  e.g. acd0.

  NOTE!! For compatibility we have no choice but to continue to snoop
  read/write operations on raw slices (e.g. da0s1) because the
  disklabel program and the kernel still depend on the snooping to modify
  the in-core version of the disklabel to the on-disk version.

  No snooping will occur on the whole-disk device (e.g. da0).

  No snooping will occur on raw slices (e.g. da0s1) if the disk is
  unlabeled and no in-core label was set.  Note that disklabel -r -w
  DOES set an in-core label before writing to a raw-slice, so it is still
  ok.

* dsopen() no longer attempts to scan the MBR or slice table when the
  whole-disk device (e.g. da0) is opened, and no longer attempts to read
  the disklabel when the whole-slice device is opened (e.g. da0s1).  The
  disklabel is only read when a partition is explicitly opened or the
  label is explicitly read via an ioctl.

* The virgin disklabel is stored in the struct diskslice for
  WHOLE_DISK_SLICE (slice 1).

Revision 1.14: download - view: text, markup, annotated - select for diffs
Thu May 17 03:20:11 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.13: preferred, unified
Changes since revision 1.13: +8 -0 lines
Remove the roll-your-own disklabel from CCD.  Use the kernel disk manager
for disklabel support instead.

Make CCD a real disk device rather then a fake one.  NOTE: All /dev/ccd*
devices have changed and must be remade

Introduce DSO_COMPATMBR.  This forces an MBR sector to be reserved in front
of a disklabel even when the target disk does not have slices.  It is used
by the CCD and VN devices to keep the disklabel aligned the same way it has
been historically.

Implement 64 bit block addressing for CCD.

Implement a new filesystem type "ccd", and require that the devices backing
the CCD use that filesystem type for safety.

Fix a bug in DIOCGPART where the partinfo->media_blocks was not being
set properly for partitions.

Revision 1.13: download - view: text, markup, annotated - select for diffs
Tue May 15 22:44:19 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.12: preferred, unified
Changes since revision 1.12: +1 -1 lines
* The diskslice abstraction now stores offsets/sizes as 64 bit quantities.
  (NOTE: DOS partition tables and standard disklabels can't handle 64 bit
  sector numbers yet).  For future pluggable disklabel/partitioning schemes.

* The kernel panic / kernel core API is now 64 bits.

* The VN device now uses 64 bit sector numbers and can handle block devices
  up to what is supported by the filesystem (typically 8TB).  This change
  was made primarily so we can test future disklabel / partition table
  support.

* Pass 64 bit LBAs to various block devices and to the SCSI layer.

* Check for and assert 32 bit overflow conditions in various places, instead
  of wrapping.

Revision 1.12: download - view: text, markup, annotated - select for diffs
Tue May 15 05:37:39 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.11: preferred, unified
Changes since revision 1.11: +0 -1 lines
Continue untangling the disklabel.  Use the generic disk_info structure
to hold template information instead of the disklabel structure.

This removes all references to the disklabel structure from the MBR code
and leaves mostly opaque references in the slice code.

Revision 1.11: download - view: text, markup, annotated - select for diffs
Tue May 15 00:01:04 2007 UTC (7 years, 5 months ago) by dillon
Branches: MAIN
Diff to: previous 1.10: preferred, unified
Changes since revision 1.10: +49 -2 lines
Continue untangling the disklabel.  Have most disk device drivers fill out
and install a generic disk_info structure instead of filling out random
fields in the disklabel.

The generic disk_info structure uses a 64 bit integer to represent
the media size in bytes or total sector count.

Revision 1.10: download - view: text, markup, annotated - select for diffs
Sun Sep 10 01:26:40 2006 UTC (8 years, 1 month ago) by dillon
Branches: MAIN
CVS tags: DragonFly_RELEASE_1_8_Slip, DragonFly_RELEASE_1_8
Diff to: previous 1.9: preferred, unified
Changes since revision 1.9: +4 -4 lines
Change the kernel dev_t, representing a pointer to a specinfo structure,
to cdev_t.  Change struct specinfo to struct cdev.  The name 'cdev' was taken
from FreeBSD.  Remove the dev_t shim for the kernel.

This commit generally removes the overloading of 'dev_t' between userland and
the kernel.

Also fix a bug in libkvm where a kernel dev_t (now cdev_t) was not being
properly converted to a userland dev_t.

Revision 1.9: download - view: text, markup, annotated - select for diffs
Sun Jul 30 16:49:34 2006 UTC (8 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.8: preferred, unified
Changes since revision 1.8: +1 -5 lines
Fix an incorrect #ifndef label.  Also remove a now unnecessary
#include <sys/msgport.h>.

Reported-by: Joe Talbott <josepht@ntelos.net>

Revision 1.8: download - view: text, markup, annotated - select for diffs
Fri Jul 28 02:17:41 2006 UTC (8 years, 2 months ago) by dillon
Branches: MAIN
Diff to: previous 1.7: preferred, unified
Changes since revision 1.7: +3 -4 lines
MASSIVE reorganization of the device operations vector.  Change cdevsw
to dev_ops.  dev_ops is a syslink-compatible operations vector structure
similar to the vop_ops structure used by vnodes.

Remove a huge number of instances where a thread pointer is still being
passed as an argument to various device ops and other related routines.
The device OPEN and IOCTL calls now take a ucred instead of a thread pointer,
and the CLOSE call no longer takes a thread pointer.

Revision 1.7: download - view: text, markup, annotated - select for diffs
Thu Dec 30 07:01:52 2004 UTC (9 years, 9 months ago) by cpressey
Branches: MAIN
CVS tags: DragonFly_Stable, DragonFly_RELEASE_1_6_Slip, DragonFly_RELEASE_1_6, DragonFly_RELEASE_1_4_Slip, DragonFly_RELEASE_1_4, DragonFly_RELEASE_1_2_Slip, DragonFly_RELEASE_1_2
Diff to: previous 1.6: preferred, unified
Changes since revision 1.6: +6 -0 lines
Improve seperation between kernel code and userland code by requiring
that source files that #include kernel headers also #define _KERNEL or
_KERNEL_STRUCTURES as appropriate.

With-suggestions-from: joerg
Still-todo: systimer.h, and clean up scsi_da.c
Tested-by: cd /usr/src/nrelease && make installer_release
Approved-by: dillon
If-anything-breaks-yell-at: cpressey

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Jul 16 05:51:57 2004 UTC (10 years, 3 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_Snap29Sep2004, DragonFly_Snap13Sep2004
Diff to: previous 1.5: preferred, unified
Changes since revision 1.5: +25 -17 lines
Update all my personal copyrights to the Dragonfly Standard Copyright.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Wed May 19 22:53:02 2004 UTC (10 years, 5 months ago) by dillon
Branches: MAIN
CVS tags: DragonFly_1_0_REL, DragonFly_1_0_RC1, DragonFly_1_0A_REL
Diff to: previous 1.4: preferred, unified
Changes since revision 1.4: +29 -4 lines
Device layer rollup commit.

* cdevsw_add() is now required.  cdevsw_add() and cdevsw_remove() may specify
  a mask/match indicating the range of supported minor numbers.  Multiple
  cdevsw_add()'s using the same major number, but distinctly different
  ranges, may be issued.  All devices that failed to call cdevsw_add() before
  now do.

* cdevsw_remove() now automatically marks all devices within its supported
  range as being destroyed.

* vnode->v_rdev is no longer resolved when the vnode is created.  Instead,
  only v_udev (a newly added field) is resolved.  v_rdev is resolved when
  the vnode is opened and cleared on the last close.

* A great deal of code was making rather dubious assumptions with regards
  to the validity of devices associated with vnodes, primarily due to
  the persistence of a device structure due to being indexed by (major, minor)
  instead of by (cdevsw, major, minor).  In particular, if you run a program
  which connects to a USB device and then you pull the USB device and plug
  it back in, the vnode subsystem will continue to believe that the device
  is open when, in fact, it isn't (because it was destroyed and recreated).

  In particular, note that all the VFS mount procedures now check devices
  via v_udev instead of v_rdev prior to calling VOP_OPEN(), since v_rdev
  is NULL prior to the first open.

* The disk layer's device interaction has been rewritten.  The disk layer
  (i.e. the slice and disklabel management layer) no longer overloads
  its data onto the device structure representing the underlying physical
  disk.  Instead, the disk layer uses the new cdevsw_add() functionality
  to register its own cdevsw using the underlying device's major number,
  and simply does NOT register the underlying device's cdevsw.  No
  confusion is created because the device hash is now based on
  (cdevsw,major,minor) rather then (major,minor).

  NOTE: This also means that underlying raw disk devices may use the entire
  device minor number instead of having to reserve the bits used by the disk
  layer, and also means that can we (theoretically) stack a fully
  disklabel-supported 'disk' on top of any block device.

* The new reference counting scheme prevents this by associating a device
  with a cdevsw and disconnecting the device from its cdevsw when the cdevsw
  is removed.  Additionally, all udev2dev() lookups run through the cdevsw
  mask/match and only successfully find devices still associated with an
  active cdevsw.

* Major work on MFS:  MFS no longer shortcuts vnode and device creation.  It
  now creates a real vnode and a real device and implements real open and
  close VOPs.  Additionally, due to the disk layer changes, MFS is no longer
  limited to 255 mounts.  The new limit is 16 million.  Since MFS creates a
  real device node, mount_mfs will now create a real /dev/mfs<PID> device
  that can be read from userland (e.g. so you can dump an MFS filesystem).

* BUF AND DEVICE STRATEGY changes.  The struct buf contains a b_dev field.
  In order to properly handle stacked devices we now require that the b_dev
  field be initialized before the device strategy routine is called.  This
  required some additional work in various VFS implementations.  To enforce
  this requirement, biodone() now sets b_dev to NODEV.  The new disk layer
  will adjust b_dev before forwarding a request to the actual physical
  device.

* A bug in the ISO CD boot sequence which resulted in a panic has been fixed.

Testing by: lots of people, but David Rhodus found the most aggregious bugs.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Wed Aug 20 07:31:21 2003 UTC (11 years, 2 months ago) by rob
Branches: MAIN
Diff to: previous 1.3: preferred, unified
Changes since revision 1.3: +5 -5 lines
__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.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Tue Jul 22 17:03:34 2003 UTC (11 years, 3 months ago) by dillon
Branches: MAIN
Diff to: previous 1.2: preferred, unified
Changes since revision 1.2: +11 -6 lines
DEV messaging stage 2/4: In this stage all DEV commands are now being
funneled through the message port for action by the port's beginmsg function.
CONSOLE and DISK device shims replace the port with their own and then
forward to the original.  FB (Frame Buffer) shims supposedly do the same
thing but I haven't been able to test it.   I don't expect instability
in mainline code but there might be easy-to-fix, and some drivers still need
to be converted.  See primarily: kern/kern_device.c (new dev_*() functions and
inherits cdevsw code from kern/kern_conf.c), sys/device.h, and kern/subr_disk.c
for the high points.

In this stage all DEV messages are still acted upon synchronously in the
context of the caller.  We cannot create a separate handler thread until
the copyin's (primarily in ioctl functions) are made thread-aware.

Note that the messaging shims are going to look rather messy in these early
days but as more subsystems are converted over we will begin to use
pre-initialized messages and message forwarding to avoid having to constantly
rebuild messages prior to use.

Note that DEV itself is a mess oweing to its 4.x roots and will be cleaned
up in subsequent passes.  e.g. the way sub-devices inherit the main device's
cdevsw was always a bad hack and it still is, and several functions
(mmap, kqfilter, psize, poll) return results rather then error codes, which
will be fixed since now we have a message to store the result in :-)

Revision 1.2: download - view: text, markup, annotated - select for diffs
Tue Jun 17 04:28:58 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: PRE_MP
Diff to: previous 1.1: preferred, unified
Changes since revision 1.1: +1 -0 lines
Add the DragonFly cvs id and perform general cleanups on cvs/rcs/sccs ids.  Most
ids have been removed from !lint sections and moved into comment sections.

Revision 1.1: download - view: text, markup, annotated - select for diffs
Tue Jun 17 02:55:50 2003 UTC (11 years, 4 months ago) by dillon
Branches: MAIN
CVS tags: FREEBSD_4_FORK
import from FreeBSD RELENG_4 1.16.2.3

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options