Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1413482ybg; Wed, 29 Jul 2020 13:37:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzV2KWMDqV1S9Dw5ckhVunDvHVhR2nhJb1IXUfEZSGI/nODmjUL6v44d5josPofNtU+9GH X-Received: by 2002:a05:6402:896:: with SMTP id e22mr115522edy.3.1596055058848; Wed, 29 Jul 2020 13:37:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596055058; cv=none; d=google.com; s=arc-20160816; b=Q9WJ32pvmo2ar7YRRntqINjlmeEMoNlDE98het6ul0XXhLvg9vsHSmSt8o9KlRZEFU SKwG6GImDRpmPXaQUTEYxB2jMdNKmotk97CPeoX7v++jVkeYOGZW1P+19QsEOXBlE2sz Ww9XFB/oxvt/syvgVeNnpYtcC3KkXKhfJR7d6r9005nfbdSru3rFPGyAAeDmerG8UghW uDbqi0d+HG6Z+2Hdr0hJhl8d1GwBh18OB7VK5LmrIXIUf4YTIyCsNoZYyuIThRBwrFHR D+j5hledLci7PzAeD4O8417PBumn1lcQtPJN/ZcLCd6ZttolQ12wQs3KQWpDnWK6dO0W 0OMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:content-id:mime-version :subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=JKV4hl15ZgHUpqQ9Lksec6wqiZBzDGUrjHq91E2NpOk=; b=gI+JiAn1ca8oCrpfd43iw0uJjkPliibKrIw8JGAZUvNmtnRwDLWrdfraB6weLmz4Yo KatraNPn+pLj5SGr6AG5sYXRk80+Wc9fLNq2Z+sXiWxw2LiG26RLRJQjclUBihDZ7HdB OVsep6drvCjNrb9nIKoI5AFeEOGu/ip6y3lyQBe1/cewUA573Uh84i/C5b78Tw4b5QVu QYKjtGLpXEvGifKIWfHoHMskh2Pk2yx8IqHjJeU4bbrayPhwcRGSwr8uBgmLPbLvflpV 7CHNUa5+8zmoqVATsHQb7v+FmIHZtLvU+WLSsRAUimHdpzEYaNNoqH6djC0qlYxskfz0 RCPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bn3B9Gqg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id k5si866272edj.561.2020.07.29.13.37.16; Wed, 29 Jul 2020 13:37:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Bn3B9Gqg; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726718AbgG2UhH (ORCPT + 99 others); Wed, 29 Jul 2020 16:37:07 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:45589 "EHLO us-smtp-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726365AbgG2UhH (ORCPT ); Wed, 29 Jul 2020 16:37:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596055026; 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: in-reply-to:in-reply-to:references:references; bh=JKV4hl15ZgHUpqQ9Lksec6wqiZBzDGUrjHq91E2NpOk=; b=Bn3B9Gqg41Mcfiek5DIVDT7/IKBhOjQiC9Zx+EYLZWyeCiVrFrqA1VyMxFLJJYd12nh3hs I9yMxkIxVFIE6tDDgxrZKTFSAqjq2xMewCM/+hrD2buy36dhTspQI4g5WAOplvwkAybf81 PjGaYtI3G2A/N9gViBa3QbeQ3WbwNsw= 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-307-Jb_l5AyvN1uvbQWUg6XcCA-1; Wed, 29 Jul 2020 16:37:04 -0400 X-MC-Unique: Jb_l5AyvN1uvbQWUg6XcCA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7F19C8005B0; Wed, 29 Jul 2020 20:37:02 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-32.rdu2.redhat.com [10.10.112.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id B8CDA5F7D8; Wed, 29 Jul 2020 20:36:57 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <0b154b9b-728f-7d57-d4c5-ec25fc9dfdf3@toxicpanda.com> References: <0b154b9b-728f-7d57-d4c5-ec25fc9dfdf3@toxicpanda.com> To: Josef Bacik Cc: dhowells@redhat.com, Linus Torvalds , Al Viro , Eric Sandeen , Christoph Hellwig , Linux Kernel Mailing List , Linux FS Devel , David Sterba Subject: Re: Inverted mount options completely broken (iversion,relatime) MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <4007795.1596055016.1@warthog.procyon.org.uk> Date: Wed, 29 Jul 2020 21:36:56 +0100 Message-ID: <4007797.1596055016@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Josef Bacik wrote: > So my question is, what do we do here? Hmmm... As the code stands, MS_RDONLY, MS_SYNCHRONOUS, MS_MANDLOCK, MS_I_VERSION and MS_LAZYTIME should all be masked off before the new flags are set if called from mount(2) rather than fsconfig(2). do_remount() gives MS_RMT_MASK to fs_context_for_reconfigure() to load into fc->sb_flags_mask, which should achieve the desired effect in reconfigure_super() on this line: WRITE_ONCE(sb->s_flags, ((sb->s_flags & ~fc->sb_flags_mask) | (fc->sb_flags & fc->sb_flags_mask))); David