From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1F57AC433F5 for ; Tue, 29 Mar 2022 13:09:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237141AbiC2NKp (ORCPT ); Tue, 29 Mar 2022 09:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235616AbiC2NKo (ORCPT ); Tue, 29 Mar 2022 09:10:44 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4D703DF10 for ; Tue, 29 Mar 2022 06:09:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=cTMwKalK7QXcN3cet26Iin/abX8tZmbV6bru+8JGtfI=; b=FJw0zubQ07UUlTaiwOPvhMpdEi U442VB+nkCNvx5N2krFK86rGtIL+JYiJx+SCfII34bS0HPXmjS5JyEJ5FQDqQ2Fj100s0akK4COcS jo4/fHskA5JpNKlg4fZvFLUJMK74BpiuHiskt3U0d+SFb0i1NW+0XfanIIg/9xzL1V9Nj3duWugO4 YUDkDFerDEVWhVQeVW/XrOd9fRWHsk/dfVjGXjT8Njzt88icGVkLy3ZQZqRecaXlxGvKQcRpDPuD8 Lp4BiDxj2y/B/54dG71Omd5W9oyzzkgN8tyHn2tzxTnMZHUlg9cgZ2EzX7tNf5LZHx4ezj3ip17Vo KHYXbtRg==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nZBaf-00CICc-HL; Tue, 29 Mar 2022 13:08:53 +0000 Date: Tue, 29 Mar 2022 06:08:53 -0700 From: Christoph Hellwig To: Kirill Tkhai Cc: agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, song@kernel.org, linux-kernel@vger.kernel.org, khorenko@virtuozzo.com Subject: Re: [dm-devel] [PATCH 0/4] dm: Introduce dm-qcow2 driver to attach QCOW2 files as block device Message-ID: References: <164846619932.251310.3668540533992131988.stgit@pro> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <164846619932.251310.3668540533992131988.stgit@pro> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Mar 28, 2022 at 02:18:16PM +0300, Kirill Tkhai wrote: > This patchset adds a new driver allowing to attach QCOW2 files > as block devices. Its idea is to implement in kernel only that > features, which affect runtime IO performance (IO requests > processing functionality). >From a quick looks it seems to be like this should be a block driver just like the loop driver and not use device mapper. Why would you use device mapper to basically reimplement a fancy loop driver to start with? > The maintenance operations are > synchronously processed in userspace, while device is suspended. > > Userspace is allowed to do only that operations, which never > modifies virtual disk's data. It is only allowed to modify > QCOW2 file metadata providing that disk's data. The examples > of allowed operations is snapshot creation and resize. And this sounds like a pretty fragile design. It basically requires both userspace and the kernel driver to access metadata on disk, which sounds rather dangerous. > This example shows the way of device-mapper infrastructure > allows to implement drivers following the idea of > kernel/userspace components demarcation. Thus, the driver > uses advantages of device-mapper instead of implementing > its own suspend/resume engine. What do you need more than a queue freeze?