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 08/12] xfs: rename the XFS_MOUNT_DFLT_IOSIZE option to XFS_MOUNT_ALLOCISZE
Date: Sun, 27 Oct 2019 15:55:43 +0100	[thread overview]
Message-ID: <20191027145547.25157-9-hch@lst.de> (raw)
In-Reply-To: <20191027145547.25157-1-hch@lst.de>

Make the flag match the mount option and usage.

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

diff --git a/fs/xfs/xfs_iomap.c b/fs/xfs/xfs_iomap.c
index 64bd30a24a71..3c2098f1ded0 100644
--- a/fs/xfs/xfs_iomap.c
+++ b/fs/xfs/xfs_iomap.c
@@ -390,7 +390,7 @@ xfs_iomap_prealloc_size(
 	if (offset + count <= XFS_ISIZE(ip))
 		return 0;
 
-	if (!(mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) &&
+	if (!(mp->m_flags & XFS_MOUNT_ALLOCSIZE) &&
 	    (XFS_ISIZE(ip) < XFS_FSB_TO_B(mp, mp->m_allocsize_blocks)))
 		return 0;
 
@@ -398,7 +398,7 @@ xfs_iomap_prealloc_size(
 	 * If an explicit allocsize is set, the file is small, or we
 	 * are writing behind a hole, then use the minimum prealloc:
 	 */
-	if ((mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) ||
+	if ((mp->m_flags & XFS_MOUNT_ALLOCSIZE) ||
 	    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)
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index 382d72769470..9e1f89cdcc82 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -513,7 +513,7 @@ xfs_stat_blksize(
 	if (!(mp->m_flags & XFS_MOUNT_COMPAT_IOSIZE)) {
 		if (mp->m_swidth)
 			return mp->m_swidth << mp->m_sb.sb_blocklog;
-		if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
+		if (mp->m_flags & XFS_MOUNT_ALLOCSIZE)
 			return 1U << mp->m_allocsize_log;
 	}
 
diff --git a/fs/xfs/xfs_mount.h b/fs/xfs/xfs_mount.h
index 712dbb2039cd..e5c364f1605e 100644
--- a/fs/xfs/xfs_mount.h
+++ b/fs/xfs/xfs_mount.h
@@ -227,7 +227,7 @@ typedef struct xfs_mount {
 #define XFS_MOUNT_ATTR2		(1ULL << 8)	/* allow use of attr2 format */
 #define XFS_MOUNT_GRPID		(1ULL << 9)	/* group-ID assigned from directory */
 #define XFS_MOUNT_NORECOVERY	(1ULL << 10)	/* no recovery - dirty fs */
-#define XFS_MOUNT_DFLT_IOSIZE	(1ULL << 12)	/* set default i/o size */
+#define XFS_MOUNT_ALLOCSIZE	(1ULL << 12)	/* specified allocation size */
 #define XFS_MOUNT_SMALL_INUMS	(1ULL << 14)	/* user wants 32bit inodes */
 #define XFS_MOUNT_32BITINODES	(1ULL << 15)	/* inode32 allocator active */
 #define XFS_MOUNT_NOUUID	(1ULL << 16)	/* ignore uuid during mount */
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 3e5002d2a79e..a7d89b87ed22 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -228,7 +228,7 @@ xfs_parseargs(
 			if (suffix_kstrtoint(args, 10, &size))
 				return -EINVAL;
 			mp->m_allocsize_log = ffs(size) - 1;
-			mp->m_flags |= XFS_MOUNT_DFLT_IOSIZE;
+			mp->m_flags |= XFS_MOUNT_ALLOCSIZE;
 			break;
 		case Opt_grpid:
 		case Opt_bsdgroups:
@@ -396,7 +396,7 @@ xfs_parseargs(
 		return -EINVAL;
 	}
 
-	if ((mp->m_flags & XFS_MOUNT_DFLT_IOSIZE) &&
+	if ((mp->m_flags & XFS_MOUNT_ALLOCSIZE) &&
 	    (mp->m_allocsize_log > XFS_MAX_IO_LOG ||
 	     mp->m_allocsize_log < XFS_MIN_IO_LOG)) {
 		xfs_warn(mp, "invalid log iosize: %d [not %d-%d]",
@@ -450,7 +450,7 @@ xfs_showargs(
 			seq_puts(m, xfs_infop->str);
 	}
 
-	if (mp->m_flags & XFS_MOUNT_DFLT_IOSIZE)
+	if (mp->m_flags & XFS_MOUNT_ALLOCSIZE)
 		seq_printf(m, ",allocsize=%dk",
 				(int)(1 << mp->m_allocsize_log) >> 10);
 
-- 
2.20.1


  parent reply	other threads:[~2019-10-27 14:56 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
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 ` Christoph Hellwig [this message]
2019-10-28 17:12   ` [PATCH 08/12] xfs: rename the XFS_MOUNT_DFLT_IOSIZE option to XFS_MOUNT_ALLOCISZE 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=20191027145547.25157-9-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.