]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: revert 1baa2800e62d ("xfs: remove the unused XFS_ALLOC_USERDATA flag")
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 13 Dec 2019 00:54:33 +0000 (19:54 -0500)
committerEric Sandeen <sandeen@redhat.com>
Fri, 13 Dec 2019 00:54:33 +0000 (19:54 -0500)
Source kernel commit: ce840429260a98bcfe4aaf487bb07fa346d86c41

Revert this commit, as it caused periodic regressions in xfs/173 w/
1k blocks.

[1] https://lore.kernel.org/lkml/20190919014602.GN15734@shao2-debian/

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_alloc.h
libxfs/xfs_bmap.c

index 58fa85cec325e869e399f3d4e03828b1fa165134..d6ed5d2c07c210446e999f9a99bfd2984abfffc1 100644 (file)
@@ -81,9 +81,10 @@ typedef struct xfs_alloc_arg {
 /*
  * Defines for datatype
  */
-#define XFS_ALLOC_INITIAL_USER_DATA    (1 << 0)/* special case start of file */
-#define XFS_ALLOC_USERDATA_ZERO                (1 << 1)/* zero extent on allocation */
-#define XFS_ALLOC_NOBUSY               (1 << 2)/* Busy extents not allowed */
+#define XFS_ALLOC_USERDATA             (1 << 0)/* allocation is for user data*/
+#define XFS_ALLOC_INITIAL_USER_DATA    (1 << 1)/* special case start of file */
+#define XFS_ALLOC_USERDATA_ZERO                (1 << 2)/* zero extent on allocation */
+#define XFS_ALLOC_NOBUSY               (1 << 3)/* Busy extents not allowed */
 
 static inline bool
 xfs_alloc_is_userdata(int datatype)
index 60035e44154a097b834e85b4ee30906ba10150c7..6b7c5e22d44984f224761c4348ecaaa8c8059d5a 100644 (file)
@@ -4035,8 +4035,12 @@ xfs_bmapi_allocate(
         */
        if (!(bma->flags & XFS_BMAPI_METADATA)) {
                bma->datatype = XFS_ALLOC_NOBUSY;
-               if (whichfork == XFS_DATA_FORK && bma->offset == 0)
-                       bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA;
+               if (whichfork == XFS_DATA_FORK) {
+                       if (bma->offset == 0)
+                               bma->datatype |= XFS_ALLOC_INITIAL_USER_DATA;
+                       else
+                               bma->datatype |= XFS_ALLOC_USERDATA;
+               }
                if (bma->flags & XFS_BMAPI_ZERO)
                        bma->datatype |= XFS_ALLOC_USERDATA_ZERO;
        }