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 CE95580F25 for ; Mon, 2 Nov 2026 23:44:32 +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 6A2NhJID029740; Tue, 3 Nov 2026 02:43:20 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A2NhJID029740 Authentication-Results: mail.openvz.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=virtuozzo.com header.i=@virtuozzo.com header.b="ye59Bdtm" Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by mail.openvz.org (8.14.4/8.14.4) with ESMTP id 6A2NhA9o029703 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=FAIL) for ; Tue, 3 Nov 2026 02:43:10 +0300 DKIM-Filter: OpenDKIM Filter v2.11.0 mail.openvz.org 6A2NhA9o029703 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4ad3d35e899so18796715e9.1 for ; Mon, 02 Nov 2026 15:43:10 -0800 (PST) X-Gm-Message-State: AFq9FYJr0S1mR/u1XPB7NDuU/Z0Y9bCOmksEoWSAr6z7vTvndul4CQHa 8gmmoL+Rq7dV1DLpUKi8XGztuAwx/iPNplMLZ0n6SzvjNr56PF+Qgj2r+KJyA6aTOn0PBORH1nW E7TXRt9zx6H1llpsmeC8ZJ+vZruaGPFxIDsll/WtiCHxrGPMDOH2V/A== X-Gm-Gg: AYBFou2rYS/hfX1sFDLB45ygqeVhiRQ/LzlRwUfYQwsY5dkSCQjH4h6ZfvIPlZQAUAt qq60CKcKUHuDHa8kKTbGyhgLTlBbpjYTC/HW8FKQI9xdQiNnbqV2BqSWOWicLXncfOraBQnG6E+ gHI3gdbAfbhwqvZr/sK9jTEydOxyFPffAouDyniuV4KE1ObNI+rWWIexplsF/r1FeVe20+rBkWe EFOmsJUWobY//QgI4yJEMh07m5WFmxYFIx9tq5pSkaBgRr3duylx3pOolj10g5rDLecglaxh22D /1XwUO2mQMQYe1io2q+ZR4uukrNHNod4TZe+w0EvQtxwrWOeAmsj8BbrMxWtqJxTSTbOqmmbjNC uTEmBjPgRFRb8p/bvPBgctJbNy2UE X-Received: by 2002:a05:600c:1c17:b0:4a0:1efa:c74a with SMTP id 5b1f17b1804b1-4ac18b7ddcdmr242530985e9.20.1793662989952; Mon, 02 Nov 2026 15:43:09 -0800 (PST) X-Received: by 2002:a05:600c:1c17:b0:4a0:1efa:c74a with SMTP id 5b1f17b1804b1-4ac18b7ddcdmr242530685e9.20.1793662989519; Mon, 02 Nov 2026 15:43:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1793662989; cv=none; d=google.com; s=arc-20260327; b=iDkYLMI8q1XlvlRbytDKJlAfB0rSEbRXutOyXAGFbSHPFuOYARwOAiySsuWE6wv0sj zleJWZ0NGCmHALxoE4x2HJ/8IPumS7hmPFbYTX+mcbLtD4ArKIXJe6nu4fVLfZzjYN7A 9UHCf+aVM0P3Nnm3VEbdlRvNcbiWONyD1ir1jbxWQkkG09Voc7LLQZyrTg8hojEiIA6v jQd41VFyvzR9u8d1Z13xYAhlbfRDw2WwcW6nmhss0IsJa1vJeAkDvBiZpeUhV34pALgV +N5yLAyQtE/q65hF1pV+hA/yGI3HaRXwBOedi4IdJCNt8AzlzOCys9z5SaEuYtl8zdmv ofaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=oZtNdcNc0Hj4GZHVgHJQbEoP022yujTp3bqF1VAKDQU=; fh=9VH7xbtOhOOwoVYPb8YgTvr+erGWPni2iwCEEh8Zz6s=; b=ZvE3g7sDZaABNMWCJkoLqX/EcL/HltJ+N27G8Hu7S3NqE65FdCI2wtRvY/gghFmCAQ +grnv4sO5YFXJGh1Nxuvaeyc8+OrvkHo8r57/LvI27Lj9g2nYP7uaMavMc74gN83bXA1 0nAaVdyb8Yn5ZQfMuT0qJzCY+nSH6SBQgFJ/FjvEMhQeOweXCOAEv2p6oZG26bC22N3f pLVSK/jtMjgX23OHFHrDiFpH3m+i7O5WGG1wtita/CleXnKraKc2LZaPXN3sneZuzv5i IpOg6sknzUtoKDm7pV0+DrlEy5U1Bt6YCXYLhRENwWv5fti1XZTqJDXVUnXdMP+70SHN IPpg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=ye59Bdtm; spf=pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=andrey.zhadchenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com Received: from relay.virtuozzo.com (relay.virtuozzo.com. [130.117.225.111]) by mx.google.com with ESMTPS id ffacd0b85a97d-48e71bc934asi21001995f8f.366.2026.11.02.15.43.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2026 15:43:09 -0800 (PST) Received-SPF: pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 130.117.225.111 as permitted sender) client-ip=130.117.225.111; Authentication-Results: mx.google.com; dkim=pass header.i=@virtuozzo.com header.s=relay header.b=ye59Bdtm; spf=pass (google.com: domain of andrey.zhadchenko@virtuozzo.com designates 130.117.225.111 as permitted sender) smtp.mailfrom=andrey.zhadchenko@virtuozzo.com; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=virtuozzo.com DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=virtuozzo.com; s=relay; h=MIME-Version:Message-ID:Date:Subject:From: Content-Type; bh=oZtNdcNc0Hj4GZHVgHJQbEoP022yujTp3bqF1VAKDQU=; b=ye59BdtmyM5U AO75t08VN1iwL89egsKNOFpYc4wez5MmmaNEuIRGp3e1h4OgmWP+Tfni7xjG8o274Isdyt13Wc/D2 KHv8c4bH6bneCoPzJFz3EWH/cXS6YvMqy2Mc6/ae0/gJJMke5lmxC6dNdTOlmSeBmP6gOq9s5Isg3 93Czp4lrtV7dJcf+ljpVvyOsLl1UWRzfXUjYMhHjrzfGYPk/jIbLh76JfEbqSmlmxB/gnF5ZHDyQS AlVnVpqJg//l2MBH1stU7MqXgaSPqQxzi3HlfL5r5OamqXAZR3Ia570S7gTB3Bb5e7LvGExVUMehA Ku9nSZa7bMkgIV+UF65g7g==; Received: from [130.117.225.5] (helo=vz9-demens-1.aci.vzint.dev) by relay.virtuozzo.com with esmtp (Exim 4.96) (envelope-from ) id 1xO1cI-00BVZo-1O; Tue, 03 Nov 2026 00:42:59 +0100 From: Andrey Zhadchenko To: alexander.ivanov@virtuozzo.com Date: Tue, 3 Nov 2026 02:38:44 +0300 Message-ID: <20261102233849.613155-1-andrey.zhadchenko@virtuozzo.com> X-Mailer: git-send-email 2.43.5 MIME-Version: 1.0 X-OZ-Fwd: true Cc: devel@openvz.org Subject: [Devel] [PATCH 0/5] dm/push_backup: event fd interface and fixes 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 The push_backup target currently makes the backup tool wait for the next cluster range inside the "push_backup_read" target message. dm runs target_message() under dm_get_live_table(), i.e. with md->io_barrier SRCU read-locked, so while the tool sleeps there anything that needs synchronize_srcu(&md->io_barrier) on that device is stuck: suspend, table reload/remove and dm_internal_suspend_fast() from "@stats_create". An unrelated dm-stats user hangs, and everything that later queues behind md->suspend_lock hangs with it. Patch 5 adds a file descriptor based interface instead. The tool gets an anon inode fd via the "push_backup_get_fd" message and then uses plain read()/write() of struct push_backup_range to fetch the next range and to acknowledge it, without going through dm messages on the data path. The fd pins struct push_backup with a kref so it survives target removal and simply returns -ENODEV afterwards. The legacy messages are kept for compatibility. Patches 1-4 are fixes found while working on this: 1. init the lock, waitqueue and timer before anything that can fail so pb_destroy() is safe from any error path; 2. clear pb->alive under pb->lock like every other user does; 3. drop the redundant mod_timer() in push_backup_write(). The timer re-arms itself from pb->deadline_jiffies, so updating the deadline under the lock is enough. This was also the only place that armed the timer outside the window push_backup_stop() waits for, which matters once writes may arrive via the fd without pb->ctl_rwsem; 4. pass absolute expiry to mod_timer(). Both remaining callers passed a relative value, so after ~5 min of uptime the timer fired and re-armed on every tick while a write was delayed. https://virtuozzo.atlassian.net/browse/VSTOR-152912 Andrey Zhadchenko (5): drivers/md/push_backup: correct initialization drivers/md/push_backup: clear pb->alive under pb->lock drivers/md/push_backup: do not re-arm deadline timer in push_backup_write() drivers/md/push_backup: fix mod_timer() usage dm/push_backup: add event file descriptor interface drivers/md/dm-push-backup.c | 231 ++++++++++++++++++++++------ include/uapi/linux/dm-push-backup.h | 36 +++++ 2 files changed, 220 insertions(+), 47 deletions(-) create mode 100644 include/uapi/linux/dm-push-backup.h -- 2.43.5 _______________________________________________ Devel mailing list Devel@openvz.org https://lists.openvz.org/mailman/listinfo/devel