All Virtuozzo development lists (kernel + QEMU)
 help / color / mirror / Atom feed
From: Konstantin Khorenko <khorenko@virtuozzo.com>
To: "Denis V. Lunev" <den@openvz.org>
Cc: devel@openvz.org
Subject: Re: [Devel] [PATCH hci-8.1 2/2] dm-zero-rq: drop flushes, discards and write zeroes instead of failing them
Date: Thu, 29 Oct 2026 18:40:32 +0100	[thread overview]
Message-ID: <179329563266.1542126.14648562135482005330.b4-review@b4> (raw)
In-Reply-To: <20261028123130.2828357-3-den@openvz.org>

On 10/28/26 13:31, Denis V. Lunev wrote:
> dm-zero-rq: drop flushes, discards and write zeroes instead of failing them

Will commit, with three edits to the message only, the code is fine.

1. Subject: "write zeroes" dropped, so

   dm-zero-rq: complete flushes and discards instead of failing them

   No table in our tree sets num_write_zeroes_bios (ploop, qcow2, error,
   zero-rq), so max_write_zeroes_sectors is 0 everywhere and
   submit_bio_noacct() rejects such a bio before a request exists. The
   case label is harmless, but no write zeroes request can be queued
   against a previous table. The old subject was also 75 characters.

> 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:

2. sync(2) returns void, the error reaches fsync()/syncfs() and the jbd2
   commit, which aborts the journal. And a killed flush leaves an I/O
   error line in the log too, for the PREFLUSH request that waited on it
   (blk_flush_complete_seq() -> blk_mq_end_request()). So: "a flush with
   an error returned to fsync and to the journal commit, and both with
   an I/O error in the log".

> 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.

3. dm_table_supports_discards() also honours a target that sets
   discards_supported without any device, which is what error, ploop,
   qcow2 and mainline dm-zero do. The assignment was dead because zero-rq
   never set discards_supported, not because it is request-based. I will
   say that instead.

Reviewed-by: Konstantin Khorenko <khorenko@virtuozzo.com>

-- 
Konstantin Khorenko,
Virtuozzo Linux Kernel Team

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

  parent reply	other threads:[~2026-10-29 17:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-28 12:31 [Devel] [PATCH hci-8.1 0/2] dm-zero-rq: fix a crash on a flush after ploop release Denis V. Lunev
2026-10-28 12:31 ` [Devel] [PATCH hci-8.1 1/2] dm-zero-rq: fix a NULL dereference mapping a flush request Denis V. Lunev
2026-10-28 12:34   ` no-reply
2026-10-28 12:31 ` [Devel] [PATCH hci-8.1 2/2] dm-zero-rq: drop flushes, discards and write zeroes instead of failing them Denis V. Lunev
2026-10-28 12:34   ` no-reply
2026-10-29 17:40   ` Konstantin Khorenko [this message]
2026-10-28 12:44 ` [Devel] [PATCH hci-8.1 0/2] dm-zero-rq: fix a crash on a flush after ploop release Andrey Zhadchenko
2026-10-29 17:40 ` Konstantin Khorenko
2026-10-29 17:44 ` Konstantin Khorenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=179329563266.1542126.14648562135482005330.b4-review@b4 \
    --to=khorenko@virtuozzo.com \
    --cc=den@openvz.org \
    --cc=devel@openvz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.