From b307cfe419ff886ad1bbe15419c5f5604657df7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Fri, 1 Mar 2024 18:31:15 +0100 Subject: [PATCH] mqueuefs: fix statfs report to not signal file system full Synthetic file systems that do not actually allocate file system blocks or inodes should report that they have space available and that they provide 0 inodes, in order to prevent capacity monitoring tools from warning about resource exhaustion. This has been fixed in all other synthetic file systems in base in commit 88a795e80c0, but this file was overlooked since its name does not indicate that it also provides a file system. MFC after: 1 month --- sys/kern/uipc_mqueue.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_mqueue.c b/sys/kern/uipc_mqueue.c index f7695945fcc..6400f0bce9f 100644 --- a/sys/kern/uipc_mqueue.c +++ b/sys/kern/uipc_mqueue.c @@ -604,9 +604,9 @@ mqfs_mount(struct mount *mp) sbp->f_bsize = PAGE_SIZE; sbp->f_iosize = PAGE_SIZE; sbp->f_blocks = 1; - sbp->f_bfree = 0; + sbp->f_bfree = 1; sbp->f_bavail = 0; - sbp->f_files = 1; + sbp->f_files = 0; sbp->f_ffree = 0; return (0); }