xfs: remove the never fully implemented UUID fork format
authorChristoph Hellwig <hch@lst.de>
Thu, 19 Oct 2017 18:07:09 +0000 (11:07 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Thu, 26 Oct 2017 22:38:27 +0000 (15:38 -0700)
Remove the dead code dealing with the UUID fork format that was never
implemented in Linux (and neither in IRIX as far as I know).

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/xfs/libxfs/xfs_attr_leaf.c
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inode_fork.h
fs/xfs/libxfs/xfs_log_format.h
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_itable.c
fs/xfs/xfs_log_recover.c

index 5c16db86b38ffbcbb2c7e400cd04a4e84230a34e..53cc8b986eac45c4e5ec4afd319891b6e9f716c5 100644 (file)
@@ -397,13 +397,9 @@ xfs_attr_shortform_bytesfit(xfs_inode_t *dp, int bytes)
        /* rounded down */
        offset = (XFS_LITINO(mp, dp->i_d.di_version) - bytes) >> 3;
 
-       switch (dp->i_d.di_format) {
-       case XFS_DINODE_FMT_DEV:
+       if (dp->i_d.di_format == XFS_DINODE_FMT_DEV) {
                minforkoff = roundup(sizeof(xfs_dev_t), 8) >> 3;
                return (offset >= minforkoff) ? minforkoff : 0;
-       case XFS_DINODE_FMT_UUID:
-               minforkoff = roundup(sizeof(uuid_t), 8) >> 3;
-               return (offset >= minforkoff) ? minforkoff : 0;
        }
 
        /*
index 30e5a358dd90a5119f107249ceae889b644f1a5e..defe70a54ffcefeeaca660ceff074dbd2d7eeafe 100644 (file)
@@ -231,7 +231,6 @@ xfs_bmap_forkoff_reset(
 {
        if (whichfork == XFS_ATTR_FORK &&
            ip->i_d.di_format != XFS_DINODE_FMT_DEV &&
-           ip->i_d.di_format != XFS_DINODE_FMT_UUID &&
            ip->i_d.di_format != XFS_DINODE_FMT_BTREE) {
                uint    dfl_forkoff = xfs_default_attroffset(ip) >> 3;
 
@@ -1086,9 +1085,6 @@ xfs_bmap_add_attrfork(
        case XFS_DINODE_FMT_DEV:
                ip->i_d.di_forkoff = roundup(sizeof(xfs_dev_t), 8) >> 3;
                break;
-       case XFS_DINODE_FMT_UUID:
-               ip->i_d.di_forkoff = roundup(sizeof(uuid_t), 8) >> 3;
-               break;
        case XFS_DINODE_FMT_LOCAL:
        case XFS_DINODE_FMT_EXTENTS:
        case XFS_DINODE_FMT_BTREE:
index d4d9bef20c3a390a267a49228786b9322dedc3ba..6470dfa768ee512eff5380ed7c26a49902b1374a 100644 (file)
@@ -946,7 +946,7 @@ typedef enum xfs_dinode_fmt {
        XFS_DINODE_FMT_LOCAL,           /* bulk data */
        XFS_DINODE_FMT_EXTENTS,         /* struct xfs_bmbt_rec */
        XFS_DINODE_FMT_BTREE,           /* struct xfs_bmdr_block */
-       XFS_DINODE_FMT_UUID             /* uuid_t */
+       XFS_DINODE_FMT_UUID             /* added long ago, but never used */
 } xfs_dinode_fmt_t;
 
 /*
index 31786bad973853c0e193abb91f4e4cc46dd04c6b..1d003ca215620f64ede8e9377121c3217f7c63c0 100644 (file)
@@ -902,15 +902,6 @@ xfs_iflush_fork(
                }
                break;
 
-       case XFS_DINODE_FMT_UUID:
-               if (iip->ili_fields & XFS_ILOG_UUID) {
-                       ASSERT(whichfork == XFS_DATA_FORK);
-                       memcpy(XFS_DFORK_DPTR(dip),
-                              &ip->i_df.if_u2.if_uuid,
-                              sizeof(uuid_t));
-               }
-               break;
-
        default:
                ASSERT(0);
                break;
index 6750f0462d2129d9aa4f96a71c6c7da47e3dacba..064babdc373c9b7577bca93868c5ae335fa655a3 100644 (file)
@@ -70,7 +70,6 @@ typedef struct xfs_ifork {
                char            if_inline_data[XFS_INLINE_DATA];
                                                /* very small file data */
                xfs_dev_t       if_rdev;        /* dev number if special */
-               uuid_t          if_uuid;        /* mount point value */
        } if_u2;
 } xfs_ifork_t;
 
