From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.51 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795296081; b=olr9lellrFPdFvD7KYL+BDMetxtYhG9oTMoqJ9FGslnfUj+5BwnhBPSFRC4sgqbQ48Xv tyAC+UGzu5dOx3Y4M+3mqSYHieSQVz8Mkv1ewQ7Ls+ArmLJaE8rnZziwiEOaNaEMqZipX 5mJnQLihn5bcwfzATVHJ3kQ/5FWsamyJISxmtSBDZMDb149mqW8uwtRcXmcnd52E4g/ob lAsPiogUsKSvSMdf8NDQBdp40V1ZJ9NJPdZPA7BEHFiqiFuVxkjYVMO0GknJuFpoQLZXw 5gxHSrni+8eaNSx+Y5Jsg8arJnHqm+B0sKO81EvdhbWUYwSWhS1qceWslkZirBuw0lg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795296081; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject: In-Reply-To:References:MIME-Version:Content-Type: Content-Transfer-Encoding:Date:Message-ID; bh=O3ljys2G/dfGrzQSHlcDxa7rlNuO9sIfulWEdwLNsJ0=; b=GPG08tdyrfuDdhGiuA+0s+wxKwa9E1ZclMr5KtjBFkkxZeSWZkqRiM7EUadeYtJq26Y9 8OIJq/U7uSJhLv5WMyT8Eo8KTnlwJMq2s1TrjIDDZAXeWsaObBUFpiQv4+f31V0fKXc1o ymhKBWnv8Xng5EQ1O9j1AkBCMSOATPfI31I3LVtV2ngckWIamyGEFi1UDqOxksD0lHIqH pQpSwePzwCOJ60Z14/6APu1cppbiLufN3yIMiJI0DwuqV4i5O2OfD3p6pmkZC+v9Rgl3u k8T+gvkJHovjnBY8M5KskqdO11j9pzZUaBh9ba9r6pZazfC/XEGSWD/b3yQ+8tH+3eA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=i8Rz2RMp; arc=none smtp.remote-ip=209.85.218.51 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DA534606A32A for ; Sat, 21 Nov 2026 21:21:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DA534606A32A Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=i8Rz2RMp Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-c516a160f91so18980366b.2 for ; Sat, 21 Nov 2026 13:21:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20260707; t=1795296079; x=1795900879; darn=vger.kernel.org; h=message-id:date:content-transfer-encoding:content-type:mime-version :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=O3ljys2G/dfGrzQSHlcDxa7rlNuO9sIfulWEdwLNsJ0=; b=i8Rz2RMpPmkXYItSIndpWJR63ShbcEOT18h3HDALB8+aTuOXp4xTJl0bXxP5lQ8Su3 E382aOfjHM96onbffE4BozXFmdo5gHP3RvxEg5KXM33RJL/vSmFp16Wtjd8BBedvHhgW 1iVU/K1qLjSptz5Yfltsg+Pudxm/+TbBWQOFPx+tVxAQhS8PMrW6XYqtk242qjuUvHGp qnpLBWi5bevQxy9wxEdfLIwsD/K87xZHuH9/1TudVpGLrDLz6Ir8Zzo5Fed3UlYCQpBu +dSqoOWTHFtfYm9IpDMTtsHZKW9o8LuBFQHc4q0zR4lsKsUGfdVGttxQSb2z0MremoYk he4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795296079; x=1795900879; h=message-id:date:content-transfer-encoding:content-type:mime-version :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=O3ljys2G/dfGrzQSHlcDxa7rlNuO9sIfulWEdwLNsJ0=; b=Ljo8MJ0AoWJV/Azz8n+PpgO/HhEFUyagF3ucwN+caG27uJeP+l4gqu6nDidpB3aVwk 68lfXhK1i74hiUmA0tirzia+xjOYIEb8F/2B4I1zCpFsF1ROg+BO+QL2yzAhij/CiCh8 IfwAR/mHScj4TVHlohJzqBpKuANvkS5lB5XkF8Lz2VgBSA3GrC6fTpUTSZWXDyYoChpX i5hVPEDSJd0w+32QE66knsR0mvg/q6zp8RH3y4/U3orFVMw/t8crCOGw+H/HQzF9ib4r rCIBtwIApV8q8+2iXgO5DMSb1tlFnLzPdJivI5AhN/w/iRvpTmawJO8wYqtEYuZZfLKe ZhTA== X-Gm-Message-State: APuU4Z/LZsM0Y+aUICuUFUeyaSFXaXKAbwjqwGZ8gSpu6kd0A8U/Lydv 6vZ7/tX88cA8Z4T3ju7OQK9DwaPg2Uq+DuOf/tTCwnuvFEnObuLzjBE4 X-Gm-Gg: AZFdTZfS9dpG+O7QGVt1BhzNDA/deB3gtLUIrg3YKI9NpIrkEH3GopMZpZE6C2f+aRQ lCnYpds05RBvHRQ6PG+ZlXxxnNLCM9kJaVXPYfrvf9HIsxH8xjXhQh/M1qoSEshesptrNgJtqBY 20DKXErMlnwJTzFTXI5AZEiyJwovdkRB1LklLCDwH3JBFCAFzG/vtOcL1HSCKbYJCTEUNq5fMjv oMq6/ShR2PnJq5C22TSrbgotFk03wp4HL2hWwGBdW7ATaS+jw8wF3UCfr6jwOa0kJpsslQ9Ktid ssF5dYJg3kYm3gKNs0WknyE7BTktqzmqk3eNe7vC+hGFjBcDRV2FFeTcavAibhJF+L59a3o2Iy8 gCoMzVAQh82HCXiRnylXAE+zgt5Yy2IVjZTKe5z/HPBbnu5GtnJZpfSD5bN9mzS8/BPSsvaZ4+c KrEQVSquGWPrgZFtz8FkJ+8qtv2L21IcFsTpnd9WVyA1nSApVJw8ohUCqFPcAmGUDJ55Luv98c3 myAw8hs+rQ6heZ/pdsdDkVE+2ELhoY6+MvKUlG4XZLZ5nORgsUAjcL2QwNiGdz7lCXyFNLYZ2a+ ruHo5X+tiAiD4slpqb2RWOFAgj4= X-Received: by 2002:a17:906:7f01:b0:c4d:2867:281c with SMTP id a640c23a62f3a-c513a89466dmr477367466b.1.1795296079086; Sat, 21 Nov 2026 13:21:19 -0800 (PST) Received: from [172.17.0.1] ([2a0c:db40:0:80df::2]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ad010a6sm243362266b.7.2026.11.21.13.21.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 21 Nov 2026 13:21:17 -0800 (PST) From: Konstantin Nikiforov To: linux-raid@vger.kernel.org Cc: linux-bcache@vger.kernel.org, regressions@lists.linux.dev, linux-kernel@vger.kernel.org, stable@vger.kernel.org, Yu Kuai , Song Liu , Coly Li , Kent Overstreet , magiclinan@didiglobal.com, xiao@kernel.org Subject: Re: [PATCH] md/raid5: complete unsupported discards successfully In-Reply-To: <179299857972.12222.2729359466842183358@gmail.com> References: <179299857972.12222.2729359466842183358@gmail.com> X-Mailing-List: linux-bcache@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Sun, 22 Nov 2026 00:21:15 +0300 Message-ID: <179529607529.5.3302391929789139470@gmail.com> Hi Kuai, I built and tested md-7.5 with b964c9240a37 on the machine from the regression report. The reproducer passes and the machine runs without backing-device errors. Tested tree ----------- md-7.5 tip c526b7cd32f7, based on v7.4-rc2, with b964c9240a37 applied. Built as 7.4.0-rc2-md75+ (x86_64, Arch config, gcc 16.2.1) and booted on the affected machine. Reproducer ---------- Three 256M loop files -> raid5 (64K chunk, metadata 1.2) -> bcache backing device. devices_handle_discard_safely is left at its default (N), so the array takes the raid5_discard_limits() path changed by the patch. md125: discard_max_bytes=2199023255040, discard_granularity=131072 blkdiscard 8M on md125: exit 0 bcache1 over md125: discard_max_bytes=2199023255040 4x blkdiscard 8M on bcache1: io_errors=0, no bch_count_backing_io_errors lines in dmesg The same reproducer gave io_errors=4 with the unpatched 7.2.11 module. With the patched 7.2.11 module, and now with this kernel, it stays 0. Affected machine ---------------- 3x ST1000DM010 (no TRIM) -> md126 raid5 -> bcache0 (NVMe cache attached, writethrough) -> LVM -> ext4/btrfs root. Since booting 7.4.0-rc2-md75+, md126 and md127 are [UUU], /sys/block/bcache0/bcache/io_errors is 0, and dmesg has no bch_count_backing_io_errors or md/bcache I/O errors. Caveat: the local workaround (udev rule zeroing discard_max_bytes on md*/bcache*, plus nodiscard mounts) is still in the initramfs, so the HDD-backed array has not received discards on this boot. The loop reproducer is what exercises the changed code path. I can do a no-workaround boot and a scratch-LV discard test if you want that before this goes to stable. Note: 7.2.y is EOL (7.2.15, 2026-11-01), so the "Cc: stable # 7.2" is stale; v7.3.5 still has the old code, so the fix is needed in 7.3.y once this reaches mainline. Tested-by: Konstantin Nikiforov #regzbot fix: md/raid5: complete unsupported discards successfully Thanks, Konstantin DeepSeek Harness 0.2.2-rc.5; model: deepseek-flash