> +static int ras2_hw_scrub_read_size(struct device *dev, void *drv_data, u64 *size) > +{ > + struct ras2_mem_ctx *ras2_ctx = drv_data; > + int ret; > + > + if (ras2_ctx->bg_scrub) > + return -EBUSY; > + > + ret = ras2_update_patrol_scrub_params_cache(ras2_ctx); > + if (ret) > + return ret; > + > + *size = ras2_ctx->size; > + > + return 0; > +} Calling ras2_update_patrol_scrub_params_cache here is problematic. Imagine: echo 0x1000 > size cat size echo 0x2000000000 > addr What happens here? What happens is the scrub range is not what you expect it to be. Once you cat size, you reset the size from what you initially set it to. I don't think that is what anyone will expect. It certainly caused us to stumble while testing. Regards, ~Daniel