From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org, Ian Kent <raven@themaw.net>
Subject: Re: [PATCH 05/12] xfs: remove the m_readio_* fields in struct xfs_mount
Date: Mon, 28 Oct 2019 10:06:28 -0700 [thread overview]
Message-ID: <20191028170628.GN15222@magnolia> (raw)
In-Reply-To: <20191027145547.25157-6-hch@lst.de>
On Sun, Oct 27, 2019 at 03:55:40PM +0100, Christoph Hellwig wrote:
> m_readio_blocks is entirely unused, and m_readio_blocks is only used in
> xfs_stat_blksize in a max statements that is a no-op as it always has
> the same value as m_writeio_log.
>
> Signed-off-by: Christoph Hellwig <hch@lst.de>
Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
--D
> ---
> fs/xfs/xfs_iops.c | 2 +-
> fs/xfs/xfs_mount.c | 18 ++++--------------
> fs/xfs/xfs_mount.h | 5 +----
> fs/xfs/xfs_super.c | 1 -
> 4 files changed, 6 insertions(+), 20 deletions(-)
>
> diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
> index b6dbfd8eb6a1..271fcbe04d48 100644
> --- a/fs/xfs/xfs_iops.c
> +++ b/fs/xfs/xfs_iops.c
> @@ -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 << max(mp->m_readio_log, mp->m_writeio_log);
> + return 1U << mp->m_writeio_log;
> }
>
> return PAGE_SIZE;
> diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> index b423033e14f4..359fcfb494d4 100644
> --- a/fs/xfs/xfs_mount.c
> +++ b/fs/xfs/xfs_mount.c
> @@ -437,25 +437,15 @@ xfs_set_rw_sizes(xfs_mount_t *mp)
> xfs_sb_t *sbp = &(mp->m_sb);
> int readio_log, writeio_log;
>
> - if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)) {
> - readio_log = XFS_READIO_LOG_LARGE;
> + if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE))
> writeio_log = XFS_WRITEIO_LOG_LARGE;
> - } else {
> - readio_log = mp->m_readio_log;
> + else
> writeio_log = mp->m_writeio_log;
> - }
>
> - if (sbp->sb_blocklog > readio_log) {
> - mp->m_readio_log = sbp->sb_blocklog;
> - } else {
> - mp->m_readio_log = readio_log;
> - }
> - mp->m_readio_blocks = 1 << (mp->m_readio_log - sbp->sb_blocklog);
> - if (sbp->sb_blocklog > writeio_log) {
> + if (sbp->sb_blocklog > writeio_log)
> mp->m_writeio_log = sbp->sb_blocklog;
> - } else {
> + } else
> mp->m_writeio_log = writeio_log;
> - }
> mp->m_writeio_blocks = 1 << (mp->m_writeio_log - sbp->sb_blocklog);
> }
>
> diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
> index dc81e5c264ce..fba818d5c540 100644
> --- a/fs/xfs/xfs_mount.h
> +++ b/fs/xfs/xfs_mount.h
> @@ -98,8 +98,6 @@ 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_readio_log; /* min read size log bytes */
> - uint m_readio_blocks; /* min read size blocks */
> uint m_writeio_log; /* min write size log bytes */
> uint m_writeio_blocks; /* min write size blocks */
> struct xfs_da_geometry *m_dir_geo; /* directory block geometry */
> @@ -248,9 +246,8 @@ typedef struct xfs_mount {
>
>
> /*
> - * Default minimum read and write sizes.
> + * Default write size.
> */
> -#define XFS_READIO_LOG_LARGE 16
> #define XFS_WRITEIO_LOG_LARGE 16
>
> /*
> diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
> index 4089de3daded..a477348ab68b 100644
> --- a/fs/xfs/xfs_super.c
> +++ b/fs/xfs/xfs_super.c
> @@ -405,7 +405,6 @@ xfs_parseargs(
> }
>
> mp->m_flags |= XFS_MOUNT_DFLT_IOSIZE;
> - mp->m_readio_log = iosizelog;
> mp->m_writeio_log = iosizelog;
> }
>
> --
> 2.20.1
>
next prev parent reply other threads:[~2019-10-28 17:07 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-27 14:55 decruft misc mount related code v2 Christoph Hellwig
2019-10-27 14:55 ` [PATCH 01/12] xfs: remove the biosize mount option Christoph Hellwig
2019-10-27 14:55 ` [PATCH 02/12] xfs: remove the dsunit and dswidth variables in xfs_parseargs Christoph Hellwig
2019-10-28 16:50 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 03/12] xfs: cleanup calculating the stat optimal I/O size Christoph Hellwig
2019-10-28 16:50 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 04/12] xfs: don't use a different allocsice for -o wsync mounts Christoph Hellwig
2019-10-28 17:05 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 05/12] xfs: remove the m_readio_* fields in struct xfs_mount Christoph Hellwig
2019-10-28 17:06 ` Darrick J. Wong [this message]
2019-10-27 14:55 ` [PATCH 06/12] xfs: rename the m_writeio_* " Christoph Hellwig
2019-10-28 17:07 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 07/12] xfs: simplify parsing of allocsize mount option Christoph Hellwig
2019-10-28 17:11 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 08/12] xfs: rename the XFS_MOUNT_DFLT_IOSIZE option to XFS_MOUNT_ALLOCISZE Christoph Hellwig
2019-10-28 17:12 ` Darrick J. Wong
2019-10-29 7:50 ` Christoph Hellwig
2019-10-27 14:55 ` [PATCH 09/12] xfs: reverse the polarity of XFS_MOUNT_COMPAT_IOSIZE Christoph Hellwig
2019-10-28 17:13 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 10/12] xfs: clean up printing the allocsize option in xfs_showargs Christoph Hellwig
2019-10-28 17:13 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 11/12] xfs: clean up printing inode32/64 " Christoph Hellwig
2019-10-28 17:14 ` Darrick J. Wong
2019-10-27 14:55 ` [PATCH 12/12] xfs: merge xfs_showargs into xfs_fs_show_options Christoph Hellwig
2019-10-28 17:14 ` Darrick J. Wong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191028170628.GN15222@magnolia \
--to=darrick.wong@oracle.com \
--cc=hch@lst.de \
--cc=linux-xfs@vger.kernel.org \
--cc=raven@themaw.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox