Whamcloud - gitweb
LU-7408 target: comment as per inspection 78/17578/5
authorAlex Zhuravlev <alexey.zhuravlev@intel.com>
Mon, 14 Dec 2015 15:53:10 +0000 (18:53 +0300)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 6 Apr 2016 01:39:59 +0000 (01:39 +0000)
add a comment as per the original patch's inspection.

Change-Id: I391e5cefa6384f5c2c1c29efc958c9a873a5e7bc
Signed-off-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-on: http://review.whamcloud.com/17578
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
lustre/target/tgt_lastrcvd.c

index bf44695..74e28f8 100644 (file)
@@ -1729,8 +1729,15 @@ int tgt_txn_start_cb(const struct lu_env *env, struct thandle *th,
                return rc;
 
        if (tgt_is_multimodrpcs_client(tsi->tsi_exp)) {
-               tti->tti_off = atomic_read(&tgt->lut_num_clients) * 8
-                               * sizeof(struct lsd_reply_data);
+               /*
+                * Use maximum possible file offset for declaration to ensure
+                * ZFS will reserve enough credits for a write anywhere in this
+                * file, since we don't know where in the file the write will be
+                * 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);