From nobody Wed Mar 08 23:04:05 2023 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PX7D60NGCz3x0rW for ; Wed, 8 Mar 2023 23:04:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PX7D53rlKz4PgC for ; Wed, 8 Mar 2023 23:04:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1678316645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WsNTax+DaoXNMl5NIO6nJ53cJ022JukCvcZBJHmPi+s=; b=ntnnQEWIP03Hy82Zlh/47/+u7+I0o3IO7ODLJenTpBMjVyNzEeDR8puSwmht4a7Rl6D2dN l1zZfajmjYKeMRZfkCZRfWriym51SWXF3oQDmKj1TxTCWSAjTnoiG1M4SqVAUAf7tv3Hmq Ol2cWGlX1O2sWVmr0Aj4+vufYt1HfdZOpAKpWHttwQtOGFQCBxN13ITK+r95BDegeQQkr/ q/HKkP+7Brs9hsWmIk3Wm61k6zrfYeUlCypigid0rBTMKx7kI+luhIK1CLq8EY4W3GTEix d/1bSKnU8qDCkCZy8vRkxXFhWB1fhrxfTmUW/7J/BWpztXA5MAvq4YLuuDOBtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1678316645; a=rsa-sha256; cv=none; b=Ckrhez6t1pzXEr5erpQ81p8ei+IFk5NdQNWo840eoEO8y5yTjroevGYTXPuObMhM3Bdk+N hJWOZ3qKp6cxN2O4SYQ3UOsZrSe4k5UwsK68gFAKX5oOZB0Mcq8Ss9G+RPAfnOjtiNuXqL M/nQmxAfzSZQWiqS+VttuXJt5qVWUmLp0Y2NRon34Epn8j+DGP62vE/AtnEvAY1/MijPWJ pdnqRqioesaY3uP5/mezephu9dEOHM9E4aO74n0xyuqBoO8k+BEn6MYIGoxLNt8ns0bra0 7gd9VkpRwQR927KHl9a37rDwG/OAHnlxMOFcpTqhvZgkXDf1wOJrzMBs0ilziw== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PX7D52vFRzkdN for ; Wed, 8 Mar 2023 23:04:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 328N45dX070636 for ; Wed, 8 Mar 2023 23:04:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 328N45ZL070635 for bugs@FreeBSD.org; Wed, 8 Mar 2023 23:04:05 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 270053] msdosfs: statfs tracks total file nodes, but not free file nodes Date: Wed, 08 Mar 2023 23:04:05 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: woodsb02@freebsd.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D270053 Bug ID: 270053 Summary: msdosfs: statfs tracks total file nodes, but not free file nodes Product: Base System Version: CURRENT Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: woodsb02@freebsd.org The msdosfs_vfsops.c code is using the statfs(2) f_files limit variable to represent the FAT root directory entities limit, but is not using the corresponding f_ffree available variable to represent the current number of root directory entities. This leads to the df(1) output incorrectly implying that the number of root directory entities is at capacity. To avoid this confusion, I think the msdosfs_vfsops.c should either set both the f_files and f_ffree statfs variables so that df(1) correctly reports %iused, or should set them both to zero so that df(1) shows %iused as "-". Example output from FreeBSD 13.1-RELEASE on a FAT16 file system: $ df -i /boot/efi Filesystem 512-blocks Used Avail Capacity iused ifree %iused Mounted on /dev/nvd0p1 532352 3680 528672 1% 512 0 100% /boot/efi --=20 You are receiving this mail because: You are the assignee for the bug.=