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 <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
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 <[email protected]>
Reviewed-by: humdinger <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
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 <[email protected]>
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 <[email protected]>
* 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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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.
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.