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 D2BAD414A2A; Fri, 4 Sep 2026 06:17:44 +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=1788502666; cv=none; b=RO6Gj+qZS/wQfxzHy1tdUw37T8Ayh8uI+Awe5KKYEsPYSfyZDrWhRyPxxmKlJ+560vdxbQSy9H9J6ooA+HTLqhEDnja8vXJ1BDU76z9Dvfi85yd088rr0KY1zjdBw4e3GudgAlq20w7ZOSh/r7wrEqndsLamg13JjS5+bX4BT48= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788502666; c=relaxed/simple; bh=9k+4uD4jZ59c7WBN9iyt98j5EPlixgxFp6gmruSQ+/8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=eWbL+YbNA2gQLtXgtN+VbIoVHAGkft01JolZJiMxGkoOFw5Wc4RBJkPWbeRZ2WHYv1sotiAR7Q1RaZmI/lic7EmsnRFzl8zARwjtO9nZBsOMum+vxlI4GlY+KXamS0NzCVcPOfscUx17Z+yhz/3+diXzjMdq4Uc+60zJYVJmKz4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=r0+9LFv4; 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="r0+9LFv4" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 378AE1F00A3D; Fri, 4 Sep 2026 06:17:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1788502664; bh=foZRa6J6/rR47r9amRCWYOpFLc0V9SLn62i4jc655aY=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=r0+9LFv44JQq1VbazfKNC+GpUFn7velAwvuHGEFfQBYuME0cV9uRDYyEBVWKzP1P6 rQYgJsSVC2WO2KXoCFbDs/sq8vqsadaV3+JOp3nrXhW38/RF19V8uj3qIKweIOf0nn B1VPD5mlkllsC9CJ8LNJwof6DHc94krFsRZM3Co4= 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 6.12 288/403] s390/dasd: Propagate partial completion length across ERP recovery Date: Fri, 4 Sep 2026 07:01:31 +0200 Message-ID: <20260904045741.401208529@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260904045734.806166532@linuxfoundation.org> References: <20260904045734.806166532@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 6.12-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 @@ -122,6 +122,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); @@ -129,6 +130,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) { @@ -146,6 +148,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 {