From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 20F102DCF57; Fri, 4 Sep 2026 05:28:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788499727; cv=none; b=Qb7tTYfqOg894qTR7PTi/FP7m0QuHuzMjTPKGoErg7sIVJ9kTWMyEIDQNf3Wd6Q0v+ilKOfGRLOfEtew3JFejAzOhi9knULHTn20uI/HapI7eCx5PwtLkYNbGtptI8+zWMXXQ0o3cnY3fEywOfok5MBB2KVilgXbd4uKGYwoR90= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788499727; c=relaxed/simple; bh=lA5kqFEhaLBPttiAGVZke/deihqzJK63OW7gqOqbf6k=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=bf5U9Ch81AlpM+C/u/Fj+a5NJREtjill1E4++eOWJfli2Qxvg2WPnMx+1zv+E1WgMHKFa88UTWym+QrStgVT31qHF0Q7iWadD9DUBOSovdHHEbS4qPVoih2eQE/oC4iEBh7uoyLG4rNjNjmg8vW3iq0PFLpwF2GWg3FWXQIuRMU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=xgHbdvyv; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="xgHbdvyv" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 796731F00A3D; Fri, 4 Sep 2026 05:28:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788499726; bh=LERFVKfCwtapsBRpu2znhrnV6ETs0NVcAhFBqaO9HLM=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=xgHbdvyvv7HVMZJChO7IC3LII3RG6UelvdtRJ2H76MW7tgCWrUnKiIbCWfmQvfFl/ c58Qf3Dit4YAkkSMBA+47iSE7cBxeIxgv0KpNK/V0nUxEHVuZ0pFKGtsaI0NPa2FYW Qmm7P1Qxg+xcm3H/rPFPDfi4cR2qXKqTI59LDpZA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Jan=20H=C3=B6ppner?= , Stefan Haberland , Jens Axboe Subject: [PATCH 7.2 519/713] s390/dasd: Propagate partial completion length across ERP recovery Date: Fri, 4 Sep 2026 06:58:07 +0200 Message-ID: <20260904045815.450281874@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260904045803.810145556@linuxfoundation.org> References: <20260904045803.810145556@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 7.2-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Haberland commit 6fb5ba2e7e43173a3761e46f091070a8185efa14 upstream. dasd_default_erp_postaction() copies the timing and device state from the finished ERP request back to the original request but drops proc_bytes. A request that was partially completed, an ESE read of a not-yet-allocated track returns fewer bytes than requested, and then recovered through the ERP chain loses its partial-completion length. __dasd_cleanup_cqr() then sees proc_bytes == 0 and completes the whole request instead of requeueing the remainder, silently returning zeroed data for the part that was never read. Carry proc_bytes over to the original request like the other per-request state. Fixes: 5e6bdd37c552 ("s390/dasd: fix data corruption for thin provisioned devices") Cc: stable@vger.kernel.org Reviewed-by: Jan Höppner Signed-off-by: Stefan Haberland Link: https://patch.msgid.link/20260805111612.1285190-3-sth@linux.ibm.com Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- drivers/s390/block/dasd_erp.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/s390/block/dasd_erp.c +++ b/drivers/s390/block/dasd_erp.c @@ -123,6 +123,7 @@ struct dasd_ccw_req *dasd_default_erp_po int success; unsigned long startclk, stopclk; struct dasd_device *startdev; + unsigned int proc_bytes; BUG_ON(cqr->refers == NULL || cqr->function == NULL); @@ -130,6 +131,7 @@ struct dasd_ccw_req *dasd_default_erp_po startclk = cqr->startclk; stopclk = cqr->stopclk; startdev = cqr->startdev; + proc_bytes = cqr->proc_bytes; /* free all ERPs - but NOT the original cqr */ while (cqr->refers != NULL) { @@ -147,6 +149,7 @@ struct dasd_ccw_req *dasd_default_erp_po cqr->startclk = startclk; cqr->stopclk = stopclk; cqr->startdev = startdev; + cqr->proc_bytes = proc_bytes; if (success) cqr->status = DASD_CQR_DONE; else {