summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-01-13 11:35:05 -0800
committerBrian Behlendorf <[email protected]>2012-01-13 11:43:59 -0800
commita8783adf24a8c40dcae0fbfa90eb231212f26884 (patch)
tree431802394ba462ff4fd359cd3e19ef720625b235
parent58d956b085c31bde695d03dbf415e118cd350e0f (diff)
Increase link count limit to 2^31-1
Originally, the per-file link limit was set to 65536 because the exact Linux VFS limit was unclear. Internally ZFS is able to support 64-bit link counts. After a more careful investigation the limit can be safely raised to 2^31-1. Signed-off-by: Brian Behlendorf <[email protected]> Closes #514
-rw-r--r--include/sys/zfs_vfsops.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/sys/zfs_vfsops.h b/include/sys/zfs_vfsops.h
index b7badeed8..7b70f32ea 100644
--- a/include/sys/zfs_vfsops.h
+++ b/include/sys/zfs_vfsops.h
@@ -113,10 +113,10 @@ typedef struct zfs_sb {
/*
* Allow a maximum number of links. While ZFS does not internally limit
- * this most Linux filesystems do. It's probably a good idea to limit
- * this to a large value until it is validated that this is safe.
+ * this the inode->i_nlink member is defined as an unsigned int. To be
+ * safe we use 2^31-1 as the limit.
*/
-#define ZFS_LINK_MAX 65536
+#define ZFS_LINK_MAX ((1U << 31) - 1U)
/*
* Normal filesystems (those not under .zfs/snapshot) have a total