sysdeps: linux: Add BTRFS_SUPER_MAGIC to pathconf

btrfs has a 65535 maximum link count. Include this value in pathconf to
give the real max link count for this filesystem.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
This commit is contained in:
Ronan Pigott 2025-02-06 15:47:57 -07:00 committed by Adhemerval Zanella
parent 6cb703b81d
commit 50351e0570
2 changed files with 4 additions and 0 deletions

View File

@ -251,6 +251,7 @@
#define XFS_SUPER_MAGIC 0x58465342
/* Maximum link counts. */
#define BTRFS_LINK_MAX 65535
#define COH_LINK_MAX 10000
#define EXT2_LINK_MAX 32000
#define EXT4_LINK_MAX 65000

View File

@ -186,6 +186,9 @@ __statfs_link_max (int result, const struct statfs *fsbuf, const char *file,
case LUSTRE_SUPER_MAGIC:
return LUSTRE_LINK_MAX;
case BTRFS_SUPER_MAGIC:
return BTRFS_LINK_MAX;
default:
return LINUX_LINK_MAX;
}