OS_STATFS_ENOINO = 0x00000040, /**< not enough inodes */
OS_STATFS_SUM = 0x00000100, /**< aggregated for all tagrets */
OS_STATFS_NONROT = 0x00000200, /**< non-rotational device */
+ OS_STATFS_DOWNGRADE = OS_STATFS_DEGRADED | OS_STATFS_READONLY |
+ OS_STATFS_NOCREATE | OS_STATFS_ENOSPC |
+ OS_STATFS_ENOINO,
+ OS_STATFS_UPGRADE = OS_STATFS_NONROT,
};
struct obd_statfs_state_name {
/* do not update MDT os_namelen, OSTs do not store filenames */
/* only update from OST os_maxbytes, DoM files are small */
osfs->os_maxbytes = ost_osfs.os_maxbytes;
+ /* OR failure states, AND performance states */
+ osfs->os_state |= ost_osfs.os_state & ~OS_STATFS_DOWNGRADE;
+ osfs->os_state &= ost_osfs.os_state & OS_STATFS_UPGRADE;
/* 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
{
struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info,
ll_kset.kobj);
+
struct obd_statfs osfs;
int rc;
temp->os_namelen);
osfs->os_maxbytes = min(osfs->os_maxbytes,
temp->os_maxbytes);
+ /* OR failure states, AND performance states */
+ osfs->os_state |= temp->os_state & ~OS_STATFS_DOWNGRADE;
+ osfs->os_state &= temp->os_state & OS_STATFS_UPGRADE;
}
}
/* There is no stats from some MDTs, data incomplete */
#ifdef CONFIG_PROC_FS
obd->obd_vars = lprocfs_lmv_obd_vars;
#endif
- rc = lprocfs_obd_setup(obd, true);
+ rc = lprocfs_obd_setup(obd, false);
if (rc)
goto out_failed;
#ifdef CONFIG_PROC_FS
*
* Currently using the sum capped at U64_MAX.
*/
- osfs->os_files = osfs->os_files + lov_sfs->os_files < osfs->os_files ?
+ osfs->os_files =
+ osfs->os_files + lov_sfs->os_files < osfs->os_files ?
U64_MAX : osfs->os_files + lov_sfs->os_files;
- osfs->os_ffree = osfs->os_ffree + lov_sfs->os_ffree < osfs->os_ffree ?
+ osfs->os_ffree =
+ osfs->os_ffree + lov_sfs->os_ffree < osfs->os_ffree ?
U64_MAX : osfs->os_ffree + lov_sfs->os_ffree;
osfs->os_namelen = min(osfs->os_namelen, lov_sfs->os_namelen);
osfs->os_maxbytes = min(osfs->os_maxbytes,
lov_sfs->os_maxbytes);
+ /* OR failure states, AND performance states */
+ osfs->os_state |= lov_sfs->os_state & ~OS_STATFS_DOWNGRADE;
+ osfs->os_state &= lov_sfs->os_state & OS_STATFS_UPGRADE;
}
}