History log of /dragonfly/sys/bus/cam/scsi/scsi_da.c (Results 1 – 25 of 104)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 857fcb57 14-Oct-2023 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Disable various dev accesses for RESTRICTEDROOT environments

* Do not allow CAM (e.g. /dev/sg0 and so forth) to be accessed if
RESTRICTEDROOT is active. Note that RESTRICTEDROOT is autom

kernel - Disable various dev accesses for RESTRICTEDROOT environments

* Do not allow CAM (e.g. /dev/sg0 and so forth) to be accessed if
RESTRICTEDROOT is active. Note that RESTRICTEDROOT is automatically
set for jails.

* Restrict writes to /dev/random and /dev/urandom

* Also restrict evdev, kbd, syscons, pci, console, devctl

show more ...


Revision tags: v6.4.0, v6.4.0rc1, v6.5.0, v6.2.2, 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
# 128500e6 28-Jun-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Add TPS balancing mode to scsi_da (da* disks)

* This feature brings write tps down to match read tps when both are
pending. Normally both read and write I/Os get at least a few tags,
b

kernel - Add TPS balancing mode to scsi_da (da* disks)

* This feature brings write tps down to match read tps when both are
pending. Normally both read and write I/Os get at least a few tags,
but because write I/O is buffered by devices, even giving it one tag
can complete destroy read performance.

To accomplish this the feature monitors approximate TPS using a counter
with exponential decay and will temporarily sets write openings in the
device queue to zero.

* SSDs usually do a better job on their own, but this feature won't hurt
so we do not distinguish between HDDs and SSDs.

* New sysctls for this feature (feature is enabled by default):

kern.cam.da.balance_enable 1 (0=disable, 1=enable)
kern.cam.da.balance_ratio 100 (read:write ratio, 1:1 is 100)
kern.cam.da.balance_debug 0 (log to console each second)

You can adjust the read:write tps ratio as desired. For example,
the value 200 will adjust the ratio to 2:1.

show more ...


Revision tags: v5.6.1, v5.6.0, v5.6.0rc1, v5.7.0, v5.4.3
# f2187f0a 11-May-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Restore kern.cam.da.X.trim_enabled sysctl

* This sysctl was not always being properly installed due to an
ordering and timing issue.

* The code was not setting the trim flag in the corre

kernel - Restore kern.cam.da.X.trim_enabled sysctl

* This sysctl was not always being properly installed due to an
ordering and timing issue.

* The code was not setting the trim flag in the correct structure.

show more ...


Revision tags: v5.4.2
# aec00d32 05-Apr-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - quiet repeated DA/CD probes for removable devices

* Don't print errors when repeated probes for cards in sdcard
readers fail, beyond the first instance.

* Fixes console spam when usb car

kernel - quiet repeated DA/CD probes for removable devices

* Don't print errors when repeated probes for cards in sdcard
readers fail, beyond the first instance.

* Fixes console spam when usb card readers are plugged in.

show more ...


# cec957e9 04-Mar-2019 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Change callout in struct ccb_hdr

* Change the callout declaration in struct ccb_hdr from an embedded
structure to a pointer, add padding to get the whole structure to its
original size

kernel - Change callout in struct ccb_hdr

* Change the callout declaration in struct ccb_hdr from an embedded
structure to a pointer, add padding to get the whole structure to its
original size (prior to the recent callout patch).

* This removes an improper ABI dependency on the kernel struct callout
structure which was causing 'camcontrol', and 'smartctl' (from
smartmontools) to fail.

Testing: dillon, tuxillo

show more ...


# fcf6efef 02-Mar-2019 Sascha Wildner <saw@online.de>

kernel: Remove numerous #include <sys/thread2.h>.

Most of them were added when we converted spl*() calls to
crit_enter()/crit_exit(), almost 14 years ago. We can now
remove a good chunk of them agai

kernel: Remove numerous #include <sys/thread2.h>.

Most of them were added when we converted spl*() calls to
crit_enter()/crit_exit(), almost 14 years ago. We can now
remove a good chunk of them again for where crit_*() are
no longer used.

I had to adjust some files that were relying on thread2.h
or headers that it includes coming in via other headers
that it was removed from.

show more ...


Revision tags: v5.4.1, v5.4.0, v5.5.0, v5.4.0rc1
# d9306807 01-Aug-2018 Matthew Dillon <dillon@apollo.backplane.com>

fdisk, gpt - Support trim on recent kernels

* Recent kernels removed the 'trim' sysctls. Devices now allow trim by
default.

* Fix the fdisk -E option to no longer try to use the sysctls.

* Add

fdisk, gpt - Support trim on recent kernels

* Recent kernels removed the 'trim' sysctls. Devices now allow trim by
default.

* Fix the fdisk -E option to no longer try to use the sysctls.

* Add trim support to gpt init (-E).

* Fix swapon -e, change option to -E to match gpt and fdisk
(-e still supported and does the same thing).

