On Thu, Feb 10, 2022 at 09:13:25AM +0100, Theo Buehler wrote:
> This is purely cosmetic. I did some testing on fedora which ships with
> btrfs by default. btrfs is special in that df -i and other tools always
> report 0 inodes. As a consequence, each rpki-client run prints the disk
> space warning, which seems a bit silly. Should we special case the 0
> inodes case? If your disk is actually that full, you'll find out quickly
> enough.
>
> On this box I see this:
>
> WARNING: rpki-client may need more than the available disk space
> on the file-system holding /usr/local/var/cache/rpki-client.
> available space: 118878020kB, suggested minimum 512000kB
> available inodes 0, suggested minimum 300000
>
> Index: main.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/rpki-client/main.c,v
> retrieving revision 1.187
> diff -u -p -r1.187 main.c
> --- main.c 28 Jan 2022 15:30:23 -0000 1.187
> +++ main.c 10 Feb 2022 08:06:29 -0000
> @@ -695,7 +695,8 @@ check_fs_size(int fd, const char *cached
> if (fstatvfs(fd, &fs) == -1)
> err(1, "statfs %s", cachedir);
>
> - if (fs.f_bavail < minsize / fs.f_frsize || fs.f_favail < minnode) {
> + if (fs.f_bavail < minsize / fs.f_frsize ||
> + (fs.f_favail > 0 && fs.f_favail < minnode)) {
> fprintf(stderr, "WARNING: rpki-client may need more than "
> "the available disk space\n"
> "on the file-system holding %s.\n", cachedir);
>
Fine with me. Rather dumb default from Linux here.
--
:wq Claudio