mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
xfs: rename MAXPATHLEN to XFS_SYMLINK_MAXLEN
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>
This commit is contained in:
parent
2192b0baea
commit
6eb0b8df9f
6 changed files with 8 additions and 8 deletions
|
@ -477,14 +477,14 @@ xfs_calc_mkdir_reservation(
|
|||
/*
|
||||
* Making a new symplink is the same as creating a new file, but
|
||||
* with the added blocks for remote symlink data which can be up to 1kB in
|
||||
* length (MAXPATHLEN).
|
||||
* length (XFS_SYMLINK_MAXLEN).
|
||||
*/
|
||||
STATIC uint
|
||||
xfs_calc_symlink_reservation(
|
||||
struct xfs_mount *mp)
|
||||
{
|
||||
return xfs_calc_create_reservation(mp) +
|
||||
xfs_calc_buf_res(1, MAXPATHLEN);
|
||||
xfs_calc_buf_res(1, XFS_SYMLINK_MAXLEN);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue