History log of /libuv/src/unix/fs.c (Results 1 – 25 of 250)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 32603fd5 19-Sep-2024 Ben Noordhuis

unix: work around arm-linux-gnueabihf-gcc bug (#4537)

Both gcc 11 and 12 emit wrong code for a function call pointer in one
very specific context.

Fixes: https://github.com/libu

unix: work around arm-linux-gnueabihf-gcc bug (#4537)

Both gcc 11 and 12 emit wrong code for a function call pointer in one
very specific context.

Fixes: https://github.com/libuv/libuv/issues/4532

show more ...


# a53e7877 10-Aug-2024 Santiago Gimeno

unix,fs: silence -Wunused-result warning (#4496)


# ecc11611 20-May-2024 郑苏波 (Super Zheng)

darwin: fix crash on iOS(arm64)

Disable sendfile() on iOS with arm64 architecture
to avoid crashes caused by throwing SIGSYS signal.

Fixes: #3187


# 7c491bde 11-Jul-2024 Viacheslav Muravyev

unix,win: remove unused req parameter from macros (#4435)

Remove the unused `req` parameter from the uv__req_register and
uv__req_unregister macros.


# eb5af8e3 30-May-2024 Jeffrey H. Johnson

aix,ibmi: fix compilation errors in fs_copyfile (#4404)

On IBM AIX (and PASE for IBM i), use st_timespec_t
when _XOPEN_SOURCE>=700 and _ALL_SOURCE is defined.

Signed-off-by: Jef

aix,ibmi: fix compilation errors in fs_copyfile (#4404)

On IBM AIX (and PASE for IBM i), use st_timespec_t
when _XOPEN_SOURCE>=700 and _ALL_SOURCE is defined.

Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>

show more ...


# bf613907 08-May-2024 Juan José Arboleda

linux,darwin: make `uv_fs_copyfile` behaves like `cp -r` (#4396)

This commit changes the timestamps in the file, the ownership and the
group.

Fixes: https://github.com/libuv/lib

linux,darwin: make `uv_fs_copyfile` behaves like `cp -r` (#4396)

This commit changes the timestamps in the file, the ownership and the
group.

Fixes: https://github.com/libuv/libuv/issues/3125

Signed-off-by: Juan José Arboleda <soyjuanarbol@gmail.com>

show more ...


# cc23e204 20-Mar-2024 Ben Noordhuis

unix: reinstate preadv/pwritev fallback code (#4345)

I removed the fallback code back in October but it prevents Node.js
from upgrading libuv in their v20.x release line because they sup

unix: reinstate preadv/pwritev fallback code (#4345)

I removed the fallback code back in October but it prevents Node.js
from upgrading libuv in their v20.x release line because they support
systems older than we do. Bring back a dlsym-based fallback path.

Fixes: https://github.com/libuv/libuv/issues/4332

show more ...


# 6912038d 08-Mar-2024 Saúl Ibarra Corretgé

unix,fs: fix realpath calls that use the system allocator

Make sure we allocate the memory with uv__malloc so it's in turn freed
with uv__free.

Fixes: https://github.com/libuv/l

unix,fs: fix realpath calls that use the system allocator

Make sure we allocate the memory with uv__malloc so it's in turn freed
with uv__free.

Fixes: https://github.com/libuv/libuv/issues/4329

show more ...


# 160cd562 08-Jan-2024 Santiago Gimeno

linux: retry fs op if unsupported by io_uring (#4268)

Fallback to the threadpool if it returns `EOPNOTSUPP`.

Fixes: https://github.com/nodejs/node/issues/50876


# fc70430b 24-Nov-2023 Bo Anderson

unix: correct pwritev conditional (#4233)


# 4785ad63 18-Nov-2023 Sergey Fedorov

unix: unbreak macOS < 10.14 (#4230)


# da527d8d 26-Oct-2023 Jeffrey H. Johnson

unix: no preadv/pwritev workaround if not needed (#4180)

The workaround for preadv/pwritev is needed only
for Solaris, not illumos, so avoid it on illumos.

Haiku R1/prebeta5 (an

unix: no preadv/pwritev workaround if not needed (#4180)

The workaround for preadv/pwritev is needed only
for Solaris, not illumos, so avoid it on illumos.

Haiku R1/prebeta5 (and later) provide preadv and
pwritev, so only use workaround on lower versions.

Signed-off-by: Jeffrey H. Johnson <trnsz@pobox.com>

show more ...


# 9956da15 21-Oct-2023 Ben Noordhuis

unix: merge read/write code into single functions

I split those out in a previous commit in anticipation of changes that
never came. Let's merge them back.


# 8ac649e2 21-Oct-2023 Ben Noordhuis

unix: rename variable for consistency

uv__fs_write_do() calls it `r` so call it that in `uv__fs_read_do()`
too.


# 8d69f256 21-Oct-2023 Ben Noordhuis

unix: add back preadv/pwritev fallback

Implement in terms of pread/pwrite and only try to read/write the first
buffer. Callers are supposed to handle partial reads and libuv takes
ca

unix: add back preadv/pwritev fallback

Implement in terms of pread/pwrite and only try to read/write the first
buffer. Callers are supposed to handle partial reads and libuv takes
care of partial writes.

(Our own fs_read_bufs test doesn't but that's fine because this commit
is a fix-up for unsupported platforms that aren't in our CI matrix.)

Fixes: https://github.com/libuv/libuv/issues/4176

show more ...


# 13148457 12-Oct-2023 Ben Noordhuis

unix: don't malloc on sync uv_fs_read (#4162)

We can use the |bufs| argument directly instead of always copying it
and sometimes heap-allocating it.

The same trick doesn't work

unix: don't malloc on sync uv_fs_read (#4162)

We can use the |bufs| argument directly instead of always copying it
and sometimes heap-allocating it.

The same trick doesn't work for uv_fs_write() because the iterator
mutates the buffers in the list and that's visible to the caller.

Fixes: https://github.com/libuv/libuv/issues/4038

show more ...


# 737f4f95 03-Oct-2023 Ben Noordhuis

darwin: remove workaround for data corruption bug

XNU kernels anno ~2010 had a data corrruption bug where concurrent
write and pwrite calls sometimes resulted in blocks of zeroes being

darwin: remove workaround for data corruption bug

XNU kernels anno ~2010 had a data corrruption bug where concurrent
write and pwrite calls sometimes resulted in blocks of zeroes being
written instead of the actual data.

Libuv works around that by serializing all writes with a process-wide
mutex, meaning oncurrent writes (for all files, not just single files)
have a concurrency of 1. Obviously that's not great for performance.

Modern day macOS no longer has this bug, so remove the workaround.

show more ...


# fef61960 01-Oct-2023 Ben Noordhuis

unix: remove pwrite/pwritev conditionals


# 663d88b6 01-Oct-2023 Ben Noordhuis

unix: remove pread/preadv conditionals


# 7b43d70b 26-Jun-2023 小明 <7737673+caobug@users.noreply.github.com>

unix: fix build for lower versions of Android (#4046)

Available since Android N (API level 24): getgrgid_r, preadv, pwritev

Refs: https://cs.android.com/android/platform/superprojec

unix: fix build for lower versions of Android (#4046)

Available since Android N (API level 24): getgrgid_r, preadv, pwritev

Refs: https://cs.android.com/android/platform/superproject/+/master:bionic/docs/status.md

show more ...


# c8fad2ac 23-Jun-2023 Santiago Gimeno

unix,fs: make no_pwritev access thread-safe (#4066)


# 1752791c 20-Jun-2023 Ben Noordhuis

linux: work around io_uring IORING_OP_CLOSE bug (#4059)

Work around a poorly understood bug in older kernels where closing a
file descriptor pointing to /foo/bar results in ETXTBSY error

linux: work around io_uring IORING_OP_CLOSE bug (#4059)

Work around a poorly understood bug in older kernels where closing a
file descriptor pointing to /foo/bar results in ETXTBSY errors when
trying to execve("/foo/bar") later on.

The bug seems to have been fixed somewhere between 5.15.85 and 5.15.90.
I couldn't pinpoint the responsible commit but good candidates are the
several data race fixes.

Interestingly, it seems to manifest only when running under Docker so
the possibility of a Docker bug can't be completely ruled out either.

This commit moves uv__kernel_version() from fs.c to linux.c because the
latter now uses it more than the former.

Fixes: https://github.com/nodejs/node/issues/48444

show more ...


# 962b8e62 23-May-2023 Santiago Gimeno

linux: add some more iouring backed fs ops (#4012)

Specifically: `link`, `mkdir`, `rename`, `symlink` and `unlink`.


# 3990fcad 12-May-2023 cui fliter

docs: fix some typos (#3984)


# 15e81386 10-May-2023 Santiago Gimeno

macos: revert clonefile (#3987)

* Revert "macos: fix source not being followed when cloning (#3941)"

This reverts commit 507f2f950d5da7ab1586a46e81fc83dae10c0138.

* Revert

macos: revert clonefile (#3987)

* Revert "macos: fix source not being followed when cloning (#3941)"

This reverts commit 507f2f950d5da7ab1586a46e81fc83dae10c0138.

* Revert "darwin: bring back macos-specific copyfile(3) (#3654)"

This reverts commit d4eb276eea7cb19a888fe97d7759d97c7092ad02.

show more ...


12345678910