show more ...


Revision tags: v5.2.2, v5.2.1
# c4851e1d 24-Apr-2018 Sascha Wildner <saw@online.de>

Remove <sys/ioctl_compat.h>.

Now that tkusumi's fix for benchmarks/fio for the name and location
change of the IOCTLTRIM ioctl is in DeltaPorts, remove the header
entirely.

Fixes for stty(1) and ps

Remove <sys/ioctl_compat.h>.

Now that tkusumi's fix for benchmarks/fio for the name and location
change of the IOCTLTRIM ioctl is in DeltaPorts, remove the header
entirely.

Fixes for stty(1) and pstat(8) are from FreeBSD.

Dports-checking: zrj

show more ...


# 2ea825fb 21-Apr-2018 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix duplicate da0 or da* and locked up boot

* Fix duplicate da* reporting at boot which usually results in
the boot locking up.

* The diskinfo was being installed while before CAM's soft

kernel - Fix duplicate da0 or da* and locked up boot

* Fix duplicate da* reporting at boot which usually results in
the boot locking up.

* The diskinfo was being installed while before CAM's softc->state
normalized, potentially allowing I/O to occur during the probe
sequence and causing the probe state to be repeated.

Delay calling disk_setdiskinfo() until after softc->state is
normalized.

show more ...


# 32506cfa 10-Apr-2018 Sascha Wildner <saw@online.de>

Move the IOCTLTRIM ioctl to a better header and rename it to DAIOCTRIM.

<sys/ioctl_compat.h> really is only for old tty related stuff.

Also bump __DragonFly_version, because there is one port which

Move the IOCTLTRIM ioctl to a better header and rename it to DAIOCTRIM.

<sys/ioctl_compat.h> really is only for old tty related stuff.

Also bump __DragonFly_version, because there is one port which uses
IOCTLTRIM currently, i.e. benchmarks/fio. We'll send a patch upstream
that switches it to DAIOCTRIM, and once the updated version has hit
the /usr/dports tree, I will remove IOCTLTRIM from base.

show more ...


Revision tags: v5.2.0, v5.3.0, v5.2.0rc
# a9f09b75 04-Feb-2018 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix CAM peripheral error handling

* cam_periph.c was bcopy()ing the *ENTIRE* saved ccb back to the
original when working through certain error results. This completely
destroys linked

kernel - Fix CAM peripheral error handling

* cam_periph.c was bcopy()ing the *ENTIRE* saved ccb back to the
original when working through certain error results. This completely
destroys linked list entry fields.

* Refactor by hacking a restore_ccb() function which does not copy
over the link list entry fields or the callout structure.

* Fixes panics with CDs, particularly audio CDs, and can also fix
other panics.

Panics are related to situations where an AHCI error or errors occur
while multiple CCBs are queued.

