diff --git a/scst/src/dev_handlers/scst_user.c b/scst/src/dev_handlers/scst_user.c index 608bd5571..0b88d1287 100644 --- a/scst/src/dev_handlers/scst_user.c +++ b/scst/src/dev_handlers/scst_user.c @@ -3346,7 +3346,6 @@ static int __dev_user_set_opt(struct scst_user_dev *dev, dev->queue_alg = opt->queue_alg; dev->swp = opt->swp; dev->tas = opt->tas; - dev->tst = opt->tst; dev->d_sense = opt->d_sense; dev->has_own_order_mgmt = opt->has_own_order_mgmt; if (dev->sdev != NULL) { diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index cc53ff2de..2a902d537 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -4041,15 +4041,23 @@ static void vdisk_task_mgmt_fn_done(struct scst_mgmt_cmd *mcmd, /* Restore default values */ struct scst_device *dev = tgt_dev->dev; struct scst_vdisk_dev *virt_dev = dev->dh_priv; + int rc; dev->tst = DEF_TST; dev->d_sense = DEF_DSENSE; + dev->swp = DEF_SWP; + dev->tas = DEF_TAS; + if (virt_dev->wt_flag && !virt_dev->nv_cache) dev->queue_alg = DEF_QUEUE_ALG_WT; else dev->queue_alg = DEF_QUEUE_ALG; - dev->swp = DEF_SWP; - dev->tas = DEF_TAS; + + rc = vdisk_set_wt(virt_dev, DEF_WRITE_THROUGH); + if (rc != 0) { + PRINT_CRIT_ERROR("Unable to reset caching mode to %d", + DEF_WRITE_THROUGH); + } spin_lock(&virt_dev->flags_lock); virt_dev->prevent_allow_medium_removal = 0; diff --git a/scst/src/scst_lib.c b/scst/src/scst_lib.c index b27537316..229f65b98 100644 --- a/scst/src/scst_lib.c +++ b/scst/src/scst_lib.c @@ -8500,22 +8500,21 @@ int scst_copy_file(const char *src, const char *dest) goto out; } - TRACE_PR("Copying '%s' into '%s'", src, dest); + TRACE_DBG("Copying '%s' into '%s'", src, dest); set_fs(KERNEL_DS); file_src = filp_open(src, O_RDONLY, 0); if (IS_ERR(file_src)) { res = PTR_ERR(file_src); - TRACE_PR("Unable to open file '%s' - error %d", src, - res); + TRACE_DBG("Unable to open file '%s' - error %d", src, res); goto out_free; } file_dest = filp_open(dest, O_WRONLY | O_CREAT | O_TRUNC, 0644); if (IS_ERR(file_dest)) { res = PTR_ERR(file_dest); - TRACE_PR("Unable to open backup file '%s' - error %d", dest, + TRACE_DBG("Unable to open backup file '%s' - error %d", dest, res); goto out_close; }