From 9be2db987767a64fdcc20cbf31c37e59a954913c Mon Sep 17 00:00:00 2001 From: Patrick Farrell Date: Wed, 27 Feb 2019 16:31:11 -0500 Subject: [PATCH] LU-11963 obd: Rename OS_STATE flags to OS_STATFS 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. Test-Parameters: trivial Signed-off-by: Patrick Farrell Change-Id: I3f43b3e73155d9fbd8b3e0fa52e7f4d26b9d2f89 Reviewed-on: https://review.whamcloud.com/34289 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Andreas Dilger Reviewed-by: Patrick Farrell --- contrib/scripts/spelling.txt | 7 +++++++ lustre/include/obd_class.h | 4 ++-- lustre/include/uapi/linux/lustre/lustre_user.h | 20 +++++++++--------- lustre/llite/llite_lib.c | 2 +- lustre/lmv/lmv_obd.c | 2 +- lustre/lod/lod_dev.c | 2 +- lustre/lod/lod_object.c | 10 ++++----- lustre/lod/lod_qos.c | 16 +++++++-------- lustre/ofd/ofd_obd.c | 10 ++++----- lustre/osd-ldiskfs/osd_handler.c | 4 ++-- lustre/osd-zfs/osd_handler.c | 4 ++-- lustre/osp/osp_precreate.c | 16 +++++++-------- lustre/ptlrpc/wiretest.c | 28 +++++++++++++------------- lustre/utils/lfs.c | 18 ++++++++--------- lustre/utils/wirecheck.c | 14 ++++++------- lustre/utils/wiretest.c | 28 +++++++++++++------------- 16 files changed, 96 insertions(+), 89 deletions(-) diff --git a/contrib/scripts/spelling.txt b/contrib/scripts/spelling.txt index 61ce449..e678613 100644 --- a/contrib/scripts/spelling.txt +++ b/contrib/scripts/spelling.txt @@ -155,6 +155,13 @@ l_wait_condition||wait_event_idle \bMIN\(||min_t mdo2fid||mdd_object_fid mktemp||mkstemp +OS_STATE_DEGRADED||OS_STATFS_DEGRADED +OS_STATE_READONLY||OS_STATFS_READONLY +OS_STATE_NOPRECREATE||OS_STATFS_NOPRECREATE +OS_STATE_ENOSPC||OS_STATFS_ENOSPC +OS_STATE_ENOINO||OS_STATFS_ENOINO +OS_STATE_SUM||OS_STATFS_SUM +OS_STATE_NONROT||OS_STATFS_NONROT page_cache_get||get_page PAGE_CACHE_MASK||PAGE_MASK page_cache_release||put_page diff --git a/lustre/include/obd_class.h b/lustre/include/obd_class.h index a9222b4..2f2c7c0 100644 --- a/lustre/include/obd_class.h +++ b/lustre/include/obd_class.h @@ -1060,14 +1060,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/lustre/include/uapi/linux/lustre/lustre_user.h b/lustre/include/uapi/linux/lustre/lustre_user.h index 291c70e..25ff63c 100644 --- a/lustre/include/uapi/linux/lustre/lustre_user.h +++ b/lustre/include/uapi/linux/lustre/lustre_user.h @@ -257,15 +257,15 @@ typedef struct statx lstatx_t; #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 */ }; /** filesystem statistics/attributes for target device */ @@ -280,7 +280,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_* */ __u32 os_fprecreated; /* objs available now to the caller */ /* used in QoS code to find preferred * OSTs */ diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 13ee0b2..49fa5c0 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1996,7 +1996,7 @@ int ll_statfs_internal(struct ll_sb_info *sbi, struct obd_statfs *osfs, CDEBUG(D_SUPER, "MDC blocks %llu/%llu objects %llu/%llu\n", 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); rc = obd_statfs(NULL, sbi->ll_dt_exp, &obd_osfs, max_age, flags); diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index 3a2db46..f5d4ecf 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -1263,7 +1263,7 @@ static int lmv_statfs(const struct lu_env *env, struct obd_export *exp, GOTO(out_free_temp, rc); } - 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/lustre/lod/lod_dev.c b/lustre/lod/lod_dev.c index d6406c9..6ec7826 100644 --- a/lustre/lod/lod_dev.c +++ b/lustre/lod/lod_dev.c @@ -1396,7 +1396,7 @@ static int lod_statfs(const struct lu_env *env, struct dt_device *dev, (int)sfs->os_bsize, (int)ost_sfs.os_bsize); } lod_putref(lod, &lod->lod_ost_descs); - sfs->os_state |= OS_STATE_SUM; + sfs->os_state |= OS_STATFS_SUM; /* If we have _some_ OSTs, but don't have as many free objects on the * OSTs as inodes on the MDTs, reduce the reported number of inodes diff --git a/lustre/lod/lod_object.c b/lustre/lod/lod_object.c index 164cf24..867fb36 100644 --- a/lustre/lod/lod_object.c +++ b/lustre/lod/lod_object.c @@ -6408,9 +6408,9 @@ static bool lod_sel_osts_allowed(const struct lu_env *env, break; } - if (sfs->os_state & OS_STATE_ENOSPC || - sfs->os_state & OS_STATE_READONLY || - sfs->os_state & OS_STATE_DEGRADED) { + if (sfs->os_state & OS_STATFS_ENOSPC || + sfs->os_state & OS_STATFS_READONLY || + sfs->os_state & OS_STATFS_DEGRADED) { CDEBUG(D_LAYOUT, "ost %d is not availble for SEL " "extension, state %u\n", index, sfs->os_state); ret = false; @@ -7097,8 +7097,8 @@ static inline int lod_check_ost_avail(const struct lu_env *env, ost = OST_TGT(lod, idx); if (ost->ltd_statfs.os_state & - (OS_STATE_READONLY | OS_STATE_ENOSPC | OS_STATE_ENOINO | - OS_STATE_NOPRECREATE) || + (OS_STATFS_READONLY | OS_STATFS_ENOSPC | OS_STATFS_ENOINO | + OS_STATFS_NOPRECREATE) || ost->ltd_active == 0) { CDEBUG(D_LAYOUT, DFID ": mirror %d OST%d unavail, rc = %d\n", PFID(lod_object_fid(lo)), index, idx, rc); diff --git a/lustre/lod/lod_qos.c b/lustre/lod/lod_qos.c index b4f9f05..509b0df 100644 --- a/lustre/lod/lod_qos.c +++ b/lustre/lod/lod_qos.c @@ -65,17 +65,17 @@ static inline int lod_statfs_check(struct lu_tgt_descs *ltd, { struct obd_statfs *sfs = &tgt->ltd_statfs; - if (((sfs->os_state & OS_STATE_ENOSPC) || - (!ltd->ltd_is_mdt && sfs->os_state & OS_STATE_ENOINO && + if (((sfs->os_state & OS_STATFS_ENOSPC) || + (!ltd->ltd_is_mdt && sfs->os_state & OS_STATFS_ENOINO && sfs->os_fprecreated == 0))) return -ENOSPC; /* If the OST is readonly then we can't allocate objects there */ - if (sfs->os_state & OS_STATE_READONLY) + if (sfs->os_state & OS_STATFS_READONLY) return -EROFS; /* object precreation is skipped on the OST with max_create_count=0 */ - if (!ltd->ltd_is_mdt && sfs->os_state & OS_STATE_NOPRECREATE) + if (!ltd->ltd_is_mdt && sfs->os_state & OS_STATFS_NOPRECREATE) return -ENOBUFS; return 0; @@ -642,7 +642,7 @@ static int lod_check_and_reserve_ost(const struct lu_env *env, /* * try to use another OSP if this one is degraded */ - if (ost->ltd_statfs.os_state & OS_STATE_DEGRADED && speed < 2) { + if (ost->ltd_statfs.os_state & OS_STATFS_DEGRADED && speed < 2) { QOS_DEBUG("#%d: degraded\n", ost_idx); RETURN(rc); } @@ -1008,7 +1008,7 @@ repeat_find: } /* try to use another OSP if this one is degraded */ - if (mdt->ltd_statfs.os_state & OS_STATE_DEGRADED && + if (mdt->ltd_statfs.os_state & OS_STATFS_DEGRADED && !use_degraded) { QOS_DEBUG("#%d: degraded\n", mdt_idx); continue; @@ -1470,7 +1470,7 @@ static int lod_ost_alloc_qos(const struct lu_env *env, struct lod_object *lo, continue; } - if (ost->ltd_statfs.os_state & OS_STATE_DEGRADED) + if (ost->ltd_statfs.os_state & OS_STATFS_DEGRADED) continue; /* Fail Check before osc_precreate() is called @@ -1712,7 +1712,7 @@ int lod_mdt_alloc_qos(const struct lu_env *env, struct lod_object *lo, if (rc) continue; - if (mdt->ltd_statfs.os_state & OS_STATE_DEGRADED) + if (mdt->ltd_statfs.os_state & OS_STATFS_DEGRADED) continue; mdt->ltd_qos.ltq_usable = 1; diff --git a/lustre/ofd/ofd_obd.c b/lustre/ofd/ofd_obd.c index c59f96b..3c6e518 100644 --- a/lustre/ofd/ofd_obd.c +++ b/lustre/ofd/ofd_obd.c @@ -777,7 +777,7 @@ static int ofd_get_info(const struct lu_env *env, struct obd_export *exp, * \see ofd_statfs_hdl() for request handler function. * * Report also the state of the OST to the caller in osfs->os_state - * (OS_STATE_READONLY, OS_STATE_DEGRADED). + * (OS_STATFS_READONLY, OS_STATFS_DEGRADED). * * \param[in] env execution environment * \param[in] exp OBD export of OFD device @@ -845,12 +845,12 @@ int ofd_statfs(const struct lu_env *env, struct obd_export *exp, osfs->os_ffree -= osfs->os_ffree; } - /* OS_STATE_READONLY can be set by OSD already */ + /* OS_STATFS_READONLY can be set by OSD already */ if (ofd->ofd_raid_degraded) - osfs->os_state |= OS_STATE_DEGRADED; + osfs->os_state |= OS_STATFS_DEGRADED; if (ofd->ofd_no_precreate) - osfs->os_state |= OS_STATE_NOPRECREATE; + osfs->os_state |= OS_STATFS_NOPRECREATE; if (obd->obd_self_export != exp && !exp_grant_param_supp(exp) && tgd->tgd_blockbits > COMPAT_BSIZE_SHIFT) { @@ -1444,7 +1444,7 @@ static int ofd_health_check(const struct lu_env *nul, struct obd_device *obd) if (unlikely(rc)) GOTO(out, rc); - if (info->fti_u.osfs.os_state & OS_STATE_READONLY) + if (info->fti_u.osfs.os_state & OS_STATFS_READONLY) GOTO(out, rc = -EROFS); #ifdef USE_HEALTH_CHECK_WRITE diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index 88f35766..84df699 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -2210,9 +2210,9 @@ int osd_statfs(const struct lu_env *env, struct dt_device *d, statfs_pack(sfs, ksfs); if (unlikely(sb->s_flags & SB_RDONLY)) - sfs->os_state |= OS_STATE_READONLY; + sfs->os_state |= OS_STATFS_READONLY; - sfs->os_state |= osd->od_nonrotational ? OS_STATE_NONROT : 0; + sfs->os_state |= osd->od_nonrotational ? OS_STATFS_NONROT : 0; if (ldiskfs_has_feature_extents(sb)) sfs->os_maxbytes = sb->s_maxbytes; diff --git a/lustre/osd-zfs/osd_handler.c b/lustre/osd-zfs/osd_handler.c index 833401e..92355fc 100644 --- a/lustre/osd-zfs/osd_handler.c +++ b/lustre/osd-zfs/osd_handler.c @@ -542,7 +542,7 @@ static int osd_objset_statfs(struct osd_device *osd, struct obd_statfs *osfs) if (!spa_writeable(dmu_objset_spa(os)) || osd->od_dev_set_rdonly || osd->od_prop_rdonly) - osfs->os_state |= OS_STATE_READONLY; + osfs->os_state |= OS_STATFS_READONLY; return 0; } @@ -568,7 +568,7 @@ int osd_statfs(const struct lu_env *env, struct dt_device *d, /* ZFS does not support reporting nonrotional status yet, so return * flag only if user has set nonrotational. */ - osfs->os_state |= osd->od_nonrotational ? OS_STATE_NONROT : 0; + osfs->os_state |= osd->od_nonrotational ? OS_STATFS_NONROT : 0; RETURN(0); } diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c index 7186b44..4fa55e6 100644 --- a/lustre/osp/osp_precreate.c +++ b/lustre/osp/osp_precreate.c @@ -1025,9 +1025,9 @@ static void osp_pre_update_msfs(struct osp_device *d, struct obd_statfs *msfs) available_mb = (msfs->os_bavail * (msfs->os_bsize >> 10)) >> 10; if (msfs->os_ffree < reserved_ino_low) - msfs->os_state |= OS_STATE_ENOINO; + msfs->os_state |= OS_STATFS_ENOINO; else if (msfs->os_ffree <= reserved_ino_high) - msfs->os_state |= old_state & OS_STATE_ENOINO; + msfs->os_state |= old_state & OS_STATFS_ENOINO; /* else don't clear flags in new msfs->os_state sent from OST */ CDEBUG(D_INFO, @@ -1037,21 +1037,21 @@ static void osp_pre_update_msfs(struct osp_device *d, struct obd_statfs *msfs) msfs->os_files, msfs->os_ffree, msfs->os_state, d->opd_pre_status); if (available_mb < d->opd_reserved_mb_low) - msfs->os_state |= OS_STATE_ENOSPC; + msfs->os_state |= OS_STATFS_ENOSPC; else if (available_mb <= d->opd_reserved_mb_high) - msfs->os_state |= old_state & OS_STATE_ENOSPC; + msfs->os_state |= old_state & OS_STATFS_ENOSPC; /* else don't clear flags in new msfs->os_state sent from OST */ - if (msfs->os_state & (OS_STATE_ENOINO | OS_STATE_ENOSPC)) { + if (msfs->os_state & (OS_STATFS_ENOINO | OS_STATFS_ENOSPC)) { d->opd_pre_status = -ENOSPC; - if (!(old_state & (OS_STATE_ENOINO | OS_STATE_ENOSPC))) + if (!(old_state & (OS_STATFS_ENOINO | OS_STATFS_ENOSPC))) CDEBUG(D_INFO, "%s: full: state=%x: rc = %x\n", d->opd_obd->obd_name, msfs->os_state, d->opd_pre_status); CDEBUG(D_INFO, "uncommitted changes=%u in_progress=%u\n", atomic_read(&d->opd_sync_changes), atomic_read(&d->opd_sync_rpcs_in_progress)); - } else if (old_state & (OS_STATE_ENOINO | OS_STATE_ENOSPC)) { + } else if (old_state & (OS_STATFS_ENOINO | OS_STATFS_ENOSPC)) { d->opd_pre_status = 0; spin_lock(&d->opd_pre_lock); d->opd_pre_create_slow = 0; @@ -1070,7 +1070,7 @@ static void osp_pre_update_msfs(struct osp_device *d, struct obd_statfs *msfs) /* Object precreation skipped on OST if manually disabled */ if (d->opd_pre_max_create_count == 0) - msfs->os_state |= OS_STATE_NOPRECREATE; + msfs->os_state |= OS_STATFS_NOPRECREATE; /* else don't clear flags in new msfs->os_state sent from OST */ /* copy only new statfs state to make it visible to MDS threads */ diff --git a/lustre/ptlrpc/wiretest.c b/lustre/ptlrpc/wiretest.c index 50cef04..e31334d 100644 --- a/lustre/ptlrpc/wiretest.c +++ b/lustre/ptlrpc/wiretest.c @@ -1991,20 +1991,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 0x%.8xUL\n", - (unsigned)OS_STATE_DEGRADED); - LASSERTF(OS_STATE_READONLY == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_READONLY); - LASSERTF(OS_STATE_NOPRECREATE == 0x00000004UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_NOPRECREATE); - LASSERTF(OS_STATE_ENOSPC == 0x00000020UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_ENOSPC); - LASSERTF(OS_STATE_ENOINO == 0x00000040UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_ENOINO); - LASSERTF(OS_STATE_SUM == 0x00000100UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_SUM); - LASSERTF(OS_STATE_NONROT == 0x00000200UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_NONROT); + LASSERTF(OS_STATFS_DEGRADED == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_DEGRADED); + LASSERTF(OS_STATFS_READONLY == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_READONLY); + LASSERTF(OS_STATFS_NOPRECREATE == 0x00000004UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_NOPRECREATE); + LASSERTF(OS_STATFS_ENOSPC == 0x00000020UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_ENOSPC); + LASSERTF(OS_STATFS_ENOINO == 0x00000040UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_ENOINO); + LASSERTF(OS_STATFS_SUM == 0x00000100UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_SUM); + LASSERTF(OS_STATFS_NONROT == 0x00000200UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_NONROT); /* Checks for struct obd_ioobj */ LASSERTF((int)sizeof(struct obd_ioobj) == 24, "found %lld\n", diff --git a/lustre/utils/lfs.c b/lustre/utils/lfs.c index 8b512ca..f86e4cb 100644 --- a/lustre/utils/lfs.c +++ b/lustre/utils/lfs.c @@ -5644,15 +5644,15 @@ static struct obd_statfs_state_names { const char osn_name; bool osn_err; } oss_names[] = { - { .osn_state = OS_STATE_DEGRADED, .osn_name = 'D', .osn_err = true }, - { .osn_state = OS_STATE_READONLY, .osn_name = 'R', .osn_err = true }, - { .osn_state = OS_STATE_NOPRECREATE, .osn_name = 'N', .osn_err = true }, - { .osn_state = OS_STATE_UNUSED1, .osn_name = '?', .osn_err = true }, - { .osn_state = OS_STATE_UNUSED2, .osn_name = '?', .osn_err = true }, - { .osn_state = OS_STATE_ENOSPC, .osn_name = 'S', .osn_err = true }, - { .osn_state = OS_STATE_ENOINO, .osn_name = 'I', .osn_err = true }, - { .osn_state = OS_STATE_SUM, .osn_name = 'a', /* aggregate */ }, - { .osn_state = OS_STATE_NONROT, .osn_name = 'f', /* flash */ }, + { .osn_state = OS_STATFS_DEGRADED, .osn_name = 'D', .osn_err = true }, + { .osn_state = OS_STATFS_READONLY, .osn_name = 'R', .osn_err = true }, + { .osn_state = OS_STATFS_NOPRECREATE,.osn_name = 'N', .osn_err = true }, + { .osn_state = OS_STATFS_UNUSED1, .osn_name = '?', .osn_err = true }, + { .osn_state = OS_STATFS_UNUSED2, .osn_name = '?', .osn_err = true }, + { .osn_state = OS_STATFS_ENOSPC, .osn_name = 'S', .osn_err = true }, + { .osn_state = OS_STATFS_ENOINO, .osn_name = 'I', .osn_err = true }, + { .osn_state = OS_STATFS_SUM, .osn_name = 'a', /* aggregate */ }, + { .osn_state = OS_STATFS_NONROT, .osn_name = 'f', /* flash */ }, }; static int showdf(char *mntdir, struct obd_statfs *stat, diff --git a/lustre/utils/wirecheck.c b/lustre/utils/wirecheck.c index 5f200da..5a282a7 100644 --- a/lustre/utils/wirecheck.c +++ b/lustre/utils/wirecheck.c @@ -911,13 +911,13 @@ check_obd_statfs(void) CHECK_MEMBER(obd_statfs, os_spare8); CHECK_MEMBER(obd_statfs, os_spare9); - CHECK_VALUE_X(OS_STATE_DEGRADED); - CHECK_VALUE_X(OS_STATE_READONLY); - CHECK_VALUE_X(OS_STATE_NOPRECREATE); - CHECK_VALUE_X(OS_STATE_ENOSPC); - CHECK_VALUE_X(OS_STATE_ENOINO); - CHECK_VALUE_X(OS_STATE_SUM); - CHECK_VALUE_X(OS_STATE_NONROT); + CHECK_VALUE_X(OS_STATFS_DEGRADED); + CHECK_VALUE_X(OS_STATFS_READONLY); + CHECK_VALUE_X(OS_STATFS_NOPRECREATE); + CHECK_VALUE_X(OS_STATFS_ENOSPC); + CHECK_VALUE_X(OS_STATFS_ENOINO); + CHECK_VALUE_X(OS_STATFS_SUM); + CHECK_VALUE_X(OS_STATFS_NONROT); } static void diff --git a/lustre/utils/wiretest.c b/lustre/utils/wiretest.c index 6ff30e6..fe7451c 100644 --- a/lustre/utils/wiretest.c +++ b/lustre/utils/wiretest.c @@ -2017,20 +2017,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 0x%.8xUL\n", - (unsigned)OS_STATE_DEGRADED); - LASSERTF(OS_STATE_READONLY == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_READONLY); - LASSERTF(OS_STATE_NOPRECREATE == 0x00000004UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_NOPRECREATE); - LASSERTF(OS_STATE_ENOSPC == 0x00000020UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_ENOSPC); - LASSERTF(OS_STATE_ENOINO == 0x00000040UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_ENOINO); - LASSERTF(OS_STATE_SUM == 0x00000100UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_SUM); - LASSERTF(OS_STATE_NONROT == 0x00000200UL, "found 0x%.8xUL\n", - (unsigned)OS_STATE_NONROT); + LASSERTF(OS_STATFS_DEGRADED == 0x00000001UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_DEGRADED); + LASSERTF(OS_STATFS_READONLY == 0x00000002UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_READONLY); + LASSERTF(OS_STATFS_NOPRECREATE == 0x00000004UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_NOPRECREATE); + LASSERTF(OS_STATFS_ENOSPC == 0x00000020UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_ENOSPC); + LASSERTF(OS_STATFS_ENOINO == 0x00000040UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_ENOINO); + LASSERTF(OS_STATFS_SUM == 0x00000100UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_SUM); + LASSERTF(OS_STATFS_NONROT == 0x00000200UL, "found 0x%.8xUL\n", + (unsigned)OS_STATFS_NONROT); /* Checks for struct obd_ioobj */ LASSERTF((int)sizeof(struct obd_ioobj) == 24, "found %lld\n", -- 1.8.3.1