zfs/cmd/zed
наб 5957574694 zed: only go up to current limit in close_from() fallback
Consider the following strace log:
  prlimit64(0, RLIMIT_NOFILE,
            NULL, {rlim_cur=1024, rlim_max=1024*1024}) = 0
  dup2(0, 30)                         = 30
  dup2(0, 300)                        = 300
  dup2(0, 3000)                       = -1 EBADF (Bad file descriptor)
  dup2(0, 30000)                      = -1 EBADF (Bad file descriptor)
  dup2(0, 300000)                     = -1 EBADF (Bad file descriptor)
  prlimit64(0, RLIMIT_NOFILE,
            {rlim_cur=1024*1024, rlim_max=1024*1024}, NULL) = 0
  dup2(0, 30)                         = 30
  dup2(0, 300)                        = 300
  dup2(0, 3000)                       = 3000
  dup2(0, 30000)                      = 30000
  dup2(0, 300000)                     = 300000

Even a privileged process needs to bump its rlimit before being able
to use fds higher than rlim_cur.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #11834
2021-11-12 15:24:36 -08:00
..
agents FreeBSD: notify userspace when a vdev is removed 2020-12-23 13:08:12 -08:00
zed.d ZED/zfs-list-cacher.sh: don't exit on ignored event type 2020-12-19 18:01:21 -08:00
.gitignore Initial implementation of zed (ZFS Event Daemon) 2014-04-02 13:10:03 -07:00
Makefile.am cppcheck: integrete cppcheck 2021-06-23 13:22:15 -07:00
zed.c Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_conf.c Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_conf.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_disk_event.c Add libzutil for libzfs or libzpool consumers 2018-11-05 11:22:33 -08:00
zed_disk_event.h Bring over illumos ZFS FMA logic -- phase 1 2016-09-01 11:39:45 -07:00
zed_event.c Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_event.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_exec.c zed: reap child after killing on time-out 2021-06-23 13:22:15 -07:00
zed_exec.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_file.c zed: only go up to current limit in close_from() fallback 2021-11-12 15:24:36 -08:00
zed_file.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_log.c Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_log.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_strings.c Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00
zed_strings.h Replace ZFS on Linux references with OpenZFS 2020-10-16 13:01:24 -07:00