UPDATE: - moved define from include/xfs.h to libxfs/xfs_fs.h As we depends on XATTR_ value that is available only on some platforms, prefix it with XFS_ and allow for an alternative value in future. Signed-off-by: Jan Tulak <jtulak@xxxxxxxxxx> --- libhandle/handle.c | 4 ++-- libhandle/jdm.c | 4 ++-- libxfs/xfs_fs.h | 9 +++++++++ 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/libhandle/handle.c b/libhandle/handle.c index b1c0c10..7207186 100644 --- a/libhandle/handle.c +++ b/libhandle/handle.c @@ -397,8 +397,8 @@ attr_list_by_handle( alhreq.buffer = buf; alhreq.buflen = bufsize; /* prevent needless EINVAL from the kernel */ - if (alhreq.buflen > XATTR_LIST_MAX) - alhreq.buflen = XATTR_LIST_MAX; + if (alhreq.buflen > XFS_XATTR_LIST_MAX) + alhreq.buflen = XFS_XATTR_LIST_MAX; error = xfsctl(path, fd, XFS_IOC_ATTRLIST_BY_HANDLE, &alhreq); diff --git a/libhandle/jdm.c b/libhandle/jdm.c index d804423..e52f5d8 100644 --- a/libhandle/jdm.c +++ b/libhandle/jdm.c @@ -168,8 +168,8 @@ jdm_attr_list( jdm_fshandle_t *fshp, int rval; /* prevent needless EINVAL from the kernel */ - if (bufsz > XATTR_LIST_MAX) - bufsz = XATTR_LIST_MAX; + if (bufsz > XFS_XATTR_LIST_MAX) + bufsz = XFS_XATTR_LIST_MAX; jdm_fill_filehandle( &filehandle, fshandlep, statp ); rval = attr_list_by_handle (( void * )&filehandle, diff --git a/libxfs/xfs_fs.h b/libxfs/xfs_fs.h index 89689c6..3a86d7d 100644 --- a/libxfs/xfs_fs.h +++ b/libxfs/xfs_fs.h @@ -490,6 +490,15 @@ typedef struct xfs_swapext #define XFS_FSOP_GOING_FLAGS_NOLOGFLUSH 0x2 /* don't flush log nor data */ /* + * ioctl limits + */ +#ifdef XATTR_LIST_MAX +# define XFS_XATTR_LIST_MAX XATTR_LIST_MAX +#else +# define XFS_XATTR_LIST_MAX 65536 +#endif + +/* * ioctl commands that are used by Linux filesystems */ #define XFS_IOC_GETXFLAGS FS_IOC_GETFLAGS -- 2.4.3 _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs