diff --git a/motr/io_req.c b/motr/io_req.c index 02559afda51..76b8cee482a 100644 --- a/motr/io_req.c +++ b/motr/io_req.c @@ -1705,6 +1705,7 @@ static int ioreq_dgmode_read(struct m0_op_io *ioo, bool rmw) rc = xfer->nxr_ops->nxo_dispatch(xfer); if (rc != 0) return M0_ERR(rc); + ioo->ioo_dgmode_io_sent = true; return M0_RC(rc); @@ -1733,7 +1734,7 @@ static int ioreq_dgmode_write(struct m0_op_io *ioo, bool rmw) if (ioo->ioo_dgmode_io_sent) return M0_RC(xfer->nxr_rc); - /* -E2BIG: see commit 52c1072141d*/ + /* -E2BIG: see commit 52c1072141d */ if (M0_IN(xfer->nxr_rc, (0, -E2BIG))) return M0_RC(xfer->nxr_rc); diff --git a/motr/st/utils/motr_utils_st.sh b/motr/st/utils/motr_utils_st.sh index c6a3cc4a10f..ce2c6004e06 100755 --- a/motr/st/utils/motr_utils_st.sh +++ b/motr/st/utils/motr_utils_st.sh @@ -170,6 +170,33 @@ EOF echo "motr r/w test with m0cp and m0cat is successful" rm -f $dest_file + echo "motr r/w test with update of m0cp and m0cat" + $motr_st_util_dir/m0cp $MOTR_PARAMS_V -o $object_id1 $src_file \ + -s $block_size -c $block_count -L 1 \ + -b $blks_per_io || { + error_handling $? "Failed to copy object" + } + $motr_st_util_dir/m0cp $MOTR_PARAMS_V -o $object_id1 $src_file \ + -s $block_size -c $block_count -L 1 \ + -b $blks_per_io -u || { + error_handling $? "Failed to copy object" + } + $motr_st_util_dir/m0cat $MOTR_PARAMS_V -o $object_id1 \ + -s $block_size -c $block_count -L 1 \ + -b $blks_per_io $dest_file || { + error_handling $? "Failed to read object" + } + $motr_st_util_dir/m0unlink $MOTR_PARAMS -o $object_id1 || { + error_handling $? "Failed to delete object" + } + diff $src_file $dest_file || { + rc=$? + error_handling $rc "Files are different" + } + + echo "motr r/w test with update of m0cp and m0cat is successful" + rm -f $dest_file + # Test m0cp_mt echo "m0cp_mt test" $motr_st_util_dir/m0cp_mt $MOTR_PARAMS_V -o $object_id4 \ diff --git a/stob/ad.c b/stob/ad.c index 3887d25174b..19575116b78 100644 --- a/stob/ad.c +++ b/stob/ad.c @@ -1175,24 +1175,11 @@ static void stob_ad_write_credit(const struct m0_stob_domain *dom, */ m0_be_emap_credit(&adom->sad_adata, M0_BEO_PASTE, frags + 1, accum); - /* - * Commenting out below part of code with #if 0, earlier it was based - * on assumption that that adom->sad_overwrite will be always false, - * Now we have set it to True by default to fix EOS-25302 hence - * disabling it with "#if 0" - * TODO: Probably sad_overwrite is introduced for COW(Copy on Write) and - * for Object versioning in Motr, which is not implemented yet. Need to - * revisit this part while implementing COW and object versioning. - * We do not know whether bo_free_credit should be commented out or not, - * but this is done to maintain existing behavior as the code was - * anyway redundant earlier. - */ -#if 0 if (adom->sad_overwrite && ballroom->ab_ops->bo_free_credit != NULL) { /* for each emap_paste() seg_free() could be called 3 times */ ballroom->ab_ops->bo_free_credit(ballroom, 3 * frags, accum); } -#endif + m0_stob_io_credit(io, m0_stob_dom_get(adom->sad_bstore), accum); }