| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the keyfile being cleared prematurely after r259428 (MFCed to stable/9
in r266750).
PR: 185084
Submitted by: fk@fabiankeil.de
Reviewed by: pjd
Approved by: re (glebius)
Notes:
svn path=/releng/9.3/; revision=267862
|
|
|
|
|
|
|
|
|
|
| |
Use g_conf_printf_escaped() to escape symbols, which can break
an XML tree.
Approved by: re (gjb)
Notes:
svn path=/stable/9/; revision=267157
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Clear content of keyfiles loaded by the loader after processing them.
MFC: r259429
Clear some more places with potentially sensitive data.
Approved by: re (gjb)
Notes:
svn path=/stable/9/; revision=266750
|
|
|
|
|
|
|
| |
Remove redundant include
Notes:
svn path=/stable/9/; revision=266037
|
|
|
|
|
|
|
| |
Make g_access() KASSERT() more useful.
Notes:
svn path=/stable/9/; revision=266034
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For schemes that do an automatic partition aligning move this code to
separate function.
MFC r265331:
Prevent an unexpected shrinking on resizing due to alignment for MBR,
PC98 and VTOC8 schemes.
MFC r265333:
Add better error description for case when we are doing resize and
scheme-specific method returns EBUSY.
MFC r265539:
It is safe to allow shrinking, when aligned size is bigger than current.
Notes:
svn path=/stable/9/; revision=265911
|
|
|
|
|
|
|
|
|
| |
Do not increment bio_data in case of BIO_DELETE.
This fixes KASSERT() panic in g_io_request().
Notes:
svn path=/stable/9/; revision=265676
|
|
|
|
|
|
|
|
|
|
|
| |
Reduce number of opens by REOM RAID during provider taste.
Instead opening/closing provider by each of metadata classes, do it only
once in core code. Since for SCSI disks open/close means sending some
SCSI commands to the device, this change reduces taste time.
Notes:
svn path=/stable/9/; revision=265675
|
|
|
|
|
|
|
| |
Fix passing uninitialized bio_resid argument to g_trace().
Notes:
svn path=/stable/9/; revision=265674
|
|
|
|
|
|
|
| |
Add unmapped I/O support to GEOM RAID.
Notes:
svn path=/stable/9/; revision=265673
|
|
|
|
|
|
|
|
| |
Move g_io_deliver() out of the lock, as required for direct dispatch.
Move g_destroy_bio() out too to reduce lock scope even more.
Notes:
svn path=/stable/9/; revision=265672
|
|
|
|
|
|
|
|
|
| |
Introduce new function devstat_end_transaction_bio_bt(), adding new argument
to specify present time. Use this function to move binuptime() out of lock,
substantially reducing lock congestion when slow timecounter is used.
Notes:
svn path=/stable/9/; revision=265671
|
|
|
|
|
|
|
|
|
|
| |
Fix the formatting of the error message.
The G_MIRROR_DEBUG() macro already appends a newline. Also, most of the
log messages emitted by gmirror start with an uppercase letter.
Notes:
svn path=/stable/9/; revision=265670
|
|
|
|
|
|
|
|
|
|
|
| |
Fix wrong sizes used to access PD_Type and PD_State DDF metadata fields.
This caused incorrect behavior of arrays with big-endian DDF metadata.
Little-endian (like used by Adaptec controllers) should not be harmed.
Add workaround should be enough to manage compatibility.
Notes:
svn path=/stable/9/; revision=264869
|
|
|
|
|
|
|
| |
Show error code when failing to destroy a mirror on delay
Notes:
svn path=/stable/9/; revision=264715
|
|
|
|
|
|
|
| |
Fix spelling error in g_trace() call.
Notes:
svn path=/stable/9/; revision=264714
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In g_eli_crypto_hmac_init(), zero out after using the ipad buffer,
k_ipad.
Note that the two consumers in geli(4) are not affected by this
issue because the way the code is constructed and as such, we
believe there is no security impact with or without this change
with geli(4)'s usage.
Reported by: Serge van den Boom <serge vdboom.org>
Reviewed by: pjd
Notes:
svn path=/stable/9/; revision=262319
|
|
|
|
|
|
|
|
| |
Remove unneeded and dangerous assignment. It would probably cause NULL
refererence panic if compiler not optimize it out.
Notes:
svn path=/stable/9/; revision=261392
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
malloc() with M_WAITOK doesn't return NULL.
MFC r261085:
Fix typo in r261084.
Add to the gctl_error() an ability to specify error description even
if numeric error code is already specified. Also by default set
error code to EINVAL.
PR: 185852
MFC r261086:
In gctl_copyin() remove unused error variable.
geom_alloc_copyin() can't return ENOMEM, so describe its fail as bad
control request. Add check for NULL pointer in gctl_dump(), since it
can be NULL when geom_alloc_copyin() failed.
MFC r261089:
Remove another unneeded NULL check from geom_alloc_copyin().
Do copyout in case of gctl version mismatch and fix sbuf leak in
g_ctl_ioctl_ctl().
MFC r261091:
Always free sbuf in gctl_free().
Notes:
svn path=/stable/9/; revision=261286
|
|
|
|
|
|
|
|
|
| |
Add GPT UUID for VMware vSAN meta-data partition.
Approved by: ae
Notes:
svn path=/stable/9/; revision=260981
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Prevent users from deactivating the last component of a mirror.
MFC r259929:
Add an ability to stop gmirror and clear its metadata in one command.
This fixes the problem, when gmirror starts again just after stop.
The problem occurs when gmirror's component has geom label with equal size.
E.g. gpt and gptid have the same size as partition, diskid has the same
size as entire disk. When gmirror's geom has been destroyed, glabel
creates its providers and this initiate retaste.
Now "gmirror destroy" command is available. It destroys geom and also
erases gmirror's metadata.
PR: 184985
Notes:
svn path=/stable/9/; revision=260507
|
|
|
|
|
|
|
| |
Escape special XML chars, returned by some devices, confusing XML parsers.
Notes:
svn path=/stable/9/; revision=260480
|
|
|
|
|
|
|
|
|
| |
Add missing line breaks.
PR: 181900
Notes:
svn path=/stable/9/; revision=259384
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When zero'ing out a buffer, make sure we are using right size.
Without this change, in the worst but unlikely case scenario, certain
administrative operations, including change of configuration, set or
delete key from a GEOM ELI provider, may leave potentially sensitive
information in buffer allocated from kernel memory.
We believe that it is not possible to actively exploit these issues, nor
does it impact the security of normal usage of GEOM ELI providers when
these operations are not performed after system boot.
Security: possible sensitive information disclosure
Submitted by: Clement Lecigne <clecigne google com>
Notes:
svn path=/stable/9/; revision=257719
|
|
|
|
|
|
|
|
|
|
|
| |
Make ELI destruction (including orphanization) less aggressive, making it
always wait for provider close. Old algorithm was reported to cause NULL
dereference panic on attempt to close provider after softc destruction.
If not global workaroung in GEOM, that could even cause destruction with
requests still in flight.
Notes:
svn path=/stable/9/; revision=255568
|
|
|
|
|
|
|
| |
Add unmapped BIO support to GEOM ZERO if kern.geom.zero.clear is cleared.
Notes:
svn path=/stable/9/; revision=255567
|
|
|
|
|
|
|
|
| |
Return error when opening read-only volumes (like RAID4/5/...) for writing.
Previously opens succeeded, but actual write operations returned errors.
Notes:
svn path=/stable/9/; revision=255565
|
|
|
|
|
|
|
| |
Fix reasonable but safe Clang warnings.
Notes:
svn path=/stable/9/; revision=255564
|
|
|
|
|
|
|
|
|
| |
Introduce 3 seconds timeout on `graid stop` command (mostly with -f flag).
Since completion waiting goes in g_event thread, it may cause GEOM deadlock
if consumer on top (for example, ZFS) uses g_event thread for closing.
Notes:
svn path=/stable/9/; revision=255563
|
|
|
|
|
|
|
|
|
| |
Add new attribute lunname to report only textual LUN-specific device IDs.
While lunid attribute prefers to report numeric ones, having both may be
useful in some situations.
Notes:
svn path=/stable/9/; revision=255556
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove stub implementation.
MFC r251588 (by marcel):
Change the set and unset ctlreqs by making the index argument optional.
This allows setting attributes on tables. One simply does not provide
an index in that case. Otherwise the entry corresponding the index has
the attribute set or unset.
Use this change to fix a relatively longstanding bug in our GPT scheme
that's the result of rev 198097 (relatively harmless) followed by rev
237057 (damaging). The damaging part being that our GPT scheme always
has the active flag set on the PMBR slice. This is in violation with
EFI. Existing EFI implementions for both x86 and ia64 reject the GPT.
As such, GPT disks created by us aren't usable under EFI because of
that.
After this change, GPT disks never have the active flag set on the PMBR
slice. In order to make the GPT disk bootable under some x86 BIOSes,
the reason of rev 198097, one must now set the active attribute on the
gpt table. The kernel will apply this to the PMBR slice For (S)ATA:
gpart set -a active ada0
To fix an existing GPT disk that has the active flag set in the PMBR,
and that does not need the flag, use (again for (S)ATA):
gpart unset -a active ada0
The EBR, MBR & PC98 schemes, which also impement at least 1 attribute,
now check to make sure the entry passed is valid. They do not have
attributes that apply to the table.
Notes:
svn path=/stable/9/; revision=255017
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are some slight differences from the version in FreeBSD/head.
__FreeBSD_version has been bumped to 902503 for the availability
of the SI_UNMAPPED cdev flag, and the D_UNMAPPED_IO cdevsw flag
remains in place. D_UNMAPPED_IO no longer does anything. Drivers that
use that flag will just wind up having mapped I/O by default. The
impact will only be on performance, not functionality.
Change the way that unmapped I/O capability is advertised.
The previous method was to set the D_UNMAPPED_IO flag in the cdevsw
for the driver. The problem with this is that in many cases (e.g.
sa(4)) there may be some instances of the driver that can handle
unmapped I/O and some that can't. The isp(4) driver can handle
unmapped I/O, but the esp(4) driver currently cannot. The cdevsw
is shared among all driver instances.
So instead of setting a flag on the cdevsw, set a flag on the cdev.
This allows drivers to indicate support for unmapped I/O on a
per-instance basis.
sys/conf.h: Remove the D_UNMAPPED_IO cdevsw flag and replace it
with an SI_UNMAPPED cdev flag.
kern_physio.c: Look at the cdev SI_UNMAPPED flag to determine
whether or not a particular driver can handle
unmapped I/O.
geom_dev.c: Set the SI_UNMAPPED flag for all GEOM cdevs.
Since GEOM will create a temporary mapping when
needed, setting SI_UNMAPPED unconditionally will
work.
Remove the D_UNMAPPED_IO flag.
nvme_ns.c: Set the SI_UNMAPPED flag on cdevs created here
if NVME_UNMAPPED_BIO_SUPPORT is enabled.
vfs_aio.c: In aio_qphysio(), check the SI_UNMAPPED flag on a
cdev instead of the D_UNMAPPED_IO flag on the cdevsw.
sys/param.h: Bump __FreeBSD_version to 1000045 for the switch from
setting the D_UNMAPPED_IO flag in the cdevsw to setting
SI_UNMAPPED in the cdev.
Reviewed by: kib, jimharris
Sponsored by: Spectra Logic
Notes:
svn path=/stable/9/; revision=254979
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Before this change when GELI detected hardware crypto acceleration it will
start only one worker thread. For software crypto it will start by default
N worker threads where N is the number of available CPUs.
This is not optimal if hardware crypto is AES-NI, which uses CPU for AES
calculations.
Change that to always start one worker thread for every available CPU.
Number of worker threads per GELI provider can be easly reduced with
kern.geom.eli.threads sysctl/tunable and even for software crypto it
should be reduced when using more providers.
While here, when number of threads exceeds number of CPUs avilable don't
reduce this number, assume the user knows what he is doing.
Submitted by: Michael Moll <kvedulv@kvedulv.de>
Notes:
svn path=/stable/9/; revision=254859
|
|
|
|
|
|
|
|
|
|
| |
gpt_entries is used as limit for the number of partition entries in
the GEOM_PART. Instead of just using number of entries from the GPT
header, calculate this limit based on the reserved space between
GPT header and first available LBA.
Notes:
svn path=/stable/9/; revision=254641
|
|
|
|
|
|
|
|
|
|
| |
When panicing due to the gjournal overflow, print the geom metadata
journal id.
Approved by: re (rodrigc)
Notes:
svn path=/stable/9/; revision=253415
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Teach GEOM and CAM about the difference between the max "size" of r/w and delete
requests.
MFC r252657:
Bump disk(9) ABI version to signify the addition of d_delmaxsize.
Make the addition of the d_delmaxsize binary compatible. This allows storage
drivers compiled for 9.0 and 9.1 to work by preserving the ABI for disks.
Reviewed by: mav
Notes:
svn path=/stable/9/; revision=252730
|
|
|
|
|
|
|
|
|
| |
Mark geom_mirror as capable of unmapped i/o
Obtained from: Netflix
Notes:
svn path=/stable/9/; revision=252063
|
|
|
|
|
|
|
|
|
|
| |
Do not pass unmapped buffers to drivers that cannot handle them
Submitted by: kan, mav
Obtained from: Netflix
Notes:
svn path=/stable/9/; revision=251942
|
|
|
|
|
|
|
|
|
| |
Don't update provider properties and don't set DISKFLAG_OPEN if d_open()
disk method call returned error. GEOM considers devices in such case as
still closed, and won't call symmetric d_close() for them.
Notes:
svn path=/stable/9/; revision=251931
|
|
|
|
|
|
|
|
| |
Return "descr" field alike to "Intel RAID1 volume" for GEOM RAID to make
it look better in bsdinstall.
Notes:
svn path=/stable/9/; revision=251929
|
|
|
|
|
|
|
|
| |
Make it possible to submit FLUSH bios through geom_dev strategy. This
is required for CTL to work with device-backed LUNs.
Notes:
svn path=/stable/9/; revision=251927
|
|
|
|
|
|
|
|
|
| |
geom_slice.c and its consumers like GEOM_LABEL are not touching the data
unless hotspots are used. Pass G_PF_ACCEPT_UNMAPPED flag through except
such rare cases (obsolete GEOM_SUNLABEL and GEOM_BSD).
Notes:
svn path=/stable/9/; revision=251925
|
|
|
|
|
|
|
| |
GEOM NOP does not touch the data, so pass G_PF_ACCEPT_UNMAPPED flag through.
Notes:
svn path=/stable/9/; revision=251924
|
|
|
|
|
|
|
|
| |
Remove extra bio_data and bio_length copying to child request after calling
g_clone_bio(), that already copied them.
Notes:
svn path=/stable/9/; revision=251922
|
|
|
|
|
|
|
|
| |
Make GEOM MULTIPATH to report unmapped bio support if underling path report
it. GEOM MULTIPATH itself never touches the data and so transparent.
Notes:
svn path=/stable/9/; revision=251921
|
|
|
|
|
|
|
| |
Correct the page count when excess length is trimmed from the bio.
Notes:
svn path=/stable/9/; revision=251920
|
|
|
|
|
|
|
|
| |
We don't need buffer to handle BIO_DELETE, so don't check buffer size for it.
This fixes handling BIO_DELETE larger than MAXPHYS.
Notes:
svn path=/stable/9/; revision=251918
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add legacy support to geom raid to create a /dev/arX device for support
of upgrading older machines using ataraid(4) to newer releases.
This optional parameter is controlled via kern.geom.raid.legacy_aliases
and will create a /dev/ar0 device that will point at /dev/raid/r0 for
example.
Tested on Dell SC 1425 DDF-1 format software raid controllers installing from
stable/7 and upgrading to stable/9 without having to adjust /etc/fstab
Notes:
svn path=/stable/9/; revision=251916
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
infrastructure in the block layer and UFS filesystem as well as a few
drivers. The list of MFC revisions is long, so I won't quote changelogs.
r248508,248510,248511,248512,248514,248515,248516,248517,248518,
248519,248520,248521,248550,248568,248789,248790,249032,250936
Submitted by: kib
Approved by: kib
Obtained from: Netflix
Notes:
svn path=/stable/9/; revision=251897
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make CAM return and GEOM DISK pass through new GEOM::lunid attribute.
SPC-4 specification states that serial number may be property of device,
but not a specific logical unit. People reported about FC storages using
serial number in that way, making it unusable for purposes of LUN multipath
detection. SPC-4 states that designators associated with logical unit from
the VPD page 83h "Device Identification" should be used for that purpose.
Report first of them in the new attribute in such preference order: NAA,
EUI-64, T10 and SCSI name string.
While there, make GEOM DISK properly report GEOM::ident in XML output also
using d_getattr() method, if available. This fixes serial numbers reporting
for SCSI disks in `geom disk list` output and confxml.
Notes:
svn path=/stable/9/; revision=251849
|