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@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
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);
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,
#define XFS_FSOP_GOING_FLAGS_LOGFLUSH 0x1 /* flush log but not data */
#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
*/