Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2411654imm; Thu, 2 Aug 2018 11:06:31 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeQXQGw7mEbN2kLMZ/almAEQ2HvW0bK6JIxEIUxoLfvVQoyauMdDzUscPLqcEjxKOzudw0X X-Received: by 2002:a17:902:7793:: with SMTP id o19-v6mr463429pll.306.1533233191318; Thu, 02 Aug 2018 11:06:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533233191; cv=none; d=google.com; s=arc-20160816; b=ZvuTT3BQeEp3EUi5ULGGogBRLm8BEvnySExvCdMn7HNMiUK/XxI5+SqwEjB5fKmjjH qO8z5C3gYfxFpzK0dPlju2v3uk1S08DTAL8Y8qqtbXnZ0/FJwpv2c4bGNyaOtIimCSlR 13Y1sEgQQohov+c1NmAwzY8Wplvpqlgi+AcgpMuIIVnITyJDhL2nuKyW6mCCgHiposnE dF+/w8Sk91ypbqhQXWm/L2pA1pfNzQwkM1ovU9jMC33r2jYn0QDWbE6wPNn/C+WyYAFJ h3nr7cV8lLBeAa+YareHovxx2MhNUGl1F0ayD7s+5SpMBuXO7bAazAoEl8Gbk7gpPnMq vVQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=OpeHvaMjD4HKvysga4ULtk7ZF/P3XSqXAA5LvABv2I8=; b=NgcfKd9wZ0c6cLtlflri5BRP0VKZ5onuBFdeKgzJygNe2t8fEG3OikxbiISn2of5FT ltn5Scjpy4ovknWdYSX2NqN7CnrHxlAlcJqV5mXytGXlqmH7mXozEZ88sKMqfgrACU3l yAk1JJM3VJ+ZkQElq6HIfcre9pw4mLs5InrbllsfNAq1hnP66W3pXyOj8CGD/jmZwVmG WwUBEbcju4r41F2PzRW+0+U0Il4LHrUFR2cfcWoQD4gDC+VHfbfFWJEO3oO3cE6DJGd6 HdVFO0G7VyEQJbvobuC+Pj2JRqQ3Bp2IGwcAZSUhe1wp5PxANNiy1Xw8RtDNJkoqKo6T 7QQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b="O2/MRu6+"; 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 bg5-v6si2005183plb.368.2018.08.02.11.06.01; Thu, 02 Aug 2018 11:06:31 -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; dkim=pass header.i=@linux-foundation.org header.s=google header.b="O2/MRu6+"; 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 S1731192AbeHBSdl (ORCPT + 99 others); Thu, 2 Aug 2018 14:33:41 -0400 Received: from mail-it0-f65.google.com ([209.85.214.65]:40680 "EHLO mail-it0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726938AbeHBSdk (ORCPT ); Thu, 2 Aug 2018 14:33:40 -0400 Received: by mail-it0-f65.google.com with SMTP id h23-v6so4252692ita.5; Thu, 02 Aug 2018 09:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=OpeHvaMjD4HKvysga4ULtk7ZF/P3XSqXAA5LvABv2I8=; b=O2/MRu6+nfIhfZP25eg4e4Q95f5XUcm+MRguxhMMLZYKooE7ndJRMnNmjEE1BNxDtP 5Gx5r0LlfnozLrTzHxgWR066gC1ILHMqoWVeiAlaqcIb5+Tr5SdQw6gqjKHGh7M1lSLi 4NhpipNErINua7HRj9/cSt9lXsOk8cp3s1GHg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=OpeHvaMjD4HKvysga4ULtk7ZF/P3XSqXAA5LvABv2I8=; b=MRxAoMorQgKpuLIEvBUVRuVGja6V0nmicYwuEJdjQcM9n6OIjtkBfnEJcNMJiVC1ez mivE1n+9SkOGCnnRG967v5zfwt1+1CnQT4Rz6YQk2WVnM5DyUY/o/4e01QfXciTzzRrc BHspXjecKFAtpe/Tl8mWCWUlCcFqkFm88HBZrQZY9n3hufWgjO7G3iIa9GoeIeiD2WIW UmUhlvixCy5HMFF6eTOZjx+WZa0xSSwv8bXQCJfZLWrZOkJeVb0JxKVVyKy8ZQ7og8jp 7hrbtwuTJE5/0NiJfL3JbJrzo0ywqeRw2x8x5llZtpg7UWpvWOBDfOuW4YUhsjXcMuuV kGbQ== X-Gm-Message-State: AOUpUlGheU2HU4Z/NMYYJfvOU51sBWk61sttORoQt4dHGCgolMcCUHKc nUpDI08pFYcuTc1z9l3tJ3hQk9QdfvAMs3y8/OQ= X-Received: by 2002:a02:2b12:: with SMTP id h18-v6mr272821jaa.10.1533228105296; Thu, 02 Aug 2018 09:41:45 -0700 (PDT) MIME-Version: 1.0 References: <226835ba-2197-b850-6e5b-8ba14f7fd016@torlan.ru> <93bff248-6897-4867-841b-2dace11597de@torlan.ru> In-Reply-To: <93bff248-6897-4867-841b-2dace11597de@torlan.ru> From: Linus Torvalds Date: Thu, 2 Aug 2018 09:41:34 -0700 Message-ID: Subject: Re: LVM snapshot broke between 4.14 and 4.16 To: wgh@torlan.ru Cc: Ilya Dryomov , Jens Axboe , linux-block , Linux Kernel Mailing List , Sagi Grimberg , Mike Snitzer , dm-devel@redhat.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 2, 2018 at 8:16 AM WGH wrote: > > On 08/02/2018 04:31 PM, Ilya Dryomov wrote: > > > > From a quick look, --permission r sets DM_READONLY_FLAG, which makes dm > > mark the disk read-only with set_disk_ro(dm_disk(md), 1) in do_resume(). > > A bit later it tries to write to the disk from write_header(): > > > > return chunk_io(ps, ps->header_area, 0, REQ_OP_WRITE, 0, 1); > > > > Thanks, > > > > Ilya > > After further investigation, this was fixed on lvm2 side (userspace) in > https://sourceware.org/git/?p=lvm2.git;a=commit;h=a6fdb9d9d70f51c49ad11a87ab4243344e6701a3 > (snapshot: keep COW writable for read-only volumes). > > So I guess that's it. Time to poke my distribution package maintainers > to bump the package version. That is *not* how kernel development is supposed to work. If your script used to work, it should continue to work. Why did it use to work despite that read-only flag? And what was it that actually broke this? We remain bug-for-bug compatible with older kernel versions when people depend on the bugs. Unless the old bugs are security issues, and even then we try to make it _look_ like we work the same way. Or was it a user-space lvm tool that broke in the first place, and the kernel release update was a red herring? Linus