From: James Simmons <jsimmons@infradead.org>
To: lustre-devel@lists.lustre.org
Subject: [lustre-devel] [PATCH 18/20] lustre: obd: Rename OS_STATE flags to OS_STATFS
Date: Sat, 13 Jun 2020 12:27:14 -0400 [thread overview]
Message-ID: <1592065636-28333-19-git-send-email-jsimmons@infradead.org> (raw)
In-Reply-To: <1592065636-28333-1-git-send-email-jsimmons@infradead.org>
From: Patrick Farrell <pfarrell@whamcloud.com>
The statfs state flags are oddly named "OS_STATE_[STATE]"
Rename them to "OS_STATFS_[STATE]" to make their role clearer
and make them easier to find.
WC-bug-id: https://jira.whamcloud.com/browse/LU-11963
Lustre-commit: 9be2db987767a ("LU-11963 obd: Rename OS_STATE flags to OS_STATFS")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/34289
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Patrick Farrell <farr0186@gmail.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
---
fs/lustre/include/obd_class.h | 4 ++--
fs/lustre/llite/llite_lib.c | 2 +-
fs/lustre/lmv/lmv_obd.c | 2 +-
fs/lustre/ptlrpc/wiretest.c | 28 ++++++++++++++--------------
include/uapi/linux/lustre/lustre_user.h | 20 ++++++++++----------
5 files changed, 28 insertions(+), 28 deletions(-)
diff --git a/fs/lustre/include/obd_class.h b/fs/lustre/include/obd_class.h
index be73a165..746782b 100644
--- a/fs/lustre/include/obd_class.h
+++ b/fs/lustre/include/obd_class.h
@@ -942,14 +942,14 @@ static inline int obd_statfs(const struct lu_env *env, struct obd_export *exp,
obd->obd_name, obd->obd_osfs_age, max_age);
/* ignore cache if aggregated isn't expected */
if (obd->obd_osfs_age < max_age ||
- ((obd->obd_osfs.os_state & OS_STATE_SUM) &&
+ ((obd->obd_osfs.os_state & OS_STATFS_SUM) &&
!(flags & OBD_STATFS_SUM))) {
/* the RPC will block anyway, so avoid sending many at once */
rc = mutex_lock_interruptible(&obd->obd_dev_mutex);
if (rc)
return rc;
if (obd->obd_osfs_age < max_age ||
- ((obd->obd_osfs.os_state & OS_STATE_SUM) &&
+ ((obd->obd_osfs.os_state & OS_STATFS_SUM) &&
!(flags & OBD_STATFS_SUM))) {
rc = OBP(obd, statfs)(env, exp, osfs, max_age, flags);
} else {
diff --git a/fs/lustre/llite/llite_lib.c b/fs/lustre/llite/llite_lib.c
index 6cd9f7e..aad19a2 100644
--- a/fs/lustre/llite/llite_lib.c
+++ b/fs/lustre/llite/llite_lib.c
@@ -1924,7 +1924,7 @@ int ll_statfs_internal(struct ll_sb_info *sbi, struct obd_statfs *osfs,
osfs->os_bavail, osfs->os_blocks, osfs->os_ffree,
osfs->os_files);
- if (osfs->os_state & OS_STATE_SUM)
+ if (osfs->os_state & OS_STATFS_SUM)
goto out;
rc = obd_statfs(NULL, sbi->ll_dt_exp, &obd_osfs, max_age, flags);
diff --git a/fs/lustre/lmv/lmv_obd.c b/fs/lustre/lmv/lmv_obd.c
index 203a17b..c5f21cd 100644
--- a/fs/lustre/lmv/lmv_obd.c
+++ b/fs/lustre/lmv/lmv_obd.c
@@ -1255,7 +1255,7 @@ static int lmv_statfs(const struct lu_env *env, struct obd_export *exp,
goto out_free_temp;
}
- if (temp->os_state & OS_STATE_SUM ||
+ if (temp->os_state & OS_STATFS_SUM ||
flags == OBD_STATFS_FOR_MDT0) {
/* Reset to the last aggregated values
* and don't sum with non-aggrated data.
diff --git a/fs/lustre/ptlrpc/wiretest.c b/fs/lustre/ptlrpc/wiretest.c
index 719d73b..74a4e940 100644
--- a/fs/lustre/ptlrpc/wiretest.c
+++ b/fs/lustre/ptlrpc/wiretest.c
@@ -1851,20 +1851,20 @@ void lustre_assert_wire_constants(void)
(long long)(int)offsetof(struct obd_statfs, os_spare9));
LASSERTF((int)sizeof(((struct obd_statfs *)0)->os_spare9) == 4, "found %lld\n",
(long long)(int)sizeof(((struct obd_statfs *)0)->os_spare9));
- LASSERTF(OS_STATE_DEGRADED == 0x00000001UL, "found %lld\n",
- (long long)OS_STATE_DEGRADED);
- LASSERTF(OS_STATE_READONLY == 0x00000002UL, "found %lld\n",
- (long long)OS_STATE_READONLY);
- LASSERTF(OS_STATE_NOPRECREATE == 0x00000004UL, "found %lld\n",
- (long long)OS_STATE_NOPRECREATE);
- LASSERTF(OS_STATE_ENOSPC == 0x00000020UL, "found %lld\n",
- (long long)OS_STATE_ENOSPC);
- LASSERTF(OS_STATE_ENOINO == 0x00000040UL, "found %lld\n",
- (long long)OS_STATE_ENOINO);
- LASSERTF(OS_STATE_SUM == 0x00000100UL, "found %lld\n",
- (long long)OS_STATE_SUM);
- LASSERTF(OS_STATE_NONROT == 0x00000200UL, "found %lld\n",
- (long long)OS_STATE_NONROT);
+ LASSERTF(OS_STATFS_DEGRADED == 0x00000001UL, "found %lld\n",
+ (long long)OS_STATFS_DEGRADED);
+ LASSERTF(OS_STATFS_READONLY == 0x00000002UL, "found %lld\n",
+ (long long)OS_STATFS_READONLY);
+ LASSERTF(OS_STATFS_NOPRECREATE == 0x00000004UL, "found %lld\n",
+ (long long)OS_STATFS_NOPRECREATE);
+ LASSERTF(OS_STATFS_ENOSPC == 0x00000020UL, "found %lld\n",
+ (long long)OS_STATFS_ENOSPC);
+ LASSERTF(OS_STATFS_ENOINO == 0x00000040UL, "found %lld\n",
+ (long long)OS_STATFS_ENOINO);
+ LASSERTF(OS_STATFS_SUM == 0x00000100UL, "found %lld\n",
+ (long long)OS_STATFS_SUM);
+ LASSERTF(OS_STATFS_NONROT == 0x00000200UL, "found %lld\n",
+ (long long)OS_STATFS_NONROT);
/* Checks for struct obd_ioobj */
LASSERTF((int)sizeof(struct obd_ioobj) == 24, "found %lld\n",
diff --git a/include/uapi/linux/lustre/lustre_user.h b/include/uapi/linux/lustre/lustre_user.h
index 004d373..121c064 100644
--- a/include/uapi/linux/lustre/lustre_user.h
+++ b/include/uapi/linux/lustre/lustre_user.h
@@ -105,15 +105,15 @@
#define LUSTRE_FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_DEVICE_ORDER)
enum obd_statfs_state {
- OS_STATE_DEGRADED = 0x00000001, /**< RAID degraded/rebuilding */
- OS_STATE_READONLY = 0x00000002, /**< filesystem is read-only */
- OS_STATE_NOPRECREATE = 0x00000004, /**< no object precreation */
- OS_STATE_UNUSED1 = 0x00000008, /**< obsolete 1.6, was EROFS=30 */
- OS_STATE_UNUSED2 = 0x00000010, /**< obsolete 1.6, was EROFS=30 */
- OS_STATE_ENOSPC = 0x00000020, /**< not enough free space */
- OS_STATE_ENOINO = 0x00000040, /**< not enough inodes */
- OS_STATE_SUM = 0x00000100, /**< aggregated for all tagrets */
- OS_STATE_NONROT = 0x00000200, /**< non-rotational device */
+ OS_STATFS_DEGRADED = 0x00000001, /**< RAID degraded/rebuilding */
+ OS_STATFS_READONLY = 0x00000002, /**< filesystem is read-only */
+ OS_STATFS_NOPRECREATE = 0x00000004, /**< no object precreation */
+ OS_STATFS_UNUSED1 = 0x00000008, /**< obsolete 1.6, was EROFS=30 */
+ OS_STATFS_UNUSED2 = 0x00000010, /**< obsolete 1.6, was EROFS=30 */
+ OS_STATFS_ENOSPC = 0x00000020, /**< not enough free space */
+ OS_STATFS_ENOINO = 0x00000040, /**< not enough inodes */
+ OS_STATFS_SUM = 0x00000100, /**< aggregated for all tagrets */
+ OS_STATFS_NONROT = 0x00000200, /**< non-rotational device */
};
struct obd_statfs {
@@ -127,7 +127,7 @@ struct obd_statfs {
__u32 os_bsize; /* block size in bytes for os_blocks */
__u32 os_namelen; /* maximum length of filename in bytes*/
__u64 os_maxbytes; /* maximum object size in bytes */
- __u32 os_state; /**< obd_statfs_state OS_STATE_* flag */
+ __u32 os_state; /**< obd_statfs_state OS_STATFS_* flag */
__u32 os_fprecreated; /* objs available now to the caller
* used in QoS code to find preferred OSTs
*/
--
1.8.3.1
next prev parent reply other threads:[~2020-06-13 16:27 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-13 16:26 [lustre-devel] [PATCH 00/20] lustre: patches landed for week of June 8 2020 James Simmons
2020-06-13 16:26 ` [lustre-devel] [PATCH 01/20] lnet: fix kmalloc size in config.c James Simmons
2020-06-13 16:26 ` [lustre-devel] [PATCH 02/20] lnet: test against LNET_STATE_RUNNING rather than LNET_STATE_SHUTDOWN James Simmons
2020-06-13 16:26 ` [lustre-devel] [PATCH 03/20] lnet: use lnet_md_free in lnet_res_container_cleanup() James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 04/20] lustre: obdclass: discard process_quota_config James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 05/20] lnet: socklnd: remove comments about "darwin" James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 06/20] lustre: uapi: change LUSTRE_*_FL defines to enum James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 07/20] lustre: SEL: Add flag & setstripe support James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 08/20] lustre: lmv: check stripe FID sanity James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 09/20] lustre: ptlrpc: Clear bd_registered in ptlrpc_unregister_bulk James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 10/20] lustre: dne: directory restripe and auto split James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 11/20] lustre: sec: documentation for client-side encryption James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 12/20] lustre: sec: enable client side encryption James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 13/20] lustre: ptlrpc: separate number MD and refrences for bulk James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 14/20] lustre: ptlrpc: fill md correctly James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 15/20] lustre: llite: don't check mirror info for page discard James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 16/20] lustre: sec: control client side encryption James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 17/20] lnet: fix uninitialize var in choose_ipv4_src() James Simmons
2020-06-13 16:27 ` James Simmons [this message]
2020-06-13 16:27 ` [lustre-devel] [PATCH 19/20] lustre: mdc: allow setting max_mod_rpcs_in_flight larger James Simmons
2020-06-13 16:27 ` [lustre-devel] [PATCH 20/20] lnet: o2iblnd: 'Timed out tx' error message James Simmons
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=1592065636-28333-19-git-send-email-jsimmons@infradead.org \
--to=jsimmons@infradead.org \
--cc=lustre-devel@lists.lustre.org \
/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;
as well as URLs for NNTP newsgroup(s).