Skip to content

Commit

Permalink
Increase link count limit to 2^31-1
Browse files Browse the repository at this point in the history
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 <behlendorf1@llnl.gov>
Closes #514
  • Loading branch information
behlendorf committed Jan 13, 2012
1 parent 58d956b commit a8783ad
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/sys/zfs_vfsops.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a8783ad

Please sign in to comment.