if (d->opd_pre)
osp_pre_update_status_msfs(d, msfs, 0);
else
- d->opd_statfs = *msfs;
+ osp_pre_update_msfs(d, msfs);
/* schedule next update */
maxage_ns = d->opd_statfs_maxage * NSEC_PER_SEC;
d->opd_statfs_update_in_progress = 0;
sfs = &d->opd_statfs;
- CDEBUG(D_CACHE, "%s (%p): %llu blocks, %llu free, %llu avail, "
- "%u bsize, %u reserved mb low, %u reserved mb high,"
- "%llu files, %llu free files\n", d->opd_obd->obd_name, d,
- sfs->os_blocks, sfs->os_bfree, sfs->os_bavail, sfs->os_bsize,
- d->opd_reserved_mb_low, d->opd_reserved_mb_high,
- sfs->os_files, sfs->os_ffree);
+ CDEBUG(D_CACHE,
+ "%s (%p): %llu blocks, %llu free, %llu avail, %u bsize, %u reserved mb low, %u reserved mb high, %u reserved ino low, %u reserved ino high, %llu files, %llu free files %#x\n",
+ d->opd_obd->obd_name, d, sfs->os_blocks, sfs->os_bfree,
+ sfs->os_bavail, sfs->os_bsize, d->opd_reserved_mb_low,
+ d->opd_reserved_mb_high, d->opd_reserved_ino_low,
+ d->opd_reserved_ino_high, sfs->os_files, sfs->os_ffree,
+ sfs->os_state);
RETURN(0);
out:
if (unlikely(d->opd_reserved_ino_high == 0 &&
d->opd_reserved_ino_low == 0)) {
- /* Use ~0.1% by default to disallow distributed transactions,
- * and ~0.2% to allow, set both watermark
+ /* Use ~0.0001% by default to disallow distributed transactions,
+ * and ~0.0002% to allow, set both watermark
*/
spin_lock(&d->opd_pre_lock);
if (d->opd_reserved_ino_high == 0 &&
d->opd_obd->obd_name, msfs->os_blocks, msfs->os_bfree,
msfs->os_bavail, available_mb, d->opd_reserved_mb_high,
msfs->os_files, msfs->os_ffree, msfs->os_state,
- d->opd_pre_status);
+ d->opd_pre ? d->opd_pre_status : 0);
+
+ if (!d->opd_pre)
+ goto update;
if (msfs->os_state & (OS_STATFS_ENOINO | OS_STATFS_ENOSPC)) {
d->opd_pre_status = -ENOSPC;
msfs->os_state |= OS_STATFS_NOPRECREATE;
/* else don't clear flags in new msfs->os_state sent from OST */
+update:
/* copy only new statfs state to make it visible to MDS threads */
if (&d->opd_statfs != msfs)
d->opd_statfs = *msfs;