This is a "best of both worlds" approach: if nvme_disk
determines the I/O can be done with no bouncing at all,
it will do so; otherwise, the I/O is done by the _bounce
method that uses DMAResource.
Thanks to mmlr for helping investigate some of the DMAResource
crashes and other oddities.
Fixes#15818 and #15123.
This fixes the virtual/physical mixup problems that plagued
the driver until now.
This is rather inefficent, though, as it does its own page-based
bouncing instead of using DMAResource. That will come in the
next commit.
This is needed by CreateSubRequest, which creates a sub-request
using some subset of the passed IO vectors. In the case that the
last vector will not be fully used, we need to clamp its size
in the sub-request to the remaining length.
do_iterative_fd_io, used by vfs_read_pages (which is in turn
used by the file cache) used this to split up requests
into their constituent block-run requests. So, previously,
the invalid IO requests created by this could, under one possible
interpretation, overwrite valid file data and cause disk corruption.
It is slightly unfortunate that generic_size_t has no unsigned
equivalent, so we are left with 0 as the magic number here,
instead of -1. However, the passed "length" remains unchanged,
so any callers that pass the wrong value for lastVecSize
will be trapped by the assert added in the previous commit
Fixes#15912 (the assert added in the previous commit),
and potentially disk corruption caused by this.
Per POSIX.1-2008, getpeername() shall fails if the socket is not
connected.
With this change, it's no longer possible to retrieve the peer from
connectionless protocols such as UDP, even if a peer is assigned to them
via connect(). The same behavior can be replicated among
POSIX-compatible operating systems such as Linux.
Fixes#15081
Change-Id: Ia5631971200959a3d3815332ff1969c4b4dd289b
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2421
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
By default, Haiku does not provide localised names for applications and
preference names. This commit changes the default setting to 'true',
for displaying the localised variants.
This is generally bad UX, especially for the preference preflets,
since the user will have no idea where to go if he/she does not
speak English (even will not be able to find this setting presumably).
Change-Id: I17dea9428541be50e27227ba15f9afcde21a99d6
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2002
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>
Reviewed-by: humdinger <humdingerb@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
When bounce buffers were changed from fixed to dynamic in hrev27185, the
early unlock in case of physical vectors was not removed. This would
lead to an unprotected fBounceBuffers list and the possibility for
multiple operations to share the same bounce buffer vecs, leading to
disk corruption. This would not happen when used purely under the
IOScheduler as all translations are done from a single thread there.
With the nvme_disk driver that runs requests in parallel, this was
however easy to trigger.
Change-Id: I46bd55cd5d86174523d3f745b6c8800dae02babc
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2524
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Currently need to make the B+Tree for AG Free Space Management.
The functions or the code for this task isn't complete. Sharing for
reference.
Change-Id: I1e29832b9645bd527962128a8c85b7ca24c7fd50
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2378
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
* std::istreambuf_iterator<T> template isn't available until C++11.
* std::vector<T>::cbegin() is not available
* Add missing include of errno.h
Change-Id: Ice344f6b0f93bf72d9120674607878c4c3e8ef54
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2515
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Makes it easier to find the latest version of a app.
Fixes#15668.
Change-Id: I26e939cd7ac4c590d856a2b093cc52098fa14301
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2488
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Switch to B_TRANSLATE_SYSTEM_NAME to use translations in Deskbar.
Reported by victordomingos, thanks!
Change-Id: Ie841b5b19009858ac20f789fc99551df177fbff4
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2508
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
for Development: automake and autoconf require perl
for DevelopmentMin: makefile_engine requires make and mkdepend
Change-Id: Ica2bace17a233e2e589e139208e468870b1cc84e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2507
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
if no microcode is found, we can also omit the optional fields.
should help with #15891
Change-Id: I2fcb63ccb0cdf77caf7d5e1770c254561b231a18
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2506
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Passing "1" as the bytes argument instead of "0" means that
get_memory_map would never return an error in the case that
one physical_entry was not enough for the vaddr's map.
This reveals the true cause of the disk corruptions:
libnvme is assuming some of the passed buffers are
physically contiguous, and they are not.
This way, if something stalls in an unexpected way, the whole system
won't just hang.
Should "fix" #15874, but there is probably some other underlying
problem.
add a WMI Asus driver, to control keyboard backlight brightness.
Change-Id: Ib86f70b4a407178b0a1f532269387a55915cc460
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2485
Reviewed-by: Fredrik Holmqvist <fredrik.holmqvist@gmail.com>
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>
This allows to use FileDescriptorCloser as unique pointer for file descriptor.
Change-Id: I4c768fafba6ed35658b2fdb075b9b547f53bc8da
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2495
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
Reported by translator loic (thanks!). The double space is only removed in
user-facing strings, I did not touch the comments.
For those interested in an internet controversy, search the internet for
the origins of the double space after a period. In any case, for consistency with
other user facing strings, go to a single space after a period.