Whamcloud - gitweb
LU-8695 target: use -1 as an offset to declare write 82/23082/3
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Tue, 11 Oct 2016 16:15:38 +0000 (19:15 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 25 Oct 2016 02:24:07 +0000 (02:24 +0000)
at the end of recovery or filesystem setup the number of clients
may increase significantly. this can lead to underestimated space
or credits reserved.

Change-Id: Id4f3755dc481f8a29a1a2a673c26d64d12f7dbf0
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/23082
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/target/tgt_lastrcvd.c

index cfcf18c..ac6841a 100644 (file)
@@ -1741,13 +1741,10 @@ int tgt_txn_start_cb(const struct lu_env *env, struct thandle *th,
                 * because a replay slot has not been assigned.  This should be
                 * replaced by dmu_tx_hold_append() when available.
                 */
                 * because a replay slot has not been assigned.  This should be
                 * replaced by dmu_tx_hold_append() when available.
                 */
-               tti->tti_off = atomic_read(&tgt->lut_num_clients) * 8 *
-                               sizeof(struct lsd_reply_data);
                tti->tti_buf.lb_buf = NULL;
                tti->tti_buf.lb_len = sizeof(struct lsd_reply_data);
                dto = dt_object_locate(tgt->lut_reply_data, th->th_dev);
                tti->tti_buf.lb_buf = NULL;
                tti->tti_buf.lb_len = sizeof(struct lsd_reply_data);
                dto = dt_object_locate(tgt->lut_reply_data, th->th_dev);
-               rc = dt_declare_record_write(env, dto, &tti->tti_buf,
-                                            tti->tti_off, th);
+               rc = dt_declare_record_write(env, dto, &tti->tti_buf, -1, th);
                if (rc)
                        return rc;
        } else {
                if (rc)
                        return rc;
        } else {