History log of /freebsd-src/sys/kern/subr_disk.c (Results 76 – 100 of 104)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: release/4.1.0
# 5d10777c 05-Jul-2000 Warner Losh <imp@FreeBSD.org>

End two weeks of on and off debugging. Fix the crash on the Nth
insertion of a CF card, for random values of N > 1. With these fixes,
I've been able to do 100 insert/remove of the cards w/o a crash

End two weeks of on and off debugging. Fix the crash on the Nth
insertion of a CF card, for random values of N > 1. With these fixes,
I've been able to do 100 insert/remove of the cards w/o a crash with
lots of system activity going on that in the past would help trigger
the crash.

The problem:

FreeBSD creates dev_t's on the fly as they are needed and never
destroys them. These dev_t's point to a struct disk that is used for
housekeeping on the disk. When a device goes away, the struct disk
pointer becomes a dangling pointer. Sometimes when the device comes
back, the pointer will point to the new struct disk (in which case the
insertion will work). Other times it won't (especially if any length
of time has passed, since it is dependent on memory returned from
malloc).

The Fix:

There is one of these dev_t's that is always correct. The
device for the WHOLE_DISK_SLICE is always right. It gets set at
create_disk() time. So, the fix is to spend a little CPU time and
lookup the WHOLE_DISK_SLICE dev_t and use the si_disk from that in
preference to the one that's in the device asking to do the I/O. In
addition, we change the test of si_disk == NULL meaning that the dev
needed to inherit properties from the pdev to dev->si_disk !=
pdev->si_disk. This test is a little stronger than the previous test,
but can sometimes be fooled into not inheriting. However, the results
of this fooling are that the old values will be used, which will
generally always be the same as before. si_drv[12] are the only
values that are copied that might pose a problem. They tend to change
as the si_disk field would change, so it is a hole, but it is a small
hole.

One could correctly argue that one should replace much of this code
with something much much better. I would be on the pro side of that
argument.

Reviewed by: phk (who also ported the original patch to current)
Sponsored by: Timing Solutions

show more ...


# 77978ab8 04-Jul-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Previous commit changing SYSCTL_HANDLER_ARGS violated KNF.

Pointed out by: bde


# 82d9ae4e 03-Jul-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:

Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

-sysctl_vm_zone SYSCTL_HANDLER_ARGS
+sysct

Style police catches up with rev 1.26 of src/sys/sys/sysctl.h:

Sanitize SYSCTL_HANDLER_ARGS so that simplistic tools can grog our
sources:

-sysctl_vm_zone SYSCTL_HANDLER_ARGS
+sysctl_vm_zone (SYSCTL_HANDLER_ARGS)

show more ...


Revision tags: release/3.5.0_cvs
# 445572c1 22-Jun-2000 Neil Blakey-Milner <nbm@FreeBSD.org>

Add 'kern.disks', a sysctl which returns the list of disks from
disk_enumerate(), space delimited. This allows non-root users to get a
list of disks and will simplify libdisk's Disk_Names().

Review

Add 'kern.disks', a sysctl which returns the list of disks from
disk_enumerate(), space delimited. This allows non-root users to get a
list of disks and will simplify libdisk's Disk_Names().

Reviewed by: phk

show more ...


# 4bd02a56 15-Jun-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Add disk_enumerate() for finding names of disks. Vinum and libh will
need this RSN.

Remove a pointless warning in the root device locating code.

Remove the "wd" compatibility name from the "ad" dr

Add disk_enumerate() for finding names of disks. Vinum and libh will
need this RSN.

Remove a pointless warning in the root device locating code.

Remove the "wd" compatibility name from the "ad" driver.

WARNING: If you have not updated to use /dev/wd* in your /etc/fstab
and modern bootblocks, it would be a very good idea to do so BEFORE
you upgrade your kernel.

show more ...


# 9626b608 05-May-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on

Separate the struct bio related stuff out of <sys/buf.h> into
<sys/bio.h>.

<sys/bio.h> is now a prerequisite for <sys/buf.h> but it shall
not be made a nested include according to bdes teachings on the
subject of nested includes.

Diskdrivers and similar stuff below specfs::strategy() should no
longer need to include <sys/buf.> unless they need caching of data.

Still a few bogus uses of struct buf to track down.

Repocopy by: peter

show more ...


# 67f3c95c 25-Apr-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Clone the {b|bio}_offset field, and make sure it is always initialized
in struct bio. Eventually, bio_offset will probably obsolete the
bio_blkno and bio_pblkno fields.

Remove the special hack in a

Clone the {b|bio}_offset field, and make sure it is always initialized
in struct bio. Eventually, bio_offset will probably obsolete the
bio_blkno and bio_pblkno fields.

