diff options
author | Ronan Pigott <ronan@rjp.ie> | 2025-02-06 15:47:57 -0700 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2025-03-05 15:28:31 -0300 |
commit | 50351e05707f982c06c6d4d7c8fc819f6a5f66f5 (patch) | |
tree | 4d5b460b781ae7fea6f25339c853667af64a5ebd /sysdeps/unix/sysv/linux | |
parent | 6cb703b81d18d64447a2cd1069fda30994542c60 (diff) | |
download | glibc-50351e05707f982c06c6d4d7c8fc819f6a5f66f5.zip glibc-50351e05707f982c06c6d4d7c8fc819f6a5f66f5.tar.gz glibc-50351e05707f982c06c6d4d7c8fc819f6a5f66f5.tar.bz2 |
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>
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/linux_fsinfo.h | 1 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/pathconf.c | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/sysdeps/unix/sysv/linux/linux_fsinfo.h b/sysdeps/unix/sysv/linux/linux_fsinfo.h index 6625e54..9758942 100644 --- a/sysdeps/unix/sysv/linux/linux_fsinfo.h +++ b/sysdeps/unix/sysv/linux/linux_fsinfo.h @@ -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 diff --git a/sysdeps/unix/sysv/linux/pathconf.c b/sysdeps/unix/sysv/linux/pathconf.c index 5ee1768..87a0a3a 100644 --- a/sysdeps/unix/sysv/linux/pathconf.c +++ b/sysdeps/unix/sysv/linux/pathconf.c @@ -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; } |