* Also always initialize the state tracking field for various scsi
periphals to ensure that stale data does not result in improper
processing in scsi/*.c's *done() functions.

Reported-by: htse

show more ...


Revision tags: v5.0.2, v5.0.1, v5.0.0
# d2812084 01-Oct-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Remove repurposebuf

* Remove the repurposebuf hack to prepare for the buffer cache
KVABIO API, which is a better solution.


Revision tags: v5.0.0rc2, v5.1.0, v5.0.0rc1, v4.8.1
# c022ffc9 30-Jul-2017 Imre Vadász <imre@vdsz.com>

Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().

This meant, that the DEVICE_SHUTDOWN() callback of scsi drivers was running
before the final SYNCHRONIZE_CACHE scsi command

Make sure that cam(4)'s dashutdown handler runs before DEVICE_SHUTDOWN().

This meant, that the DEVICE_SHUTDOWN() callback of scsi drivers was running
before the final SYNCHRONIZE_CACHE scsi command was sent by cam(4). For
most drivers this was still fine, since usually the DEVICE_SHUTDOWN()
callback - if it's even implemented - only flushes the command queue.

This change avoids freezing at the end of shutdown which was known to
happen with the twa(4), and virtio_scsi(4) drivers.

The SHUTDOWN_PRI_SECOND priority is selected, because it's so far unused,
and inbetween existing handlers in the shutdown_post_sync phase, that are
at SHUTDOWN_PRI_FIRST and at SHUTDOWN_PRI_DEFAULT.

Tested-by: swildner (on twa(4)), ivadasz (on virtio_scsi(4))

show more ...


Revision tags: v4.8.0, v4.6.2, v4.9.0, v4.8.0rc
# 0c4341b9 09-Jan-2017 Matthew Dillon <dillon@apollo.backplane.com>

buf - Remove B_ORDERED, Incidental CAM MPSAFE

* Remove support for B_ORDERED. Most drivers ignore it, and it is basically
unusable.

* The CAM "xpt", "pass", and "sg" devices are MPSAFE, flag the

buf - Remove B_ORDERED, Incidental CAM MPSAFE

* Remove support for B_ORDERED. Most drivers ignore it, and it is basically
unusable.

* The CAM "xpt", "pass", and "sg" devices are MPSAFE, flag them
appropriately.

show more ...


# 6422eba4 08-Jan-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - CAM cleanup 3/N - Remove unnecessary mplocks

* Remove some low-hanging fruit. The mplock is not needed for any
of these paths, they are protected by other locks.


# 53005b09 02-Jan-2017 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Fix TRIM bugs in UFS

* Fix serious bug in devfs's implementation of VOP_FREEBLKS. devfs was
running this operation asynchronously, but callers (aka UFS) expect it
to run synchronously.

kernel - Fix TRIM bugs in UFS

* Fix serious bug in devfs's implementation of VOP_FREEBLKS. devfs was
running this operation asynchronously, but callers (aka UFS) expect it
to run synchronously.

* Fix minor bug in CAM related to TRIM failures.

* Enforce block count limitations in NVMe for WRITEZ.

* Mostly applicable to NVMe, which will implement FREEBLKS using the WRITEZ
command (at least for now). Trim is disabled on SATA SSDs by default in
the driver.

Fixes UEFI booting issues with NVMe when using a UFS /boot. Writing or
updating the UFS /boot mounted via NVMe resulted in a corrupt partition due
to the asynchronous VOP_FREEBLKS that we fixed above.

Reported-by: mneumann.

show more ...


Revision tags: v4.6.1, v4.6.0, v4.6.0rc2, v4.6.0rc, v4.7.0
# dc6a6bd2 18-Jul-2016 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Refactor buffer cache code in preparation for vm_page repurposing

* Keep buffer_map but no longer use vm_map_findspace/vm_map_delete to manage
buffer sizes. Instead, reserve MAXBSIZE of

kernel - Refactor buffer cache code in preparation for vm_page repurposing

* Keep buffer_map but no longer use vm_map_findspace/vm_map_delete to manage
buffer sizes. Instead, reserve MAXBSIZE of unallocated KVM for each buffer.

* Refactor the buffer cache management code. bufspace exhaustion now has
hysteresis, bufcount works just about the same.

* Start work on the repurposing code (currently disabled).

show more ...


Revision tags: 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, 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
# da10ea93 24-Nov-2013 Matthew Dillon <dillon@apollo.backplane.com>

iwn - Resync from FreeBSD 1/2

* Resync all files except the build infrastructure from FreeBSD.
Next commit will re-port the files.


Revision tags: v3.6.0
# c6cad506 19-Nov-2013 Sepherosa Ziehau <sephe@dragonflybsd.org>

Revert "da: Independant read/write bioqs are used, so no need to use bioqdisksort"

This reverts commit 3f9f5f9aaf14daa1f014ab9c4780f90b4c17bd6d.

bioqdisksort may be augmented later to support read-

Revert "da: Independant read/write bioqs are used, so no need to use bioqdisksort"

This reverts commit 3f9f5f9aaf14daa1f014ab9c4780f90b4c17bd6d.

bioqdisksort may be augmented later to support read-read or write-write
reordering. At least currently it does not hurt, so leave it there.

Pointed-out-by: dillon@

show more ...


# 3f9f5f9a 18-Nov-2013 Sepherosa Ziehau <sephe@dragonflybsd.org>

da: Independant read/write bioqs are used, so no need to use bioqdisksort


Revision tags: v3.7.1, v3.6.0rc, v3.7.0
# cec73927 05-Sep-2013 Matthew Dillon <dillon@apollo.backplane.com>

kernel - Change time_second to time_uptime for all expiration calculations

* Vet the entire kernel and change use cases for expiration calculations
using time_second to use time_uptime instead.

*

kernel - Change time_second to time_uptime for all expiration calculations

* Vet the entire kernel and change use cases for expiration calculations
using time_second to use time_uptime instead.

* Protects these expiration calculations from step changes in the wall time,
particularly needed for route table entries.

* Probably requires further variable type adjustments but the use of
time_uptime instead if time_second is highly unlikely to ever overrun
any demotions to int still present.

show more ...


Revision tags: v3.4.3, v3.4.2
# 0b41f48b 05-May-2013 Sascha Wildner <saw@online.de>

kernel/scsi_da: If booting verbosely, si_iosize_max when registering.


# 5ee727b6 05-May-2013 Sascha Wildner <saw@online.de>

kernel/scsi_da: Use __func__ for printing function names.


Revision tags: v3.4.0, v3.4.1, v3.4.0rc, v3.5.0
# 21023f7a 08-Jan-2013 Sascha Wildner <saw@online.de>

kernel/bus: Remove some unused variables and put others in #ifdef...


Revision tags: v3.2.2
# 6ea5f4c4 04-Dec-2012 Sascha Wildner <saw@online.de>

kernel: Remove NULL checks after kmalloc(..., M_INTWAIT).

M_INTWAIT will not return NULL unless M_NULLOK is passed too.


12345