Whamcloud - gitweb
LU-12616 obclass: fix MDS start/stop race
[fs/lustre-release.git] / lustre / osp / osp_precreate.c
index db6851e..b806159 100644 (file)
@@ -625,15 +625,9 @@ static int osp_precreate_send(const struct lu_env *env, struct osp_device *d)
 
        *fid = d->opd_pre_last_created_fid;
        rc = osp_precreate_fids(env, d, fid, &grow);
-       if (rc == 1) {
+       if (rc == 1)
                /* Current seq has been used up*/
-               if (!osp_is_fid_client(d)) {
-                       osp_pre_update_status(d, -ENOSPC);
-                       rc = -ENOSPC;
-               }
-               wake_up(&d->opd_pre_waitq);
-               GOTO(out_req, rc);
-       }
+               GOTO(out_req, rc = -ENOSPC);
 
        if (!osp_is_fid_client(d)) {
                /* Non-FID client will always send seq 0 because of
@@ -1014,6 +1008,13 @@ void osp_pre_update_status(struct osp_device *d, int rc)
                else if (msfs->os_ffree > 64)
                        msfs->os_state &= ~OS_STATE_ENOINO;
 
+               CDEBUG(D_INFO, "%s: status: %llu blocks, %llu "
+                      "free, %llu avail, %llu MB avail, %u "
+                      "hwm -> %d: rc = %d\n",
+                      d->opd_obd->obd_name, msfs->os_blocks,
+                      msfs->os_bfree, msfs->os_bavail,
+                      available, d->opd_reserved_mb_high,
+                      d->opd_pre_status, rc);
                if (available < d->opd_reserved_mb_low)
                        msfs->os_state |= OS_STATE_ENOSPC;
                else if (available > d->opd_reserved_mb_high)
@@ -1251,8 +1252,7 @@ static int osp_precreate_thread(void *_arg)
                         */
                        rc = osp_precreate_cleanup_orphans(&env, d);
                        if (rc != 0) {
-                               schedule_timeout_interruptible(
-                                       msecs_to_jiffies(MSEC_PER_SEC));
+                               schedule_timeout_interruptible(cfs_time_seconds(1));
                                continue;
                        }
                }