msfs->os_bfree, used, msfs->os_bavail,
d->opd_pre_status, rc);
CDEBUG(D_INFO,
- "non-committed changes: %lu, in progress: %u\n",
- d->opd_syn_changes, d->opd_syn_rpc_in_progress);
+ "non-committed changes: %u, in progress: %u\n",
+ atomic_read(&d->opd_syn_changes),
+ atomic_read(&d->opd_syn_rpc_in_progress));
} else if (old == -ENOSPC) {
d->opd_pre_status = 0;
spin_lock(&d->opd_pre_lock);
return 1;
/* ready if OST reported no space and no destroys in progress */
- if (d->opd_syn_changes + d->opd_syn_rpc_in_progress == 0 &&
+ if (atomic_read(&d->opd_syn_changes) +
+ atomic_read(&d->opd_syn_rpc_in_progress) == 0 &&
d->opd_pre_status == -ENOSPC)
return 1;
struct osp_device *d = data;
CDEBUG(D_HA, "%s: slow creates, last="DFID", next="DFID", "
- "reserved="LPU64", syn_changes=%lu, "
+ "reserved="LPU64", syn_changes=%u, "
"syn_rpc_in_progress=%d, status=%d\n",
d->opd_obd->obd_name, PFID(&d->opd_pre_last_created_fid),
PFID(&d->opd_pre_used_fid), d->opd_pre_reserved,
- d->opd_syn_changes, d->opd_syn_rpc_in_progress,
+ atomic_read(&d->opd_syn_changes),
+ atomic_read(&d->opd_syn_rpc_in_progress),
d->opd_pre_status);
return 1;
* wait till that is done - some space might be released
*/
if (unlikely(rc == -ENOSPC)) {
- if (d->opd_syn_changes) {
+ if (atomic_read(&d->opd_syn_changes)) {
/* force local commit to release space */
dt_commit_async(env, d->opd_storage);
}
- if (d->opd_syn_rpc_in_progress) {
+ if (atomic_read(&d->opd_syn_rpc_in_progress)) {
/* just wait till destroys are done */
/* see l_wait_even() few lines below */
}
- if (d->opd_syn_changes +
- d->opd_syn_rpc_in_progress == 0) {
+ if (atomic_read(&d->opd_syn_changes) +
+ atomic_read(&d->opd_syn_rpc_in_progress) == 0) {
/* no hope for free space */
break;
}