]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: prefix XATTR_LIST_MAX with XFS_
authorJan Tulak <jtulak@redhat.com>
Tue, 13 Oct 2015 23:57:57 +0000 (10:57 +1100)
committerDave Chinner <david@fromorbit.com>
Tue, 13 Oct 2015 23:57:57 +0000 (10:57 +1100)
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>
libhandle/handle.c
libhandle/jdm.c
libxfs/xfs_fs.h

index b1c0c104918b28fbc2cf8e7ec131cb8aede0f2f4..7207186b19f32112fea4e17c731e3e81342b0d64 100644 (file)
@@ -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);
 
index d8044237bf69e2c8db33797486eb5282660196ba..e52f5d83805c5d1454f4480ebfc924a0357ed868 100644 (file)
@@ -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,
index 0c922ade278a65ccb5d392cd54d3a145c9dc269b..c14903ed98b6b33613f553f1ad188d2d1a80beaf 100644 (file)
@@ -489,6 +489,15 @@ typedef struct xfs_swapext
 #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
  */