]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
stat,tail: sync with latest Linux file systems
authorPádraig Brady <P@draigBrady.com>
Tue, 28 May 2024 12:29:15 +0000 (13:29 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 28 May 2024 12:38:34 +0000 (13:38 +0100)
* src/stat.c (human_fstype): Rename "FUSEBLK" to "FUSE" to sync with
kernel adjustments.  Add "bcachefs", and "pidfs".  Both are local,
with the latter being similar to "proc" which is also local.
* NEWS: Mention the change in behavior, and the improvement.

NEWS
src/stat.c

diff --git a/NEWS b/NEWS
index febb9ac684ec69fb2d865b07bc7507a3a57c442c..6251a2f68681ca468e7e78bcc9ca7cfd2d70664e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -26,11 +26,18 @@ GNU coreutils NEWS                                    -*- outline -*-
   equivalent because -f no longer ignores an earlier -l.  The new
   behavior is more orthogonal and is compatible with FreeBSD.
 
+  stat -f -c%T now reports the "fuseblk" file system type as "fuse",
+  given that there is no longer a distinct "ctl" fuse variant file system.
+
 ** Improvements
 
   sort operates more efficiently when used on pseudo files with
   an apparent size of 0, like those in /proc.
 
+  stat and tail now know about the "bcachefs", and "pidfs" file system types.
+  stat -f -c%T now reports the file system type,
+  and tail -f uses inotify for these file systems.
+
   wc now reads a minimum of 256KiB at a time.
   This was previously 16KiB and increasing to 256KiB was seen to increase
   wc -l performance by about 10% when reading cached files on modern systems.
index 91795471fd777138b0f0e789d47bdf6009cd905f..e73abf07a0db636cfc9bb3c24f825b5521bd03ae 100644 (file)
@@ -301,6 +301,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "autofs";
     case S_MAGIC_BALLOON_KVM: /* 0x13661366 local */
       return "balloon-kvm-fs";
+    case S_MAGIC_BCACHEFS: /* 0xCA451A4E local */
+      return "bcachefs";
     case S_MAGIC_BEFS: /* 0x42465331 local */
       return "befs";
     case S_MAGIC_BDEVFS: /* 0x62646576 local */
@@ -373,8 +375,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "fat";
     case S_MAGIC_FHGFS: /* 0x19830326 remote */
       return "fhgfs";
-    case S_MAGIC_FUSEBLK: /* 0x65735546 remote */
-      return "fuseblk";
+    case S_MAGIC_FUSE: /* 0x65735546 remote */
+      return "fuse";
     case S_MAGIC_FUSECTL: /* 0x65735543 remote */
       return "fusectl";
     case S_MAGIC_FUTEXFS: /* 0x0BAD1DEA local */
@@ -458,6 +460,8 @@ human_fstype (STRUCT_STATVFS const *statfsbuf)
       return "overlayfs";
     case S_MAGIC_PANFS: /* 0xAAD7AAEA remote */
       return "panfs";
+    case S_MAGIC_PID_FS: /* 0x50494446 local */
+      return "pidfs";
     case S_MAGIC_PIPEFS: /* 0x50495045 remote */
       /* FIXME: change syntax or add an optional attribute like "inotify:no".
          pipefs and prlfs are labeled as "remote" so that tail always polls,