Remove the special hack in atapi-cd.c to determine of bio_offset was valid.

show more ...


# 8177437d 15-Apr-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Complete the bio/buf divorce for all code below devfs::strategy

Exceptions:
Vinum untouched. This means that it cannot be compiled.
Greg Lehey is on the case.

CCD not conve

Complete the bio/buf divorce for all code below devfs::strategy

Exceptions:
Vinum untouched. This means that it cannot be compiled.
Greg Lehey is on the case.

CCD not converted yet, casts to struct buf (still safe)

atapi-cd casts to struct buf to examine B_PHYS

show more ...


# c244d2de 02-Apr-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Move B_ERROR flag to b_ioflags and call it BIO_ERROR.

(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while w

Move B_ERROR flag to b_ioflags and call it BIO_ERROR.

(Much of this done by script)

Move B_ORDERED flag to b_ioflags and call it BIO_ORDERED.

Move b_pblkno and b_iodone_chain to struct bio while we transition, they
will be obsoleted once bio structs chain/stack.

Add bio_queue field for struct bio aware disksort.

Address a lot of stylistic issues brought up by bde.

show more ...


Revision tags: release/4.0.0_cvs
# a4fcac54 09-Mar-2000 Bruce Evans <bde@FreeBSD.org>

Fixed a null pointer panic for dumpon(8) on a nonexistent device whose
driver uses the new disk layer.

Reviewed by: phk
Approved by: jkh


# 47351d27 18-Feb-2000 Søren Schmidt <sos@FreeBSD.org>

Update the ata driver to take more advantage of newbus, this
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, mor

Update the ata driver to take more advantage of newbus, this
was needed to make attach/detach of devices work, which is
needed for the PCCARD support.
(PCCARD support is still not working though, more to come on that)

Support the CMD646 chip which is used on many alphas, sadly only
in WDMA2 mode, as the silicon is broken beyond belief for UDMA modes.

Lots of cosmetic fixes here and there.

Sorry for the size of this megapatchfromhell but it was not
possible otherwise...

newbus patches based on work from: dfr (Doug Rabson)

show more ...


# 1edde29e 28-Jan-2000 Poul-Henning Kamp <phk@FreeBSD.org>

rename disk_delete() to disk_destroy().


# d685023e 10-Jan-2000 Poul-Henning Kamp <phk@FreeBSD.org>

Also handle zero return from dscheck().

PR: 15956


Revision tags: release/3.4.0_cvs
# 1b4ce5ce 19-Dec-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Don't ignore return value from tsleep().

Spotted by: charnier


# 8d67e113 19-Nov-1999 Jordan K. Hubbard <jkh@FreeBSD.org>

Conditionalise unwanted chattyness.


# 8db34b3a 06-Nov-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Put a lock on the disk structure while we open to avoid races.

PR: 14486


# d1f088da 11-Oct-1999 Peter Wemm <peter@FreeBSD.org>

Trim unused options (or #ifdef for undoc options).

Submitted by: phk


# 6d7e938c 04-Oct-1999 Poul-Henning Kamp <phk@FreeBSD.org>

be more consistent about passing the whole/raw dev_t to the driver


# dc722a14 02-Oct-1999 Søren Schmidt <sos@FreeBSD.org>

In some drivers we use two devices to be able to boot.
So if si_iosize_max is allready set, dont mess with it..

Also just log the problem with maxphys not being set once.

designed by: phk
tested by

In some drivers we use two devices to be able to boot.
So if si_iosize_max is allready set, dont mess with it..

Also just log the problem with maxphys not being set once.

designed by: phk
tested by: sos

show more ...


# 45604de3 02-Oct-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Fix a problem relating to si_iosize_max which broke scsi devices.


# 66c12520 30-Sep-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Make all slices/partitions correctly inherit si_* fields.

Lightly tested by: msmith


# 263ab971 30-Sep-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Fix disk_close once more, and better this time.

Spotted by: bde


# 46a706dc 30-Sep-1999 Mike Smith <msmith@FreeBSD.org>

Test the slices for openness before we close them; doing it the other way
around meant that the higher level close routine never gets called.
(phk is on the road; this is a quick fix to get things wo

Test the slices for openness before we close them; doing it the other way
around meant that the higher level close routine never gets called.
(phk is on the road; this is a quick fix to get things working and may need
more polish)

show more ...


Revision tags: release/3.3.0_cvs
# abd1f573 13-Sep-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Register the right cdevsw on the master device.

Detected by: sos


# 2016e4e9 12-Sep-1999 Poul-Henning Kamp <phk@FreeBSD.org>

Bite the bullet and allocate the devsw entry at compile time.


12345