]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
xfs: rename the m_writeio_* fields in struct xfs_mount
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Oct 2019 15:41:44 +0000 (08:41 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 29 Oct 2019 16:50:12 +0000 (09:50 -0700)
Use the allocsize name to match the mount option and usage instead.

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/xfs_iomap.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_mount.h
fs/xfs/xfs_super.c
fs/xfs/xfs_trace.h

index 8317b936d3c1d33cbeed6bde713d811ce6b568da..959061a560595d25299d5c7b2f89154eccefe1be 100644 (file)
@@ -29,8 +29,8 @@
 #include "xfs_reflink.h"
 
 
-#define XFS_WRITEIO_ALIGN(mp,off)      (((off) >> mp->m_writeio_log) \
-                                               << mp->m_writeio_log)
+#define XFS_ALLOC_ALIGN(mp, off) \
+       (((off) >> mp->m_allocsize_log) << mp->m_allocsize_log)
 
 static int
 xfs_alert_fsblock_zero(
@@ -422,7 +422,7 @@ xfs_iomap_prealloc_size(
                return 0;
 
        if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) &&
-           (XFS_ISIZE(ip) < XFS_FSB_TO_B(mp, mp->m_writeio_blocks)))
+           (XFS_ISIZE(ip) < XFS_FSB_TO_B(mp, mp->m_allocsize_blocks)))
                return 0;
 
        /*
@@ -433,7 +433,7 @@ xfs_iomap_prealloc_size(
            XFS_ISIZE(ip) < XFS_FSB_TO_B(mp, mp->m_dalign) ||
            !xfs_iext_peek_prev_extent(ifp, icur, &prev) ||
            prev.br_startoff + prev.br_blockcount < offset_fsb)
-               return mp->m_writeio_blocks;
+               return mp->m_allocsize_blocks;
 
        /*
         * Determine the initial size of the preallocation. We are beyond the
@@ -526,10 +526,10 @@ xfs_iomap_prealloc_size(
        while (alloc_blocks && alloc_blocks >= freesp)
                alloc_blocks >>= 4;
 check_writeio:
-       if (alloc_blocks < mp->m_writeio_blocks)
-               alloc_blocks = mp->m_writeio_blocks;
+       if (alloc_blocks < mp->m_allocsize_blocks)
+               alloc_blocks = mp->m_allocsize_blocks;
        trace_xfs_iomap_prealloc_size(ip, alloc_blocks, shift,
-                                     mp->m_writeio_blocks);
+                                     mp->m_allocsize_blocks);
        return alloc_blocks;
 }
 
@@ -991,7 +991,7 @@ xfs_buffered_write_iomap_begin(
                        xfs_off_t       end_offset;
                        xfs_fileoff_t   p_end_fsb;
 
-                       end_offset = XFS_WRITEIO_ALIGN(mp, offset + count - 1);
+                       end_offset = XFS_ALLOC_ALIGN(mp, offset + count - 1);
                        p_end_fsb = XFS_B_TO_FSBT(mp, end_offset) +
                                        prealloc_blocks;
 
index 271fcbe04d484210ad7286c590b5cbff4a1eb61c..382d7276947016f02acf02937c74a93c44d68df0 100644 (file)
@@ -514,7 +514,7 @@ xfs_stat_blksize(
                if (mp->m_swidth)
                        return mp->m_swidth << mp->m_sb.sb_blocklog;
                if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
-                       return 1U << mp->m_writeio_log;
+                       return 1U << mp->m_allocsize_log;
        }
 
        return PAGE_SIZE;
index 359fcfb494d4c235a675b5d1abeed9fe0f04f121..1853797ea938894856c4ff48ee89c5a1f513373a 100644 (file)
@@ -440,13 +440,13 @@ xfs_set_rw_sizes(xfs_mount_t *mp)
        if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE))
                writeio_log = XFS_WRITEIO_LOG_LARGE;
        else
-               writeio_log = mp->m_writeio_log;
+               writeio_log = mp->m_allocsize_log;
 
        if (sbp->sb_blocklog > writeio_log)
-               mp->m_writeio_log = sbp->sb_blocklog;
+               mp->m_allocsize_log = sbp->sb_blocklog;
        } else
-               mp->m_writeio_log = writeio_log;
-       mp->m_writeio_blocks = 1 << (mp->m_writeio_log - sbp->sb_blocklog);
+               mp->m_allocsize_log = writeio_log;
+       mp->m_allocsize_blocks = 1 << (mp->m_allocsize_log - sbp->sb_blocklog);
 }
 
 /*
index fba818d5c540e771b9dfaa46b4b789b5182383f0..109081c16a07f05f054c0f2da53843ba7fd9e590 100644 (file)
@@ -98,8 +98,8 @@ typedef struct xfs_mount {
        xfs_agnumber_t          m_agirotor;     /* last ag dir inode alloced */
        spinlock_t              m_agirotor_lock;/* .. and lock protecting it */
        xfs_agnumber_t          m_maxagi;       /* highest inode alloc group */
-       uint                    m_writeio_log;  /* min write size log bytes */
-       uint                    m_writeio_blocks; /* min write size blocks */
+       uint                    m_allocsize_log;/* min write size log bytes */
+       uint                    m_allocsize_blocks; /* min write size blocks */
        struct xfs_da_geometry  *m_dir_geo;     /* directory block geometry */
        struct xfs_da_geometry  *m_attr_geo;    /* attribute block geometry */
        struct xlog             *m_log;         /* log specific stuff */
index a477348ab68b41d297b17d50d7f4264699212ddf..d1a0958f336d2e979fe1c743c938e8942ca44133 100644 (file)
@@ -405,7 +405,7 @@ xfs_parseargs(
                }
 
                mp->m_flags |= XFS_MOUNT_DFLT_IOSIZE;
-               mp->m_writeio_log = iosizelog;
+               mp->m_allocsize_log = iosizelog;
        }
 
        return 0;
@@ -456,7 +456,7 @@ xfs_showargs(
 
        if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
                seq_printf(m, ",allocsize=%dk",
-                               (int)(1 << mp->m_writeio_log) >> 10);
+                               (int)(1 << mp->m_allocsize_log) >> 10);
 
        if (mp->m_logbufs > 0)
                seq_printf(m, ",logbufs=%d", mp->m_logbufs);
index 926f4d10dc02f4444b01e35ee867814efe5c5273..c13bb3655e489038d5fbdcea328afcc1a012cee9 100644 (file)
@@ -725,7 +725,7 @@ TRACE_EVENT(xfs_iomap_prealloc_size,
                __entry->writeio_blocks = writeio_blocks;
        ),
        TP_printk("dev %d:%d ino 0x%llx prealloc blocks %llu shift %d "
-                 "m_writeio_blocks %u",
+                 "m_allocsize_blocks %u",
                  MAJOR(__entry->dev), MINOR(__entry->dev), __entry->ino,
                  __entry->blocks, __entry->shift, __entry->writeio_blocks)
 )