@@ -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 {
@@ -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);
@@ -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.
@@ -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",
@@ -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
*/