Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1104962pxa; Wed, 5 Aug 2020 22:53:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzt12wrUF+tPAQv9+T3a1mVORBXwu7s24qm1yXSLYBDLXe9HogoZB49puQU4SEC9fSuqHCn X-Received: by 2002:a17:906:528d:: with SMTP id c13mr2835742ejm.61.1596693183391; Wed, 05 Aug 2020 22:53:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596693183; cv=none; d=google.com; s=arc-20160816; b=sc+63d3e4iCVPJ6bI6+46cXLBbsTPGUg6GZm6xKHWZSSM9eLgHFEIePZXD9OCCDbev smYTf5wQuHxe4hn0AHUaEqCZYiMgwHbxaXjX9nDuBdA6kxEaR78f6ImIA6sLzJ3Ms2S1 rBR+lz3Euf+ts2qlK0nfN4aFpRToD8dHxT2ffhMST0TnZJq1nWYK0cPJUVVjJwiMfjZp EenysRoumh3u7LM1j+9rKCVs1jinYnkJ+4D3R4eG5S9dFn3ubPT3NWSb/UqE3+rOBRSS QIu5VJVUMBAHXVsC0xVdfApFoRWXUOQEWY2oV6KSXz/DCP2EMvu01XK/kaqm6oPtCKO1 LOEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=3ukho6QM2gAFVTblnedcZx+SQ+8YkaBcrEi+bekIdXY=; b=iNB3vN3g/HJTpuMT39rby5qmqEkSBFJqfbuM89tB4YoxZjNEDCYVPcwPYnFlhojnBU yrS7YpQrIxs8nw8M9ptmRf3rKRFXHxOnZeMx/gIIzbrZZHx/YAhFmVeVM+PUHloOHoeh sM1fimcMUR7/s3hJEh8aN96MSdr1IfN0+NDPSrfzN+G4sDh5LtrJY2bXHvyXWwBtliVd s6wMNjN5HnOPt8YVQQrV6ji0v4Q5UUKgastYm8s9GBojv/RohC8POVjnqBOcH4ggIouk sz/KdFP2z+B+tBhy6H6TR33EZlkStItbMEVhtpNq6MO4bgY7lsRDigseSkG+K+Ho+Ezs bc6Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w13si2825358edu.248.2020.08.05.22.52.39; Wed, 05 Aug 2020 22:53:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726149AbgHFFwh (ORCPT + 99 others); Thu, 6 Aug 2020 01:52:37 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:49484 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726051AbgHFFwh (ORCPT ); Thu, 6 Aug 2020 01:52:37 -0400 Received: from callcc.thunk.org (pool-96-230-252-158.bstnma.fios.verizon.net [96.230.252.158]) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id 0765qX2u000522 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 6 Aug 2020 01:52:33 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 0CDA0420263; Thu, 6 Aug 2020 01:52:33 -0400 (EDT) Date: Thu, 6 Aug 2020 01:52:32 -0400 From: tytso@mit.edu To: Lukas Czerner Cc: linux-ext4@vger.kernel.org Subject: Re: [PATCH] ext4: handle option set by mount flags correctly Message-ID: <20200806055232.GN7657@mit.edu> References: <20200723150526.19931-1-lczerner@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200723150526.19931-1-lczerner@redhat.com> Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jul 23, 2020 at 05:05:26PM +0200, Lukas Czerner wrote: > Currently there is a problem with mount options that can be both set by > vfs using mount flags or by a string parsing in ext4. > > i_version/iversion options gets lost after remount, for example > > $ mount -o i_version /dev/pmem0 /mnt > $ grep pmem0 /proc/self/mountinfo | grep i_version > 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,seclabel,i_version > $ mount -o remount,ro /mnt > $ grep pmem0 /proc/self/mountinfo | grep i_version > > nolazytime gets ignored by ext4 on remount, for example > > $ mount -o lazytime /dev/pmem0 /mnt > $ grep pmem0 /proc/self/mountinfo | grep lazytime > 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,lazytime,seclabel > $ mount -o remount,nolazytime /mnt > $ grep pmem0 /proc/self/mountinfo | grep lazytime > 310 95 259:0 / /mnt rw,relatime shared:163 - ext4 /dev/pmem0 rw,lazytime,seclabel > > Fix it by applying the SB_LAZYTIME and SB_I_VERSION flags from *flags to > s_flags before we parse the option and use the resulting state of the > same flags in *flags at the end of successful remount. > > Signed-off-by: Lukas Czerner Thanks, applied. - Ted