]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove deprecated mount options
authorDarrick J. Wong <djwong@kernel.org>
Fri, 5 Dec 2025 15:01:30 +0000 (16:01 +0100)
committerAndrey Albershteyn <aalbersh@kernel.org>
Mon, 8 Dec 2025 17:03:15 +0000 (18:03 +0100)
Source kernel commit: b9a176e54162f890aaf50ac8a467d725ed2f00df

These four mount options were scheduled for removal in September 2025,
so remove them now.

Cc: preichl@redhat.com
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrey Albershteyn <aalbersh@kernel.org>
libxfs/xfs_attr_leaf.c
libxfs/xfs_bmap.c
libxfs/xfs_ialloc.c
libxfs/xfs_sb.c

index 01a87b45a6a5c0696d6c57438f5a9eaf16a6466b..cfb8d40e51a987770ce444952ee835c0852afefb 100644 (file)
@@ -664,12 +664,8 @@ xfs_attr_shortform_bytesfit(
 
        /*
         * For attr2 we can try to move the forkoff if there is space in the
-        * literal area, but for the old format we are done if there is no
-        * space in the fixed attribute fork.
+        * literal area
         */
-       if (!xfs_has_attr2(mp))
-               return 0;
-
        dsize = dp->i_df.if_bytes;
 
        switch (dp->i_df.if_format) {
@@ -720,22 +716,16 @@ xfs_attr_shortform_bytesfit(
 }
 
 /*
- * Switch on the ATTR2 superblock bit (implies also FEATURES2) unless:
- * - noattr2 mount option is set,
- * - on-disk version bit says it is already set, or
- * - the attr2 mount option is not set to enable automatic upgrade from attr1.
+ * Switch on the ATTR2 superblock bit (implies also FEATURES2) unless
+ * on-disk version bit says it is already set
  */
 STATIC void
 xfs_sbversion_add_attr2(
        struct xfs_mount        *mp,
        struct xfs_trans        *tp)
 {
-       if (xfs_has_noattr2(mp))
-               return;
        if (mp->m_sb.sb_features2 & XFS_SB_VERSION2_ATTR2BIT)
                return;
-       if (!xfs_has_attr2(mp))
-               return;
 
        spin_lock(&mp->m_sb_lock);
        xfs_add_attr2(mp);
@@ -886,7 +876,7 @@ xfs_attr_sf_removename(
        /*
         * Fix up the start offset of the attribute fork
         */
-       if (totsize == sizeof(struct xfs_attr_sf_hdr) && xfs_has_attr2(mp) &&
+       if (totsize == sizeof(struct xfs_attr_sf_hdr) &&
            (dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
            !(args->op_flags & (XFS_DA_OP_ADDNAME | XFS_DA_OP_REPLACE)) &&
            !xfs_has_parent(mp)) {
@@ -897,7 +887,6 @@ xfs_attr_sf_removename(
                ASSERT(dp->i_forkoff);
                ASSERT(totsize > sizeof(struct xfs_attr_sf_hdr) ||
                                (args->op_flags & XFS_DA_OP_ADDNAME) ||
-                               !xfs_has_attr2(mp) ||
                                dp->i_df.if_format == XFS_DINODE_FMT_BTREE ||
                                xfs_has_parent(mp));
                xfs_trans_log_inode(args->trans, dp,
@@ -1037,8 +1026,7 @@ xfs_attr_shortform_allfit(
                bytes += xfs_attr_sf_entsize_byname(name_loc->namelen,
                                        be16_to_cpu(name_loc->valuelen));
        }
-       if (xfs_has_attr2(dp->i_mount) &&
-           (dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
+       if ((dp->i_df.if_format != XFS_DINODE_FMT_BTREE) &&
            (bytes == sizeof(struct xfs_attr_sf_hdr)))
                return -1;
        return xfs_attr_shortform_bytesfit(dp, bytes);
@@ -1158,7 +1146,6 @@ xfs_attr3_leaf_to_shortform(
                 * this case.
                 */
                if (!(args->op_flags & XFS_DA_OP_REPLACE)) {
-                       ASSERT(xfs_has_attr2(dp->i_mount));
                        ASSERT(dp->i_df.if_format != XFS_DINODE_FMT_BTREE);
                        xfs_attr_fork_remove(dp, args->trans);
                }
index 99f5e6f9d545a4595d7804398f7859fbc0e1c150..e6a1922abb2924ebc983d5084317d76d7211d0c0 100644 (file)
@@ -991,8 +991,7 @@ xfs_bmap_add_attrfork_local(
 static int
 xfs_bmap_set_attrforkoff(
        struct xfs_inode        *ip,
-       int                     size,
-       int                     *version)
+       int                     size)
 {
        int                     default_size = xfs_default_attroffset(ip) >> 3;
 
@@ -1006,8 +1005,6 @@ xfs_bmap_set_attrforkoff(
                ip->i_forkoff = xfs_attr_shortform_bytesfit(ip, size);
                if (!ip->i_forkoff)
                        ip->i_forkoff = default_size;
-               else if (xfs_has_attr2(ip->i_mount) && version)
-                       *version = 2;
                break;
        default:
                ASSERT(0);
@@ -1029,7 +1026,6 @@ xfs_bmap_add_attrfork(
        int                     rsvd)           /* xact may use reserved blks */
 {
        struct xfs_mount        *mp = tp->t_mountp;
-       int                     version = 1;    /* superblock attr version */
        int                     logflags;       /* logging flags */
        int                     error;          /* error return value */
 
@@ -1039,7 +1035,7 @@ xfs_bmap_add_attrfork(
        ASSERT(!xfs_inode_has_attr_fork(ip));
 
        xfs_trans_log_inode(tp, ip, XFS_ILOG_CORE);
-       error = xfs_bmap_set_attrforkoff(ip, size, &version);
+       error = xfs_bmap_set_attrforkoff(ip, size);
        if (error)
                return error;
 
@@ -1063,16 +1059,12 @@ xfs_bmap_add_attrfork(
                xfs_trans_log_inode(tp, ip, logflags);
        if (error)
                return error;
-       if (!xfs_has_attr(mp) ||
-          (!xfs_has_attr2(mp) && version == 2)) {
+       if (!xfs_has_attr(mp)) {
                bool log_sb = false;
 
                spin_lock(&mp->m_sb_lock);
                if (!xfs_has_attr(mp)) {
                        xfs_add_attr(mp);
-                       log_sb = true;
-               }
-               if (!xfs_has_attr2(mp) && version == 2) {
                        xfs_add_attr2(mp);
                        log_sb = true;
                }
index 8fd149e184a6f25ab6906ed572cb71cabee56e92..0efad4cfdae89e763511641b90cd84b9b30a2e9d 100644 (file)
@@ -2135,7 +2135,7 @@ xfs_difree_inobt(
         * remove the chunk if the block size is large enough for multiple inode
         * chunks (that might not be free).
         */
-       if (!xfs_has_ikeep(mp) && rec.ir_free == XFS_INOBT_ALL_FREE &&
+       if (rec.ir_free == XFS_INOBT_ALL_FREE &&
            mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
                xic->deleted = true;
                xic->first_ino = xfs_agino_to_ino(pag, rec.ir_startino);
@@ -2281,7 +2281,7 @@ xfs_difree_finobt(
         * enough for multiple chunks. Leave the finobt record to remain in sync
         * with the inobt.
         */
-       if (!xfs_has_ikeep(mp) && rec.ir_free == XFS_INOBT_ALL_FREE &&
+       if (rec.ir_free == XFS_INOBT_ALL_FREE &&
            mp->m_sb.sb_inopblock <= XFS_INODES_PER_CHUNK) {
                error = xfs_btree_delete(cur, &i);
                if (error)
index 078c75febf4f5436c0852b4cdac63e14123798d7..dd14c3ab3b59e373d995e49a666309c0e96f94b5 100644 (file)
@@ -140,8 +140,6 @@ xfs_sb_version_to_features(
        if (sbp->sb_versionnum & XFS_SB_VERSION_MOREBITSBIT) {
                if (sbp->sb_features2 & XFS_SB_VERSION2_LAZYSBCOUNTBIT)
                        features |= XFS_FEAT_LAZYSBCOUNT;
-               if (sbp->sb_features2 & XFS_SB_VERSION2_ATTR2BIT)
-                       features |= XFS_FEAT_ATTR2;
                if (sbp->sb_features2 & XFS_SB_VERSION2_PROJID32BIT)
                        features |= XFS_FEAT_PROJID32;
                if (sbp->sb_features2 & XFS_SB_VERSION2_FTYPE)
@@ -153,7 +151,7 @@ xfs_sb_version_to_features(
 
        /* Always on V5 features */
        features |= XFS_FEAT_ALIGN | XFS_FEAT_LOGV2 | XFS_FEAT_EXTFLG |
-                   XFS_FEAT_LAZYSBCOUNT | XFS_FEAT_ATTR2 | XFS_FEAT_PROJID32 |
+                   XFS_FEAT_LAZYSBCOUNT | XFS_FEAT_PROJID32 |
                    XFS_FEAT_V3INODES | XFS_FEAT_CRC | XFS_FEAT_PQUOTINO;
 
        /* Optional V5 features */
@@ -1522,7 +1520,8 @@ xfs_fs_geometry(
        geo->version = XFS_FSOP_GEOM_VERSION;
        geo->flags = XFS_FSOP_GEOM_FLAGS_NLINK |
                     XFS_FSOP_GEOM_FLAGS_DIRV2 |
-                    XFS_FSOP_GEOM_FLAGS_EXTFLG;
+                    XFS_FSOP_GEOM_FLAGS_EXTFLG |
+                    XFS_FSOP_GEOM_FLAGS_ATTR2;
        if (xfs_has_attr(mp))
                geo->flags |= XFS_FSOP_GEOM_FLAGS_ATTR;
        if (xfs_has_quota(mp))
@@ -1535,8 +1534,6 @@ xfs_fs_geometry(
                geo->flags |= XFS_FSOP_GEOM_FLAGS_DIRV2CI;
        if (xfs_has_lazysbcount(mp))
                geo->flags |= XFS_FSOP_GEOM_FLAGS_LAZYSB;
-       if (xfs_has_attr2(mp))
-               geo->flags |= XFS_FSOP_GEOM_FLAGS_ATTR2;
        if (xfs_has_projid32(mp))
                geo->flags |= XFS_FSOP_GEOM_FLAGS_PROJID32;
        if (xfs_has_crc(mp))