]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 31 Jul 2017 20:08:12 +0000 (15:08 -0500)
committerEric Sandeen <sandeen@redhat.com>
Mon, 31 Jul 2017 20:08:12 +0000 (15:08 -0500)
commitb8fb8c95f25ca9d660409f316d131a0796004a4a
treef815fc7818291ef4cbd24852b5e0093ce86f0cf0
parentcb0dc9bfdc83729dbfc323e9223212f6edf4dd60
xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN

Source kernel commit: 6eb0b8df9f74f33d1a69100117630a7a87a9cc96

XFS has a maximum symlink target length of 1024 bytes; this is a
holdover from the Irix days.  Unfortunately, the constant establishing
this is 'MAXPATHLEN' and is /not/ the same as the Linux MAXPATHLEN,
which is 4096.

The kernel enforces its 1024 byte MAXPATHLEN on symlink targets, but
xfsprogs picks up the (Linux) system 4096 byte MAXPATHLEN, which means
that xfs_repair doesn't complain about oversized symlinks.

Since this is an on-disk format constraint, put the define in the XFS
namespace and move everything over to use the new name.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/xfs_format.h
libxfs/xfs_symlink_remote.c
libxfs/xfs_trans_resv.c