[Virtio-fs] [virtiofsd] MR opened: Increment the rlimit_nofile for all sandbox modes

virtiofs-bot at sinrega.org virtiofs-bot at sinrega.org
Fri Mar 18 21:13:38 UTC 2022


Currently, we only increment the rlimit_nofile with the user-supplied
value within sandbox modes 'chroot' and 'namespace'. However, in the
'namespace' mode, we don't honor '--rlimit-nofile=0' and we increase
the value to the maximum, as in the default case.

Let's apply the following logic:
- If the user pass '--rlimit-nofile=0' don't do anything.
- If the user pass '--rlimit-nofile=<val>':
    - try to setup the soft limit to 'val'
    - if not possible, log an error and exit.
- If the user don't pass '--rlimit-nofile':
    - if the soft limit is higher than 1M, do nothing. If not:
        - try to setup the soft limit to 1M
        - if not possible:
            - log a warning
            - try to setup the soft limit equal to the hard limit
            - if not possible, log an error and exit.

Closes #37
---
https://gitlab.com/virtio-fs/virtiofsd/-/merge_requests/104



More information about the Virtio-fs mailing list