History log of /dragonfly/sys/kern/subr_diskmbr.c (Results 1 – 25 of 42)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: v6.2.1, v6.2.0, v6.3.0, v6.0.1, v6.0.0, v6.0.0rc1, v6.1.0, v5.8.3, v5.8.2, v5.8.1, v5.8.0, v5.9.0, v5.8.0rc1, v5.6.3, v5.6.2, v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3, v5.4.2, v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1, v5.2.2, v5.2.1, v5.2.0, v5.3.0, v5.2.0rc, v5.0.2, v5.0.1, v5.0.0
# bf20632c 01-Oct-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Remove geteblk()

* Remove geteblk(), the last B_MALLOC buffer cache API. Generally
use getpbuf_mem() instead.


Revision tags: v5.0.0rc2, v5.1.0, v5.0.0rc1
# 794d80aa 12-Sep-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Change legacy MBR partition type from 0xA5 to 0x6C

* Should have done this years ago but finally change the legacy MBR
partition type DragonFlyBSD uses from 0xA5 (which was shared with

kernel - Change legacy MBR partition type from 0xA5 to 0x6C

* Should have done this years ago but finally change the legacy MBR
partition type DragonFlyBSD uses from 0xA5 (which was shared with
FreeBSD), to something different 0x6C.

* Makes it less confusing for Grub.

* Does not change EFI boot, which uses 16-byte UUIDs (we already have
our own) and does not use 8-bit partition ids.

* Boot code and kernel now recognize both 0xA5 and 0x6C. Existing users
do *NOT* need to reinstall their boot code.

show more ...


Revision tags: v4.8.1, v4.8.0, v4.6.2, v4.9.0, v4.8.0rc
# 79363655 12-Jan-2017 Sascha Wildner <saw@online.de>

kernel: Fix GPT detection a bit.

Having a legacy MBR partition of type 0xef aka EFI system
partition is a perfectly legal case, and it is covered by
the UEFI specification too (in version 2.6, see s

kernel: Fix GPT detection a bit.

Having a legacy MBR partition of type 0xef aka EFI system
partition is a perfectly legal case, and it is covered by
the UEFI specification too (in version 2.6, see section 12.3.1).

That means it is not a sufficient indicator that this is a
disk with a GPT, so don't automatically treat it as one. For
the partition in the PMBR on actual GPT disks, type 0xee
will always be used, so that check alone is sufficient for
what is intended here.

Background: Using legacy MBR and having an EFI system
partition at the same time is the layout most USB installation
media use in order to boot on both UEFI and legacy BIOS systems.
The upcoming UEFI installation support work will do the same.

show more ...


Revision tags: v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0, v4.4.3, v4.4.2, v4.4.1, v4.4.0, v4.5.0, v4.4.0rc, v4.2.4, v4.3.1, v4.2.3, v4.2.1, v4.2.0, v4.0.6, v4.3.0, v4.2.0rc, v4.0.5, v4.0.4
# a06d536b 03-Mar-2015 Matthew Dillon <dillon@apollo.backplane.com>

dmsg - Stabilization work

* Add a refs field to dmsg_state and kdmsg_state for retention and
disposal.

* Separate out the tracking of state->subq and the state RB trees.

* Greatly simplify the i

dmsg - Stabilization work

* Add a refs field to dmsg_state and kdmsg_state for retention and
disposal.

* Separate out the tracking of state->subq and the state RB trees.

* Greatly simplify the iocom shutdown code and functions related
to handling communications failures. When iterating states for
shutdown, which requires simulating a received failure message,
we can now simply iterate via state->subq.

* Greatly simplify how the simulated failures are generated and
handled (See dmsg_msg_simulate_failure()). This is probably the
most complex part of the library.

* Fix a memory leak in kern_dmsg.c.

* Replace xdisk's per-softc token with a lockmgr lock. Atomicy
has to be guaranteed across blocking conditions in certain cases
and it was easier to simply use a lock for everything.

Cleanup the locking.

* Ripout the shutdown check in the I/O path, which can deadlock
the disk management threads. This will need to be revisited
as it means that /dev/xa* and /dev/serno* devices remain in
/dev after a link failure even when there are no opens on the
device.

* Add the B_FAILONDIS flag to struct buf. This flag allows the disk
probe code to tell xdisk that it is ok for the I/O to fail, allowing
xdisk to discard I/Os that would otherwise block or deadlock the
disk probe code when the related network connection is lost.

show more ...


Revision tags: v4.0.3, v4.0.2, v4.0.1, v4.0.0, v4.0.0rc3, v4.0.0rc2, v4.0.0rc, v4.1.0, v3.8.2, v3.8.1, v3.6.3, v3.8.0, v3.8.0rc2, v3.9.0, v3.8.0rc, v3.6.2, v3.6.1, v3.6.0, v3.7.1, v3.6.0rc, v3.7.0, v3.4.3
# dc71b7ab 31-May-2013 Justin C. Sherrill <justin@shiningsilence.com>

Correct BSD License clause numbering from 1-2-4 to 1-2-3.

Apparently everyone's doing it:
http://svnweb.freebsd.org/base?view=revision&revision=251069

Submitted-by: "Eitan Adler" <lists at eitanadl

Correct BSD License clause numbering from 1-2-4 to 1-2-3.

Apparently everyone's doing it:
http://svnweb.freebsd.org/base?view=revision&revision=251069

Submitted-by: "Eitan Adler" <lists at eitanadler.com>

show more ...


Revision tags: v3.4.2
# 2702099d 06-May-2013 Justin C. Sherrill <justin@shiningsilence.com>

Remove advertising clause from all that isn't contrib or userland bin.

By: Eitan Adler <lists@eitanadler.com>


Revision tags: v3.4.0, v3.4.1, v3.4.0rc, v3.5.0, v3.2.2, v3.2.1, v3.2.0, v3.3.0, v3.0.3, v3.0.2, v3.0.1, v3.1.0, v3.0.0
# 86d7f5d3 26-Nov-2011 John Marino <draco@marino.st>

Initial import of binutils 2.22 on the new vendor branch

Future versions of binutils will also reside on this branch rather
than continuing to create new binutils branches for each new version.


# f406e2fe 22-Oct-2011 Sascha Wildner <saw@online.de>

Remove some duplicate includes in sys/kern.


Revision tags: v2.12.0, v2.13.0, v2.10.1, v2.11.0, v2.10.0, v2.9.1, v2.8.2, v2.8.1, v2.8.0, v2.9.0, v2.6.3, v2.7.3, v2.6.2, v2.7.2, v2.7.1, v2.6.1, v2.7.0, v2.6.0, v2.5.1, v2.4.1, v2.5.0, v2.4.0
# 3d7daed3 11-Sep-2009 Alex Hornung <ahornung@gmail.com>

diskmbr - Don't use 'tempname', use dsname()

* sname was initially assigned "tempname" and then never changed
using dsname as intended. Now we properly call dsname before
printing sname.

Report

diskmbr - Don't use 'tempname', use dsname()

* sname was initially assigned "tempname" and then never changed
using dsname as intended. Now we properly call dsname before
printing sname.

Reported-By: Sascha Wildner

show more ...


# 5bd0c8a5 01-Sep-2009 Matthew Dillon <dillon@apollo.backplane.com>

Kernel - Disk - do not bother trying to read the MBR if media_size is 0

* Do not bother trying to read the MBR if media_size is 0, typically
indicating removable media with no media present.


# aec8eea4 04-Aug-2009 Matthew Dillon <dillon@apollo.backplane.com>

DEVS - rollup - kernel core

* Remove dead code.

* Reference count adjustments for devfs.

* DEVFS integration into kernel core, including automatic probe/reprobe.

* Dummy vnops support for depreca

DEVS - rollup - kernel core

* Remove dead code.

* Reference count adjustments for devfs.

* DEVFS integration into kernel core, including automatic probe/reprobe.

* Dummy vnops support for deprecated VCHR and VBLK devices in filesystems.

* Silence MBR warnings for VN with DSO_MBRQUIET flag.

* Change rootdevnames for CD boot. DEVFS provides e.g. "cd0", "cd0s0".
The old compatibility-slice partition "c" names are no longer generated
and have been removed.

Submitted-by: Alex Hornung <ahornung@gmail.com>, and Matthew Dillon

show more ...


# cd29885a 01-Aug-2009 Matthew Dillon <dillon@apollo.backplane.com>

DEVFS - Bring in Alex's GSOC kernel adjustments.

This is a rollup commit bringing in Alex Hornung's GSOC adjustments
to the main kernel codebase for DEVFS.

Submitted-by: Alex Hornung <ahornung@gmai

DEVFS - Bring in Alex's GSOC kernel adjustments.

This is a rollup commit bringing in Alex Hornung's GSOC adjustments
to the main kernel codebase for DEVFS.

Submitted-by: Alex Hornung <ahornung@gmail.com>

show more ...


# ae8e83e6 15-Jul-2009 Matthew Dillon <dillon@apollo.backplane.com>

MPSAFE - tsleep_interlock, BUF/BIO, cluster, swap_pager.

* tsleep_interlock()/tsleep() could miss wakeups during periods of
heavy cpu activity. What would happen is code inbetween the two
calls

MPSAFE - tsleep_interlock, BUF/BIO, cluster, swap_pager.

* tsleep_interlock()/tsleep() could miss wakeups during periods of
heavy cpu activity. What would happen is code inbetween the two
calls would try to send an IPI (say, issue a wakeup()), but while
sending the IPI the kernel would be forced to process incoming IPIs
synchronous to avoid a deadlock.

The new tsleep_interlock()/tsleep() code adds another TAILQ_ENTRY to
the thread structure allowing tsleep_interlock() to formally place
the thread on the appropriate sleep queue without having to deschedule
the thread. Any wakeup which occurs between the interlock and the
real tsleep() call will remove the thread from the queue and the
later tsleep() call will recognize this and simply return without sleeping.

The new tsleep() call requires PINTERLOCKED to be passed to tsleep
so tsleep() knows that the thread has already been placed on a sleep
queue.

* Continue making BUF/BIO MPSAFE. Remove B_ASYNC and B_WANT from buf->b_flag
and add a new bio->bio_flags field to the bio. Add BIO_SYNC, BIO_WANT,
and BIO_DONE. Use atomic_cmpset_int() (aka cmpxchg) to interlock
biodone() against biowait().

vn_strategy() and dev_dstrategy() call semantics now require that
synchronous BIO's install a bio_done function and set BIO_SYNC in
the bio.

* Clean up the cluster code a bit.

* Redo the swap_pager code. Instead of issuing I/O during the collection,
which depended on critical sections to avoid races in the cluster append,
we now build the entire collection first and then dispatch the I/O.
This allows us to use only async completion for the BIOs, instead of
a hybrid sync-or-async completion.

show more ...


Revision tags: v2.3.2
# 5d5bf5f9 25-Jun-2009 Sascha Wildner <saw@online.de>

subr_diskmbr.c: Fix some warning fixes.

* No need to cast dp_size at all, just fix the format.

* Add cast for size.


# 973c11b9 24-Jun-2009 Matthew Dillon <dillon@apollo.backplane.com>

AMD64 - Fix many compile-time warnings. int/ptr type mismatches, %llx, etc.


# 34ea800d 23-Jun-2009 Matthew Dillon <dillon@apollo.backplane.com>

kernel diskmbr handling - Detect maxed out slice ds_size field.

If the DOS slice field is found to be maxed out (0xFFFFFFFFU), use the
actual media size for calculations instead of ds_size. This al

kernel diskmbr handling - Detect maxed out slice ds_size field.

If the DOS slice field is found to be maxed out (0xFFFFFFFFU), use the
actual media size for calculations instead of ds_size. This allows
disks > 2TB to have a conventional slice table and still contain a
disklabel64 which covers the actual size of the media.

show more ...


Revision tags: v2.3.1, v2.2.1, v2.2.0, v2.3.0, v2.1.1, v2.0.1
# 18cb7add 19-Jun-2007 Matthew Dillon <dillon@dragonflybsd.org>

Make some adjustments to clean up structural field names. Add type and
storage uuid's to the partinfo structure for the DIOCGPART ioctl and
load the fields up for GPT slices and disklabel64 partitio

Make some adjustments to clean up structural field names. Add type and
storage uuid's to the partinfo structure for the DIOCGPART ioctl and
load the fields up for GPT slices and disklabel64 partitions.

show more ...


# 1c3c151b 17-Jun-2007 Matthew Dillon <dillon@dragonflybsd.org>

Implement (non-bootable) GPT support. If a PMBR partition type is detected
the rest of the MBR is ignored and the GPT partition table will be parsed
into slices. GPT partition 0 will be s0, GPT par

Implement (non-bootable) GPT support. If a PMBR partition type is detected
the rest of the MBR is ignored and the GPT partition table will be parsed
into slices. GPT partition 0 will be s0, GPT partition 1 will be s1, etc.
Bootable support is forthcoming.

Remove support for COMPATIBILITY_SLICE when a MBR/GPT table is present. That
is, the COMPATIBILITY_SLICE (s0) will still point to the dangerously
dedicated disklabel or be synthesized for a CD, but it will no longer point
to the 'first BSD slice' in a real MBR or GPT table. For GPT tables
slice 0 (s0) will point at GPT partition #0, slice 1 (s1) at
GPT partition #1, etc.

Redo the reserved sector handling code. There is now a single reserved
sector count instead of separate fields for the slice layer and disklabel
layer.

Redo the disklabel snooping code. Note that you cannot run an old
/sbin/disklabel in raw (-r) mode with a new OS because the old disklabel
will not turn on snooping. For now the on-disk format remains the same,
but more changes may be forthcoming (after discussion). I would like to
get rid of the snooping entirely.

Add kuuid_is_nil() and use it to ignore unset GPT paritions.

show more ...


# 5a8edc7a 19-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

Keep the ds_skip_* fields in struct diskslice properly synchronized.
ds_skip_bsdlabel is inclusive of bsd_skip_platform but was being improperly
set to 0 even when an mbr reserved sector existed. Th

Keep the ds_skip_* fields in struct diskslice properly synchronized.
ds_skip_bsdlabel is inclusive of bsd_skip_platform but was being improperly
set to 0 even when an mbr reserved sector existed. The fields were not
being properly reset for a slice whos disklabel is destroyed.

Defer reading the disklabel on a slice until a partition on the slice
is opened or a disklabel related DIOC ioctl is performed on the slice.
In particular, we do not attempt to read the disklabel when opening the
whole-disk-slice for the whole disk or the whole-slice-partition for a slice.

Previously the code attempted to scan all available BSD slices for
disklabels.

When writing to a raw slice, do not snoop or do reserved-sector checks
unless a disklabel has been loaded for the slice. Typically a disklabel
will only be loaded in two situations: (1) if filesystems are mounted from
that slice or (2) the disklabel program has performed ioctls on the
whole-slice-partition to set a disklabel. Now writing to raw slices works
almost the same as writing to the whole-disk-slice, with no interpretation.

Remove all remaining references to the LABELSECTOR constant. Instead,
use the ds_skip_* fields to determine the sector where the disklabel
starts within a slice. These changes significantly cleaned up the
snoop and reserved sector checking code in dscheck().

show more ...


# 8a88e0d0 19-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

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/

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.

show more ...


# 154b688d 16-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

Continue untangling the disklabel. Add sector index reservation fields
to the diskslice and partinfo structures. These fields will replace the
hardcoded LABELSECTOR constant and also help manage re

Continue untangling the disklabel. Add sector index reservation fields
to the diskslice and partinfo structures. These fields will replace the
hardcoded LABELSECTOR constant and also help manage reserved areas in
the disklabel.

show more ...


# e0fc5693 15-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

* 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 diskl

* 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.

show more ...


# 84f8b009 15-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

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 t

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.

show more ...


# a688b15c 15-May-2007 Matthew Dillon <dillon@dragonflybsd.org>

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 stru

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.

show more ...


# 6ea70f76 23-Dec-2006 Sascha Wildner <swildner@dragonflybsd.org>

Rename printf -> kprintf in sys/ and add some defines where necessary
(files which are used in userland, too).


12