From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.openvz.org (mail.openvz.org [69.168.225.77]) by lore.virtuozzo.com (Postfix) with ESMTPS id 7A2DA80474 for ; Wed, 28 Oct 2026 12:32:58 +0000 (UTC) Received: from mail.openvz.org (localhost [127.0.0.1]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SCVhJX019978; Wed, 28 Oct 2026 15:31:44 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SCVhJX019978 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=default; t=1793190707; bh=93mtgjlerSszi5YRxX41UDvMoz4S6cT2nspe7xgvOSA=; h=From:To:Date:In-Reply-To:References:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe; b=e5g9WF5CMVSsJ+/rPTif/95NZD6KKJzh10MmPs84TvpDqO7trLv1UaT3JqNz3Megd DvWxkO2yVlj4Bwd6qbQpagIS+/3p2sngI6Hz/rAuQuK3s4VAKV0vWBZJu5LcI4g17X 90GZIWM9C7mGOpDlz2XAQ52aUIMC2oQg97EkVEuSK1ncK4/uEcI2vb7i67fkluFnpV IImqloonlN7bnRB8Zd1hl+NzHnOoEzBARpKZmvPMOBkQgZOaMD1IYrh/YidV93HAvm gCrLG+xRPQ1oBv/HX1GTXEfIcVqv7GW/FqIkkEhUUXD7q1k4oNRQdUza3M9jVsArDZ 5X1fp5OAhZVEA== Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 69SCVa5r019956 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Wed, 28 Oct 2026 15:31:36 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 69SCVa5r019956 Authentication-Results: mail.openvz.org; dkim=pass (2048-bit key) header.d=openvz.org header.i=@openvz.org header.b="Cf7sOLRF" Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-48b0a199b20so730941f8f.1 for ; Wed, 28 Oct 2026 05:31:36 -0700 (PDT) X-Gm-Message-State: AFq9FYLtp/9zS6ouehLnpQ4RsIcVAO3n4mpgfXL/2QS6ZHyXHW7l/AKG OND5r0jcBQBd/yBXeZbdZeOwY5b9xJ3AUNdlu/H2fkveStAObCT0eSSUC9c7ed0erjN1KYCLIem 8CgtAB7w4olqszNQbwDUwbh2/A8Awq++MHFKL08+0N9SBOPBzV411EA== X-Gm-Gg: AYBFou0IlBBzuNTsMvjUwc6TzSE9/PHAcmWbP6VX9i/qP+DZQ5W1u1PqaGhHSqMUyjy XcreoykVUNBwYp5jLGaLy1uA5SBzNGTyB69k3IL10IymZkIqda++5+Gp3pDnogkgwCY15rahNzw jiGZ3zLH0b10/4BIbYUPwe4heYTl5xo6CgyDCAZ80yMz6ARg0btRzE1J6PELiGdEnTA3Oay6iYp dRjTzrk97c5LV08244sBBvvyOkaYFPvtg854+QvsxdW7HJDL/8mIzTGY7ootIXi6UGp6OwtzHGk BuxEGF68ag== X-Received: by 2002:a5d:4a8a:0:b0:487:27f9:840 with SMTP id ffacd0b85a97d-48e5d30f7e8mr4518225f8f.53.1793190696075; Wed, 28 Oct 2026 05:31:36 -0700 (PDT) X-Received: by 2002:a5d:4a8a:0:b0:487:27f9:840 with SMTP id ffacd0b85a97d-48e5d30f7e8mr4518148f8f.53.1793190695299; Wed, 28 Oct 2026 05:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1793190695; cv=none; d=google.com; s=arc-20260327; b=MG3r14IYX5B/hLUgTZjmocsFh+Tp7rAceRKJfHrdoaS78/4Hy1XuE69Yhf/oGr1dl4 oVZNUUpnHKhpomQa1WDPFWjGcxu50yVLLTn61aV1fWZCIZHQ8eEFbfCmPMmzxsiTujE2 W73f/tOGPcfWk/RT019uJQhe6UNe84jxFK+nkP6IPyGz/yf+ZVzf7HlbWuY8wy95MyTX iltTmJKYyRo4RhdTYIb8gSIl4HCSLTHExVBjZh9qS7BGcE8Om6QI4KDf4PndY8hU4DZD TT+EeH4d7YCZN/xDuxJXR6OnsSHA39EVduwJ3d6P9wXjT2YIfetqEG0J3ahXHi2uoXrZ GBJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=MfUX9KjHkyheOR9V06/uc/pitaIgNWZC4l3pSplC3vk=; fh=Kr/R+ZQiC/tid3qUs5C3px+AHPSuipOrrdrDcZfSlMY=; b=SJMRSHK+g/ut1XMAuH54Zd0sfuT30g+qvyCZ9xnsYbWrylPg66lgiZhBuJd6Pd1Hto CaZ61bppfwgc9F2oVj4LEbtFlJPvt6BlkliZwU6RJ4CYY1p28jVnsEvNZWfldvtmEC0M aX+i4oRbUa01+c+k7wTMtSbgFR2ZAbFlt+dv/BdbzGqgJCjX8OsEZU6uYaNlye8nBkb7 YG4aHNrVbMHKp89EGROXXVJxSitxP59W25G0QZREckCd1RKfIbWuBGVnioNrJmPA1vO7 asvqXAYcx5+h+lkULj+uGY39RPwmuktlyWyD/8ksSAbcRuyC3tcHHt7iczXlL5iWPoff jvlA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=Cf7sOLRF; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id ffacd0b85a97d-48e5ca56746sor337497f8f.2.2026.10.28.05.31.35 for (Google Transport Security); Wed, 28 Oct 2026 05:31:35 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) client-ip=2a06:5b06:b600:300:2c3:d099:6fb:56cf; Authentication-Results: mx.google.com; dkim=pass header.i=@openvz.org header.s=google header.b=Cf7sOLRF; spf=softfail (google.com: domain of transitioning den@openvz.org does not designate 2a06:5b06:b600:300:2c3:d099:6fb:56cf as permitted sender) smtp.mailfrom=den@openvz.org; dara=neutral header.i=@openvz.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=openvz.org; s=google; t=1793190695; x=1793795495; darn=openvz.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MfUX9KjHkyheOR9V06/uc/pitaIgNWZC4l3pSplC3vk=; b=Cf7sOLRFsP8igN6R4+to1uNRL5OirafxzACbJJf8XvR13qtwOW3+GeM1spv3xlUJ5w TC5DEgS8D77s19EQHWi7sXC3YEyA9GgPpWsUu0dy9tKxTHWk/pYgTMyxQP2g5c0kpBft APbaQtU3p9mHJiYgyYXac75YIRcteQud+IeixD6o1YrwIJirH2CZyRO93eZ+H8I1m7PU ky+mTBcGtBiTBt5b+Q8gkOzXxbj6zek87RrmFPSDfUcJcg8Or6yJ2qP5o3AMTDDq2UlG I7wVNTdNWhkxh9M/3cf2QPmn3BmoHxmTlp9Vvp7p5S5FLgADecpwU6Yd4hbYgyQXlj0C s6zg== X-Received: by 2002:a05:600c:4e42:b0:4a0:27eb:49b with SMTP id 5b1f17b1804b1-4a9678c276dmr45312165e9.30.1793190694805; Wed, 28 Oct 2026 05:31:34 -0700 (PDT) Received: from athena.sw.ru ([2a06:5b06:b600:300:2c3:d099:6fb:56cf]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4a9733d48b4sm48869705e9.0.2026.10.28.05.31.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2026 05:31:34 -0700 (PDT) From: "Denis V. Lunev" To: andrey.zhadchenko@virtuozzo.com Date: Wed, 28 Oct 2026 13:31:29 +0100 Message-ID: <20261028123130.2828357-3-den@openvz.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261028123130.2828357-1-den@openvz.org> References: <20261028123130.2828357-1-den@openvz.org> MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH hci-8.1 2/2] dm-zero-rq: drop flushes, discards and write zeroes instead of failing them X-BeenThere: devel@openvz.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: OpenVZ development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: devel-bounces@openvz.org Errors-To: devel-bounces@openvz.org From: Denis V. Lunev zero-rq kills every request that is not a read or a write. Requests queued against the previous table and dispatched to zero-rq after a table swap therefore fail, a flush with an error returned to the syncing task and a discard with an I/O error in the log: I/O error, dev dm-0, sector 0 op 0x3:(DISCARD) flags 0x4800 ploop reloads a released device to zero-rq precisely to keep the file system on it from seeing such errors. Complete flushes, discards and write zeroes as writes are completed. Reads already return zeros, so all of them are honoured. Drop num_discard_bios from the constructor: it only matters to bio-based targets and to targets that pass discards through to a device, and zero-rq is neither, so "silently drop discards" above it never held. https://virtuozzo.atlassian.net/browse/VSTOR-152097 Feature: cbt: changed block tracking (for backup) Signed-off-by: Denis V. Lunev --- drivers/md/dm-zero-rq.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/md/dm-zero-rq.c b/drivers/md/dm-zero-rq.c index 4f09266ff5ed..315ef8c930b3 100644 --- a/drivers/md/dm-zero-rq.c +++ b/drivers/md/dm-zero-rq.c @@ -24,11 +24,6 @@ static int zero_ctr(struct dm_target *ti, unsigned int argc, char **argv) return -EINVAL; } - /* - * Silently drop discards, avoiding -EOPNOTSUPP. - */ - ti->num_discard_bios = 1; - return 0; } @@ -47,7 +42,10 @@ static int zero_clone_and_map_rq(struct dm_target *ti, struct request *rq, break; case REQ_OP_WRITE: - /* writes get silently dropped */ + case REQ_OP_FLUSH: + case REQ_OP_DISCARD: + case REQ_OP_WRITE_ZEROES: + /* writes of any kind get silently dropped */ break; default: return DM_MAPIO_KILL; -- 2.53.0 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel