#
0c38e3db |
| 07-Jul-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
aio: if there is at least one aio thread, hide an error from aio_init_aioinfo()
Noted and reviewed by: jhb Fixes: 4685fa8e4bef169e6a1ceaf07f149232326de805 Sponsored by: The FreeBSD Foundation MFC af
aio: if there is at least one aio thread, hide an error from aio_init_aioinfo()
Noted and reviewed by: jhb Fixes: 4685fa8e4bef169e6a1ceaf07f149232326de805 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D51191
show more ...
|
#
4685fa8e |
| 04-Jul-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
aio: handle errors from fork
Do not try to fork forever if fork() failed. Propagate the error up.
Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
#
c4443994 |
| 04-Jul-2025 |
Konstantin Belousov <kib@FreeBSD.org> |
aio: make aio_init_aioinfo() and aio_aqueue() static
Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week
|
Revision tags: release/14.3.0 |
|
#
ab01a5f5 |
| 02-May-2025 |
Mark Johnston <markj@FreeBSD.org> |
aio: Fix opcode handling in aio_process_rw()
LIO_FOFFSET needs to be masked off, as it is in aio_aqueue().
Reported by: syzbot+b6e15476c91852bb2264@syzkaller.appspotmail.com Reviewed by: kib, asome
aio: Fix opcode handling in aio_process_rw()
LIO_FOFFSET needs to be masked off, as it is in aio_aqueue().
Reported by: syzbot+b6e15476c91852bb2264@syzkaller.appspotmail.com Reviewed by: kib, asomers MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D50118
show more ...
|
Revision tags: release/13.4.0-p5, release/13.5.0-p1, release/14.2.0-p3, release/13.5.0, release/14.2.0-p2, release/14.1.0-p8, release/13.4.0-p4, release/14.1.0-p7, release/14.2.0-p1, release/13.4.0-p3, release/14.2.0 |
|
#
ef9ffb85 |
| 25-Nov-2024 |
Mark Johnston <markj@FreeBSD.org> |
kern: Make fileops and filterops tables const where possible
No functional change intended.
MFC after: 1 week
|
#
4605a99b |
| 15-Nov-2024 |
Andrew Gallatin <gallatin@FreeBSD.org> |
aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the co
aio: remove write-only jobid & kernelinfo
The jobid (which was stored in kernelinfo) was used to look up jobs until 1ce9182407f6, where it became essentially write only. Remove it to simplify the code and pave the way for future work to make aio scale better.
Note this has been slated for removal "soon" for 18 years.
Suggested by: jhb Reviewed by: kib Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D47583
show more ...
|
Revision tags: release/13.4.0, release/14.1.0, release/13.3.0 |
|
#
e4b7bbd6 |
| 13-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
and use the current file offset instead.
Requested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Discuss
lio_listio(2): add LIO_FOFFSET flag to ignore aiocb aio_offset
and use the current file offset instead.
Requested by: Vinícius dos Santos Oliveira <vini.ipsmaker@gmail.com> Reviewed by: jhb Discussed with: asomers Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43448
show more ...
|
#
61cc4830 |
| 18-Jan-2024 |
Alfredo Mazzinghi <am2419@cl.cam.ac.uk> |
Abstract UIO allocation and deallocation.
Introduce the allocuio() and freeuio() functions to allocate and deallocate struct uio. This hides the actual allocator interface, so it is easier to modify
Abstract UIO allocation and deallocation.
Introduce the allocuio() and freeuio() functions to allocate and deallocate struct uio. This hides the actual allocator interface, so it is easier to modify the sub-allocation layout of struct uio and the corresponding iovec array.
Obtained from: CheriBSD Reviewed by: kib, markj MFC after: 2 weeks Sponsored by: CHaOS, EPSRC grant EP/V000292/1 Differential Revision: https://reviews.freebsd.org/D43711
show more ...
|
#
b068bb09 |
| 08-Jan-2024 |
Konstantin Belousov <kib@FreeBSD.org> |
Add vnode_pager_clean_{a,}sync(9)
Bump __FreeBSD_version for ZFS use.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D4
Add vnode_pager_clean_{a,}sync(9)
Bump __FreeBSD_version for ZFS use.
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D43356
show more ...
|
#
fdafd315 |
| 24-Nov-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remov
sys: Automated cleanup of cdefs and other formatting
Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row.
Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
Sponsored by: Netflix
show more ...
|
Revision tags: release/14.0.0 |
|
#
685dc743 |
| 16-Aug-2023 |
Warner Losh <imp@FreeBSD.org> |
sys: Remove $FreeBSD$: one-line .c pattern
Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
|
#
4d846d26 |
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
Revision tags: release/13.2.0 |
|
#
98844e99 |
| 15-Feb-2023 |
John Baldwin <jhb@FreeBSD.org> |
aio: Fix more synchronization issues in aio_biowakeup.
- Use atomic_store to set job->error. atomic_set does an or operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensure
aio: Fix more synchronization issues in aio_biowakeup.
- Use atomic_store to set job->error. atomic_set does an or operation, not assignment.
- Use refcount_* to manage job->nbio.
This ensures proper memory barriers are present so that the last bio won't see a possibly stale value of job->error.
- Don't re-read job->error after reading it via atomic_load.
Reported by: markj (1) Reviewed by: mjg, markj Differential Revision: https://reviews.freebsd.org/D38611
show more ...
|
#
cca6d616 |
| 15-Feb-2023 |
John Baldwin <jhb@FreeBSD.org> |
aio_biowakeup: Various style fixes.
|
#
40734fc5 |
| 15-Feb-2023 |
Keith Reynolds <keith.reynolds@hpe.com> |
aio: Fix a test and set race in aio_biowakeup.
Use atomic_fetchadd in place of separate atomic_subtract / atomic_load.
Reviewed by: markj Sponsored by: HPE TidalScale Differential Revision: https:/
aio: Fix a test and set race in aio_biowakeup.
Use atomic_fetchadd in place of separate atomic_subtract / atomic_load.
Reviewed by: markj Sponsored by: HPE TidalScale Differential Revision: https://reviews.freebsd.org/D38559
show more ...
|
Revision tags: release/12.4.0 |
|
#
a75d1ddd |
| 17-Sep-2022 |
Mateusz Guzik <mjg@FreeBSD.org> |
vfs: introduce V_PCATCH to stop abusing PCATCH
|
#
9553bc89 |
| 20-Jun-2022 |
Mark Johnston <markj@FreeBSD.org> |
aio: Improve UMA usage
- Remove the AIO proc zone. This zone gets one allocation per AIO daemon process, which isn't enough to warrant a dedicated zone. Plus, unlike other AIO structures, aiop
aio: Improve UMA usage
- Remove the AIO proc zone. This zone gets one allocation per AIO daemon process, which isn't enough to warrant a dedicated zone. Plus, unlike other AIO structures, aiops are small (32 bytes with LP64), so UMA doesn't provide better space efficiency than malloc(9). Change one of the malloc types in vfs_aio.c to make it more general.
- Don't set the NOFREE flag on the other AIO zones. This flag means that memory allocated to the AIO subsystem is never freed back to the VM, so it's always preferable to avoid using it when possible. NOFREE was set without explanation when AIO was converted to use UMA 20 years ago, but it does not appear to be required; all of the structures allocated from UMA (per-process kaioinfo, kaiocb, and aioliojob) keep track of references and get freed only when none exist. Plus, these structures will contain dangling pointer after they're freed (e.g., the "cred", "fd_file" and "uiop" fields of struct kaiocb), so use-after-frees are dangerous even when the structures themselves are type-stable.
Reviewed by: asomers MFC after: 1 month Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D35493
show more ...
|
#
31d1b816 |
| 28-May-2022 |
Dmitry Chagin <dchagin@FreeBSD.org> |
sysent: Get rid of bogus sys/sysent.h include.
Where appropriate hide sysent.h under proper condition.
MFC after: 2 weeks
|
Revision tags: release/13.1.0, release/12.3.0 |
|
#
e9c7ec22 |
| 14-Nov-2021 |
Mateusz Guzik <mjg@FreeBSD.org> |
aio: whack "set but not used" warnings
|
#
45c2c7c4 |
| 24-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
aio_aqueue(): avoid ucred leak on failure path
PR: 258698 Submitted by: sigsys@gmail.com MFC after: 1 week
|
#
2933a7ca |
| 20-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
aio_fsync_vnode: handle ERELOOKUP after VOP_FSYNC()
Reported by: tmunro Reviewed by: jhb, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd
aio_fsync_vnode: handle ERELOOKUP after VOP_FSYNC()
Reported by: tmunro Reviewed by: jhb, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32023
show more ...
|
#
922bee44 |
| 20-Sep-2021 |
Konstantin Belousov <kib@FreeBSD.org> |
aio_fsync_vnode: use for(;;) loop instead of label
Reviewed by: jhb, tmunro Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D32023
|
#
2884918c |
| 11-Sep-2021 |
Mark Johnston <markj@FreeBSD.org> |
aio: Fix up the opcode in aiocb32_copyin()
With lio_listio(2), the opcode is specified by userspace rather than being hard-coded by the system call (e.g., aio_readv() -> LIO_READV). kern_lio_listio(
aio: Fix up the opcode in aiocb32_copyin()
With lio_listio(2), the opcode is specified by userspace rather than being hard-coded by the system call (e.g., aio_readv() -> LIO_READV). kern_lio_listio() calls aio_aqueue() with an opcode of LIO_NOP, which gets fixed up when the aiocb is copied in.
When copying in a job request for vectored I/O, we need to dynamically allocate a uio to wrap an iovec. So aiocb_copyin() needs to get the opcode from the aiocb and then decide whether an allocation is required. We failed to do this in the COMPAT_FREEBSD32 case. Fix it.
Reported by: syzbot+27eab6f2c2162f2885ee@syzkaller.appspotmail.com Reviewed by: kib, asomers Fixes: f30a1ae8d529 ("lio_listio(2): Allow LIO_READV and LIO_WRITEV.") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31914
show more ...
|
#
f30a1ae8 |
| 22-Aug-2021 |
Thomas Munro <tmunro@FreeBSD.org> |
lio_listio(2): Allow LIO_READV and LIO_WRITEV.
Allow multiple vector IOs to be started with one system call. aio_readv() and aio_writev() already used these opcodes under the covers. This commit m
lio_listio(2): Allow LIO_READV and LIO_WRITEV.
Allow multiple vector IOs to be started with one system call. aio_readv() and aio_writev() already used these opcodes under the covers. This commit makes them available to user space.
Being non-standard extensions, they're only visible if __BSD_VISIBLE is defined, like the functions.
Reviewed by: asomers, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D31627
show more ...
|
#
2e5f6152 |
| 16-Jul-2021 |
Mark Johnston <markj@FreeBSD.org> |
lio_listio: Don't post a completion notification if none was requested
One is allowed to use LIO_NOWAIT without specifying a sigevent. In this case, lj->lioj_signal is left uninitialized, but sever
lio_listio: Don't post a completion notification if none was requested
One is allowed to use LIO_NOWAIT without specifying a sigevent. In this case, lj->lioj_signal is left uninitialized, but several code paths examine liov_signal.sigev_notify to figure out which notification to post. Unconditionally initialize that field to SIGEV_NONE.
Add a dumb test case which triggers the bug.
Reported by: KMSAN+syzkaller Reviewed by: asomers MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D31197
show more ...
|