Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp95086imm; Thu, 2 Aug 2018 14:40:48 -0700 (PDT) X-Google-Smtp-Source: AAOMgperWZBplK9LI7eXVIOGYC/Se+cIvMVCbRMo06j6LDrIzvlSPRxQIy+xZxMMN/kIYg+qZ/4q X-Received: by 2002:a17:902:7287:: with SMTP id d7-v6mr1016138pll.54.1533246048195; Thu, 02 Aug 2018 14:40:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533246048; cv=none; d=google.com; s=arc-20160816; b=kkXBpQbxpbaS0HAgk3heKc6xEe2IaQmPRsugA0t42McZvjXc+ceki0ZyXXGdm6TUF6 1Du0nddAhpjv42LlkWuy3jOZUrgU2j3mep3dy1gzZPRhbmnP5KA08GO98kk3RPHtLKaZ XyLrMlI4e6xURgg/ryTejm2oPc7ILxQR3+XjEdHj24Li3PZvwONXhlALfXLiWGpQTcco pvAaZSegL8dHN2V8qrPDVDQlzAP6+VHL8ILCScbS7/HbxGZ6ZyvCJKWgKn8kfl+s65X3 CFgO5IeS12klrAo9yPCI/2CE5JqKOaZQj6Xumeeg8yzHcqOWLrokiRw81s+j60uIRgl+ Ditw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:openpgp:references:cc:to:from:subject :arc-authentication-results; bh=6pWs1YHAPidhwECoZyW1gOfMyMmX9aIOqyEWtnLYb8M=; b=HzT5waEfv6kRM2yjQ9Dw5FccNlAvkn4+o7zC23rkL8m0kQj1A3/ZU8EJ2b46sHeeNz XBXXDvjyOyFvbGWeB25X8tigLnsFoXnHxoN9yluDEw8b7LKxV1kveXiw8ZjyjC6OYH/+ nE78hsVc7LT/uBKqss+USxp4ugbsxyqX8yj8Rmpeju0cXiDv+wXYZizCeOYrcxBfOC0F N5ycanQhMV2+LP+CUzMsvdVdh0dVLU5T3TgBgrvvW1UJiYwXxhGw6nz/tITQ3RhJjoqM fYwJ2XmUJSolciJa78tEXujVYtsLiYk1JZcTCehMIOHSn32K5QaWS1JrhSpm01Bx/7ul +vGQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r28-v6si2969188pfb.65.2018.08.02.14.40.33; Thu, 02 Aug 2018 14:40:48 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732118AbeHBXc0 (ORCPT + 99 others); Thu, 2 Aug 2018 19:32:26 -0400 Received: from forward103j.mail.yandex.net ([5.45.198.246]:33105 "EHLO forward103j.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731366AbeHBXc0 (ORCPT ); Thu, 2 Aug 2018 19:32:26 -0400 Received: from mxback2o.mail.yandex.net (mxback2o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::1c]) by forward103j.mail.yandex.net (Yandex) with ESMTP id 4CC0534C47E8; Fri, 3 Aug 2018 00:39:23 +0300 (MSK) Received: from smtp3p.mail.yandex.net (smtp3p.mail.yandex.net [2a02:6b8:0:1472:2741:0:8b6:8]) by mxback2o.mail.yandex.net (nwsmtp/Yandex) with ESMTP id vnSIHLm7qY-dM7GTsQZ; Fri, 03 Aug 2018 00:39:23 +0300 Received: by smtp3p.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 0wFCcvwoHc-dM8CDJ4l; Fri, 03 Aug 2018 00:39:22 +0300 (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) Subject: Re: LVM snapshot broke between 4.14 and 4.16 From: WGH To: Linus Torvalds , Ilya Dryomov Cc: Jens Axboe , linux-block , Linux Kernel Mailing List , Sagi Grimberg , Mike Snitzer , dm-devel@redhat.com References: <226835ba-2197-b850-6e5b-8ba14f7fd016@torlan.ru> <93bff248-6897-4867-841b-2dace11597de@torlan.ru> Openpgp: preference=signencrypt Message-ID: <1ec0a220-d5b0-1c27-e63b-c4d3f4ce9d77@torlan.ru> Date: Fri, 3 Aug 2018 00:39:22 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/03/2018 12:32 AM, WGH wrote: > On 08/02/2018 09:32 PM, Linus Torvalds wrote: >> WGH (sorry, no idea what your real name is) - what's the source of the >> script that broke? Was it some system script you got from outside and >> likely to affect others too? >> >> Or was it just some local thing you wrote yourself and was >> unintentionally buggy and nobody else is likely to hit this? >> >> Because if the latter, if you can work around it and you're the only >> user this hits, we might just be able to ignore it. > The script in question is written by me and contains literally two lines: > >     lvcreate --size 5G --snapshot --name snap0 --permission r > /dev/mapper/vg0-lvol_rootfs >     mount /dev/mapper/vg0-snap0 /mnt/rootfs_snapshot > > The script is not buggy (I think), it was written under simple > assumption that --permission r works. And it does - unless you happen to > have combination of kernel >=4.16 and lvm2 <2.02.178. > > The commit in question appeared only in 4.16, and this kernel version is > not widespread yet. You have to be running both recent kernel and > not-so-recent lvm2 to be bitten by this. This probably explains why no > one else reported this problem. > > Workaround certainly exists: I can just create read-write snapshot, but > mount it read-only. The reason why I didn't discover the workaround > earlier is that after unsuccessful read-only snapshot creation system > ends up in some weird state where read-write snapshots are also failing > with the same error (until reboot). So I got a wrong impression that > read-write snapshots were broken as well. > I've just found one public report of this bug, though: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=900442