All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: linux-xfs@vger.kernel.org
Cc: Ian Kent <raven@themaw.net>
Subject: [PATCH 7/7] xfs: reverse the polarity of XFS_MOUNT_COMPAT_IOSIZE
Date: Fri, 25 Oct 2019 19:40:26 +0200	[thread overview]
Message-ID: <20191025174026.31878-8-hch@lst.de> (raw)
In-Reply-To: <20191025174026.31878-1-hch@lst.de>

Replace XFS_MOUNT_COMPAT_IOSIZE with an inverted XFS_MOUNT_LARGEIO flag
that makes the usage more clear.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_iops.c  |  2 +-
 fs/xfs/xfs_mount.h |  2 +-
 fs/xfs/xfs_super.c | 12 +++---------
 3 files changed, 5 insertions(+), 11 deletions(-)

diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 271fcbe04d48..98e30a300c64 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -510,7 +510,7 @@ xfs_stat_blksize(
 	 * default buffered I/O size, return that, otherwise return the compat
 	 * default.
 	 */
-	if (!(mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE)) {
+	if (mp->m_flags & XFS_MOUNT_LARGEIO) {
 		if (mp->m_swidth)
 			return mp->m_swidth << mp->m_sb.sb_blocklog;
 		if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index fb3a36a048cc..dde45d5664f4 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -236,7 +236,7 @@ typedef struct xfs_mount {
 						 * allocation */
 #define XFS_MOUNT_RDONLY	(1ULL << 20)	/* read-only fs */
 #define XFS_MOUNT_DIRSYNC	(1ULL << 21)	/* synchronous directory ops */
-#define XFS_MOUNT_COMPAT_IOSIZE	(1ULL << 22)	/* don't report large preferred
+#define XFS_MOUNT_LARGEIO	(1ULL << 22)	/* report large preferred
 						 * I/O size in stat() */
 #define XFS_MOUNT_FILESTREAMS	(1ULL << 24)	/* enable the filestreams
 						   allocator */
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 83dbfcc5a02d..52f4629278b0 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -181,12 +181,6 @@ xfs_parseargs(
 	if (sb->s_flags & SB_SYNCHRONOUS)
 		mp->m_flags |= XFS_MOUNT_WSYNC;
 
-	/*
-	 * Set some default flags that could be cleared by the mount option
-	 * parsing.
-	 */
-	mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
-
 	/*
 	 * These can be overridden by the mount option parsing.
 	 */
@@ -275,10 +269,10 @@ xfs_parseargs(
 			mp->m_flags &= ~XFS_MOUNT_IKEEP;
 			break;
 		case Opt_largeio:
-			mp->m_flags &= ~XFS_MOUNT_COMPAT_IOSIZE;
+			mp->m_flags |= XFS_MOUNT_LARGEIO;
 			break;
 		case Opt_nolargeio:
-			mp->m_flags |= XFS_MOUNT_COMPAT_IOSIZE;
+			mp->m_flags &= ~XFS_MOUNT_LARGEIO;
 			break;
 		case Opt_attr2:
 			mp->m_flags |= XFS_MOUNT_ATTR2;
@@ -438,12 +432,12 @@ xfs_showargs(
 		{ XFS_MOUNT_GRPID,		",grpid" },
 		{ XFS_MOUNT_DISCARD,		",discard" },
 		{ XFS_MOUNT_SMALL_INUMS,	",inode32" },
+		{ XFS_MOUNT_LARGEIO,		",largeio" },
 		{ XFS_MOUNT_DAX,		",dax" },
 		{ 0, NULL }
 	};
 	static struct proc_xfs_info xfs_info_unset[] = {
 		/* the few simple ones we can get from the mount struct */
-		{ XFS_MOUNT_COMPAT_IOSIZE,	",largeio" },
 		{ XFS_MOUNT_SMALL_INUMS,	",inode64" },
 		{ 0, NULL }
 	};
-- 
2.20.1


  parent reply	other threads:[~2019-10-25 17:41 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-25 17:40 decruft misc mount related code Christoph Hellwig
2019-10-25 17:40 ` [PATCH 1/7] xfs: cleanup stat blksize reporting Christoph Hellwig
2019-10-25 17:56   ` Eric Sandeen
2019-10-25 17:40 ` [PATCH 2/7] xfs: remove the unused m_readio_blocks field from struct xfs_mount Christoph Hellwig
2019-10-25 18:02   ` Eric Sandeen
2019-10-25 17:40 ` [PATCH 3/7] xfs: remove the m_readio_log " Christoph Hellwig
2019-10-25 18:26   ` Eric Sandeen
2019-10-25 20:43     ` Dave Chinner
2019-10-26  5:47       ` Christoph Hellwig
2019-10-25 17:40 ` [PATCH 4/7] xfs: remove the dsunit and dswidth variables in xfs_parseargs Christoph Hellwig
2019-10-25 18:29   ` Eric Sandeen
2019-10-25 17:40 ` [PATCH 5/7] xfs: remove the iosizelog variable " Christoph Hellwig
2019-10-25 18:35   ` Eric Sandeen
2019-10-25 19:03     ` Eric Sandeen
2019-10-26  5:47       ` Christoph Hellwig
2019-10-25 17:40 ` [PATCH 6/7] xfs: clean up setting m_readio_* / m_writeio_* Christoph Hellwig
2019-10-25 19:18   ` Eric Sandeen
2019-10-25 20:53     ` Dave Chinner
2019-10-27  2:23       ` Eric Sandeen
2019-10-25 17:40 ` Christoph Hellwig [this message]
2019-10-25 19:24   ` [PATCH 7/7] xfs: reverse the polarity of XFS_MOUNT_COMPAT_IOSIZE Eric Sandeen

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=20191025174026.31878-8-hch@lst.de \
    --to=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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.