Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp2452911ybx; Fri, 8 Nov 2019 04:37:34 -0800 (PST) X-Google-Smtp-Source: APXvYqyj71rzzGPdcRbZUXlFhjvewL0y32n2reHtTREgOz9ysBj/B6YkwFHB9TesA9ohwDy8tOvu X-Received: by 2002:a17:906:a28d:: with SMTP id i13mr8202124ejz.288.1573216654026; Fri, 08 Nov 2019 04:37:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573216654; cv=none; d=google.com; s=arc-20160816; b=Y2X1GwqIK+qJfbIyor3tFUV4B31P5P7CXyvOfi1HnEGOsD2gpjJkUOjA9NYkqIPW3o LZt0YrdmjmwkJRG/6NBPFx15LEPy30tWXdW8EuQTa5keORBiRx56hH8f5WA2Gswc3SKe +wiKD5K3JfwTlsiAu1R9jd5eAsFdn3NAnrtJbYwKIOPoi/61h08j+ff8o7Zvwc6u69Ji sjZkznFLYRcUJP4F6kduxoXXKQdv/K0Hre97KpfibGvTRxF6pQGw0d3LrJR4xBEN0sWf heZUFvn/zcYVPNbK1mYRpDR7IG5mkYT0cy7I0fsuMrhw+d9tF6iszQrbzY96fI6oKS+h ieow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:message-id:in-reply-to:subject:cc:to:from :date:dkim-signature; bh=vMJWjmHAn9oXmduAqxbr7ld97ARES8e+B/CT4q03C/U=; b=RfsVGCCpefh3AmFm3+5hdcYGst2gWwklEO5gmsdq0Vj04qKo08/WuiKTg4LIgV4ljR pLE66OnYMonUXAjLcwwn6sqTMyIFE3TbYs6+mg0jB8cMqUnCDGJ1z5Ng2dsPaHbqOzUX ODbZGicO6zRTkNn3Hslrpr+sdWHWP9Uvyqv1ckyrR+vZ3paO9dQP7AVBZ4XF2JYNJiVH 10HNjSxIOGjjiRFPiADTpozl1WVzv86dFKAHPt0fwGD1/OKcZ/9gqscWftto8nG1bgeW px4C9kap6D41eHA3hNdC5/1IAZRvGmbXcHHQQQtHqqqbDoiIBRIJEGhJA6iGniMbF9js 5UbQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pk3X2dXu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l20si3591846edv.282.2019.11.08.04.37.10; Fri, 08 Nov 2019 04:37:34 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Pk3X2dXu; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726049AbfKHMb4 (ORCPT + 99 others); Fri, 8 Nov 2019 07:31:56 -0500 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:35803 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725883AbfKHMbz (ORCPT ); Fri, 8 Nov 2019 07:31:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1573216314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vMJWjmHAn9oXmduAqxbr7ld97ARES8e+B/CT4q03C/U=; b=Pk3X2dXuQsrYnVohOyyATVZq4LL+KpF/o2zcgCU6/6KWXCBYFHOBPYHilMsRJ5/KSGtsqZ 2I/xbcq/PCFNoIIUMfxU4V8JiZwGl96ePB7vEegFt1J5Cp8cnJ9GTc8bCRMAjQzgupkvBR e6nYkz1hURUnUCiymmd38cXNxvVt/Yg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-351-w8K278-eNPCBfHYDXkJI7g-1; Fri, 08 Nov 2019 07:31:50 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 86A11107ACC3; Fri, 8 Nov 2019 12:31:48 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (file01.intranet.prod.int.rdu2.redhat.com [10.11.5.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id BEFA31001902; Fri, 8 Nov 2019 12:31:45 +0000 (UTC) Received: from file01.intranet.prod.int.rdu2.redhat.com (localhost [127.0.0.1]) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4) with ESMTP id xA8CVjPD004476; Fri, 8 Nov 2019 07:31:45 -0500 Received: from localhost (mpatocka@localhost) by file01.intranet.prod.int.rdu2.redhat.com (8.14.4/8.14.4/Submit) with ESMTP id xA8CViNb004472; Fri, 8 Nov 2019 07:31:44 -0500 X-Authentication-Warning: file01.intranet.prod.int.rdu2.redhat.com: mpatocka owned process doing -bs Date: Fri, 8 Nov 2019 07:31:44 -0500 (EST) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Alessio Balsini cc: Jens Axboe , Alasdair G Kergon , elsk@google.com, dvander@google.com, dm-devel@redhat.com, linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-team@android.com Subject: Re: dm-snapshot for system updates in Android In-Reply-To: <20191104164900.GA10934@google.com> Message-ID: References: <20191025101624.GA61225@google.com> <20191104164900.GA10934@google.com> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-MC-Unique: w8K278-eNPCBfHYDXkJI7g-1 X-Mimecast-Spam-Score: 0 Content-Type: TEXT/PLAIN; charset=WINDOWS-1252 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 4 Nov 2019, Alessio Balsini wrote: > > > -- Alignment > > >=20 > > > Our approach follows the solution proposed by Mikulas [1]. > > > Being the block alignment of file extents automatically managed by th= e > > > filesystem, using FIEMAP should have no alignment-related performance= issue. > > > But in our implementation we hit a misalignment [2] branch which lead= s to > > > dmwarning messages [3, 4]. > > >=20 > > > I have a limited experience with the block layer and dm, so I'm still > > > struggling in finding the root cause for this, either in user space o= r kernel > > > space. > >=20 > > I don't know. What is the block size of the filesystem? Are all mapping= s=20 > > aligned to this block size? >=20 > Here follows a just generated warning coming from a Pixel 4 kernel (4.14)= : >=20 > [ 3093.443808] device-mapper: table: 253:16: adding target device dm-15 > caused an alignment inconsistency: physical_block_size=3D4096, > logical_block_size=3D4096, alignment_offset=3D61440, start=3D0 >=20 > Does this contain all the info you asked for? Look at the function blk_stack_limits - it has various checks that make it= =20 return -1. Insert some debugging printk's there and find out which check=20 made the function return -1. Based on this, we can find out which of the limits triggered the error=20 message. > I started investigating this issue, but since we didn't notice any > performance degradation, I prioritized other things. I'll be hopefully > able to get back to this warning in the next months. > Please let me know if I can help you with that or if you need additional > information. Mikulas