git: b307cfe419ff - main - mqueuefs: fix statfs report to not signal file system full

From: Stefan Eßer <se_at_FreeBSD.org>
Date: Fri, 01 Mar 2024 17:38:50 UTC
The branch main has been updated by se:

URL: https://cgit.FreeBSD.org/src/commit/?id=b307cfe419ff886ad1bbe15419c5f5604657df7b

commit b307cfe419ff886ad1bbe15419c5f5604657df7b
Author:     Stefan Eßer <se@FreeBSD.org>
AuthorDate: 2024-03-01 17:31:15 +0000
Commit:     Stefan Eßer <se@FreeBSD.org>
CommitDate: 2024-03-01 17:31:15 +0000

    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 f7695945fcc4..6400f0bce9f9 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);
 }