index 71de185735e06c1d44e13e55e30ff1d38b5a62d8..a7ab6adae7f68efc4018f4832e238b3d79073b18 100644 (file)
@@ -274,7 +274,7 @@ typedef struct xfs_inode_log_format {
        uint64_t                ilf_ino;        /* inode number */
        union {
                uint32_t        ilfu_rdev;      /* rdev value for dev inode*/
-               uuid_t          ilfu_uuid;      /* mount point value */
+               u8              __pad[16];      /* unused */
        } ilf_u;
        int64_t                 ilf_blkno;      /* blkno of inode buffer */
        int32_t                 ilf_len;        /* len of inode buffer */
@@ -295,7 +295,7 @@ struct xfs_inode_log_format_32 {
        uint64_t                ilf_ino;        /* inode number */
        union {
                uint32_t        ilfu_rdev;      /* rdev value for dev inode*/
-               uuid_t          ilfu_uuid;      /* mount point value */
+               u8              __pad[16];      /* unused */
        } ilf_u;
        int64_t                 ilf_blkno;      /* blkno of inode buffer */
        int32_t                 ilf_len;        /* len of inode buffer */
@@ -311,7 +311,7 @@ struct xfs_inode_log_format_32 {
 #define        XFS_ILOG_DEXT   0x004   /* log i_df.if_extents */
 #define        XFS_ILOG_DBROOT 0x008   /* log i_df.i_broot */
 #define        XFS_ILOG_DEV    0x010   /* log the dev field */
-#define        XFS_ILOG_UUID   0x020   /* log the uuid field */
+#define        XFS_ILOG_UUID   0x020   /* added long ago, but never used */
 #define        XFS_ILOG_ADATA  0x040   /* log i_af.if_data */
 #define        XFS_ILOG_AEXT   0x080   /* log i_af.if_extents */
 #define        XFS_ILOG_ABROOT 0x100   /* log i_af.i_broot */
@@ -329,9 +329,9 @@ struct xfs_inode_log_format_32 {
 
 #define        XFS_ILOG_NONCORE        (XFS_ILOG_DDATA | XFS_ILOG_DEXT | \
                                 XFS_ILOG_DBROOT | XFS_ILOG_DEV | \
-                                XFS_ILOG_UUID | XFS_ILOG_ADATA | \
-                                XFS_ILOG_AEXT | XFS_ILOG_ABROOT | \
-                                XFS_ILOG_DOWNER | XFS_ILOG_AOWNER)
+                                XFS_ILOG_ADATA | XFS_ILOG_AEXT | \
+                                XFS_ILOG_ABROOT | XFS_ILOG_DOWNER | \
+                                XFS_ILOG_AOWNER)
 
 #define        XFS_ILOG_DFORK          (XFS_ILOG_DDATA | XFS_ILOG_DEXT | \
                                 XFS_ILOG_DBROOT)
@@ -341,10 +341,10 @@ struct xfs_inode_log_format_32 {
 
 #define        XFS_ILOG_ALL            (XFS_ILOG_CORE | XFS_ILOG_DDATA | \
                                 XFS_ILOG_DEXT | XFS_ILOG_DBROOT | \
-                                XFS_ILOG_DEV | XFS_ILOG_UUID | \
-                                XFS_ILOG_ADATA | XFS_ILOG_AEXT | \
-                                XFS_ILOG_ABROOT | XFS_ILOG_TIMESTAMP | \
-                                XFS_ILOG_DOWNER | XFS_ILOG_AOWNER)
+                                XFS_ILOG_DEV | XFS_ILOG_ADATA | \
+                                XFS_ILOG_AEXT | XFS_ILOG_ABROOT | \
+                                XFS_ILOG_TIMESTAMP | XFS_ILOG_DOWNER | \
+                                XFS_ILOG_AOWNER)
 
 static inline int xfs_ilog_fbroot(int w)
 {
index 9bbc2d7cc8cbb2c7cf42ee335061acfeff68617c..bd60ad31317300dca6fd28f0ae193635ae336be2 100644 (file)
@@ -72,7 +72,6 @@ xfs_inode_item_data_fork_size(
                break;
 
        case XFS_DINODE_FMT_DEV:
-       case XFS_DINODE_FMT_UUID:
                break;
        default:
                ASSERT(0);
@@ -156,8 +155,7 @@ xfs_inode_item_format_data_fork(
        switch (ip->i_d.di_format) {
        case XFS_DINODE_FMT_EXTENTS:
                iip->ili_fields &=
-                       ~(XFS_ILOG_DDATA | XFS_ILOG_DBROOT |
-                         XFS_ILOG_DEV | XFS_ILOG_UUID);
+                       ~(XFS_ILOG_DDATA | XFS_ILOG_DBROOT | XFS_ILOG_DEV);
 
                if ((iip->ili_fields & XFS_ILOG_DEXT) &&
                    ip->i_d.di_nextents > 0 &&
@@ -181,8 +179,7 @@ xfs_inode_item_format_data_fork(
                break;
        case XFS_DINODE_FMT_BTREE:
                iip->ili_fields &=
-                       ~(XFS_ILOG_DDATA | XFS_ILOG_DEXT |
-                         XFS_ILOG_DEV | XFS_ILOG_UUID);
+                       ~(XFS_ILOG_DDATA | XFS_ILOG_DEXT | XFS_ILOG_DEV);
 
                if ((iip->ili_fields & XFS_ILOG_DBROOT) &&
                    ip->i_df.if_broot_bytes > 0) {
@@ -200,8 +197,7 @@ xfs_inode_item_format_data_fork(
                break;
        case XFS_DINODE_FMT_LOCAL:
                iip->ili_fields &=
-                       ~(XFS_ILOG_DEXT | XFS_ILOG_DBROOT |
-                         XFS_ILOG_DEV | XFS_ILOG_UUID);
+                       ~(XFS_ILOG_DEXT | XFS_ILOG_DBROOT | XFS_ILOG_DEV);
                if ((iip->ili_fields & XFS_ILOG_DDATA) &&
                    ip->i_df.if_bytes > 0) {
                        /*
@@ -224,18 +220,10 @@ xfs_inode_item_format_data_fork(
                break;
        case XFS_DINODE_FMT_DEV:
                iip->ili_fields &=
-                       ~(XFS_ILOG_DDATA | XFS_ILOG_DBROOT |
-                         XFS_ILOG_DEXT | XFS_ILOG_UUID);
+                       ~(XFS_ILOG_DDATA | XFS_ILOG_DBROOT | XFS_ILOG_DEXT);
                if (iip->ili_fields & XFS_ILOG_DEV)
                        ilf->ilf_u.ilfu_rdev = ip->i_df.if_u2.if_rdev;
                break;
-       case XFS_DINODE_FMT_UUID:
-               iip->ili_fields &=
-                       ~(XFS_ILOG_DDATA | XFS_ILOG_DBROOT |
-                         XFS_ILOG_DEXT | XFS_ILOG_DEV);
-               if (iip->ili_fields & XFS_ILOG_UUID)
-                       ilf->ilf_u.ilfu_uuid = ip->i_df.if_u2.if_uuid;
-               break;
        default:
                ASSERT(0);
                break;
@@ -441,7 +429,7 @@ xfs_inode_item_format(
        ilf->ilf_dsize = 0;
        ilf->ilf_asize = 0;
        ilf->ilf_pad = 0;
-       uuid_copy(&ilf->ilf_u.ilfu_uuid, &uuid_null);
+       memset(&ilf->ilf_u, 0, sizeof(ilf->ilf_u));
 
        xlog_finish_iovec(lv, vecp, sizeof(*ilf));
 
@@ -892,8 +880,7 @@ xfs_inode_item_format_convert(
        in_f->ilf_asize = in_f32->ilf_asize;
        in_f->ilf_dsize = in_f32->ilf_dsize;
        in_f->ilf_ino = in_f32->ilf_ino;
-       /* copy biggest field of ilf_u */
-       uuid_copy(&in_f->ilf_u.ilfu_uuid, &in_f32->ilf_u.ilfu_uuid);
+       memcpy(&in_f->ilf_u, &in_f32->ilf_u, sizeof(in_f->ilf_u));
        in_f->ilf_blkno = in_f32->ilf_blkno;
        in_f->ilf_len = in_f32->ilf_len;
        in_f->ilf_boffset = in_f32->ilf_boffset;
index 0172d0b72c951dafbfd722be6cd1ee13621da537..e272dad422cbfbf93412960d265438a5db0645fe 100644 (file)
@@ -114,7 +114,6 @@ xfs_bulkstat_one_int(
                buf->bs_blocks = 0;
                break;
        case XFS_DINODE_FMT_LOCAL:
-       case XFS_DINODE_FMT_UUID:
                buf->bs_rdev = 0;
                buf->bs_blksize = mp->m_sb.sb_blocksize;
                buf->bs_blocks = 0;
index ee34899396b263eaf88938cca95a8588221f0ede..4e48e0534345192ed082ee7839e676feca891671 100644 (file)
@@ -3163,16 +3163,8 @@ xlog_recover_inode_pass2(
        }
 
        fields = in_f->ilf_fields;
-       switch (fields & (XFS_ILOG_DEV | XFS_ILOG_UUID)) {
-       case XFS_ILOG_DEV:
+       if (fields & XFS_ILOG_DEV)
                xfs_dinode_put_rdev(dip, in_f->ilf_u.ilfu_rdev);
-               break;
-       case XFS_ILOG_UUID:
-               memcpy(XFS_DFORK_DPTR(dip),
-                      &in_f->ilf_u.ilfu_uuid,
-                      sizeof(uuid_t));
-               break;
-       }
 
        if (in_f->ilf_size == 2)
                goto out_owner_change;