Received: by 10.223.185.116 with SMTP id b49csp83697wrg; Fri, 2 Mar 2018 14:07:18 -0800 (PST) X-Google-Smtp-Source: AG47ELsCZuEN5vLfWfd7CSLLlCmWyBBFs3221SVgfsODHTAYk5jjTdJBlq+XzcsNILQQtbWzaUeJ X-Received: by 10.99.112.20 with SMTP id l20mr5789436pgc.412.1520028437953; Fri, 02 Mar 2018 14:07:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520028437; cv=none; d=google.com; s=arc-20160816; b=zlmBk1liM5J6dPgWXaYsr4rBAI4fI1korlX0rtGLnHDsNndeSjKe76Qn7sfXjMXoaw EljsvQxCJjrLQaEo/ooqlQQ0Uhiin/Bm7ijG9F3jVg6dkh0ocXnkTq7QYXRzHAkUjxgf kqb5F/6be4Qa7UgZMb0EYFJWpLV9GQJjhgEhO+gViy6QsWPp7nNEQvFSzG3SK6RczBi/ xnD2kaLszc74oCml12tuCIbqcRGPO9h4pUYjX7UsW7GGjLUrVS0mRrkLZr0fES1GHqX+ PBsvtpFyXGa4VR8qphKQPBb86PMy/9gKaFPncq6MTabTBiHMVWqtauaTBh81pjdrTQst tbiA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:mime-version:user-agent :message-id:in-reply-to:date:references:cc:to:from :arc-authentication-results; bh=55Uar31Irt3L+deNesShOtgRCjKM8IAOSxZV86YygIY=; b=vUG7WL4tUsdKDOreE9DTB+d8fwX1f5Po8EgZLYF+IUjB+x2RcFckyf+ROK9WwoPo+D rdHQQ4gbe0ozr8LbEJ3f9sdPYfCK8GNQChK2NQNCWNcvwxjC3edn3xOieEhueYu0+Mqt SWt7ssjGnNvbfk3b2nnoHXf5D25ZaJMOMriL6B6DWkzGtK7zTuYA94EmM/euEYbLdLZw EaSg7+Hxc608nHwbArDEufQwzu0NIqf0boREO1j+mdfYUNAIb880WkXTEXy+tkDrYlSi 4HKt+xvV0fH6X4uqYfdPUJFnjpClwb0wO1h3MQwZDfsJlS5XkBvNkQ+CiZf5cbXVLy63 uzkg== 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 w9si4585939pgo.82.2018.03.02.14.07.03; Fri, 02 Mar 2018 14:07:17 -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; 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 S932385AbeCBVug (ORCPT + 99 others); Fri, 2 Mar 2018 16:50:36 -0500 Received: from out02.mta.xmission.com ([166.70.13.232]:48920 "EHLO out02.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932131AbeCBVue (ORCPT ); Fri, 2 Mar 2018 16:50:34 -0500 Received: from in01.mta.xmission.com ([166.70.13.51]) by out02.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1ersZU-0003x4-TL; Fri, 02 Mar 2018 14:50:32 -0700 Received: from 174-19-85-160.omah.qwest.net ([174.19.85.160] helo=x220.xmission.com) by in01.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1ersZU-00067Y-6n; Fri, 02 Mar 2018 14:50:32 -0700 From: ebiederm@xmission.com (Eric W. Biederman) To: Miklos Szeredi Cc: lkml , Linux Containers , linux-fsdevel , Alban Crequy , Seth Forshee , Sargun Dhillon , Dongsu Park , "Serge E. Hallyn" References: <87po4rz4ui.fsf_-_@xmission.com> <20180226235302.12708-5-ebiederm@xmission.com> Date: Fri, 02 Mar 2018 15:49:56 -0600 In-Reply-To: (Miklos Szeredi's message of "Tue, 27 Feb 2018 10:00:25 +0100") Message-ID: <87fu5i9mgr.fsf@xmission.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-SPF: eid=1ersZU-00067Y-6n;;;mid=<87fu5i9mgr.fsf@xmission.com>;;;hst=in01.mta.xmission.com;;;ip=174.19.85.160;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX18M8r3PpH9aWfkmmNgc6Uai8WKA3qn5Ehg= X-SA-Exim-Connect-IP: 174.19.85.160 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa06.xmission.com X-Spam-Level: X-Spam-Status: No, score=0.5 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TM2_M_HEADER_IN_MSG,T_TooManySym_01, XMSubLong autolearn=disabled version=3.4.1 X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.7 XMSubLong Long Subject * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4782] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.0 T_TooManySym_01 4+ unique symbols in subject X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;Miklos Szeredi X-Spam-Relay-Country: X-Spam-Timing: total 190 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.9 (1.5%), b_tie_ro: 1.86 (1.0%), parse: 0.75 (0.4%), extract_message_metadata: 9 (4.9%), get_uri_detail_list: 1.22 (0.6%), tests_pri_-1000: 5 (2.8%), tests_pri_-950: 1.11 (0.6%), tests_pri_-900: 0.99 (0.5%), tests_pri_-400: 18 (9.7%), check_bayes: 17 (9.2%), b_tokenize: 6 (3.0%), b_tok_get_all: 6 (3.1%), b_comp_prob: 1.88 (1.0%), b_tok_touch_all: 2.4 (1.3%), b_finish: 0.54 (0.3%), tests_pri_0: 145 (76.2%), check_dkim_signature: 0.47 (0.2%), check_dkim_adsp: 2.4 (1.3%), tests_pri_500: 4.0 (2.1%), rewrite_mail: 0.00 (0.0%) Subject: Re: [PATCH v7 5/7] fuse: Simplfiy the posix acl handling logic. X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Thu, 05 May 2016 13:38:54 -0600) X-SA-Exim-Scanned: Yes (on in01.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Miklos Szeredi writes: > On Tue, Feb 27, 2018 at 12:53 AM, Eric W. Biederman > wrote: >> Rename the fuse connection flag posix_acl to cached_posix_acl as that >> is what it actually means. That fuse will cache and operate on the >> cached value of the posix acl. >> >> When fc->cached_posix_acl is not set, set ACL_DONT_CACHE on the inode >> so that get_acl and friends won't cache the acl values even if they >> are called. >> >> Replace forget_all_cached_acls with fuse_forget_cached_acls. This >> wrapper only takes effect when cached_posix_acl is true to prevent >> losing the nocache or noxattr status in when posix acls are not >> cached. > > Shouldn't forget_cached_acl() be taught about ACL_DONT_CACHE? I think > it makes sense to generally not clear ACL_DONT_CACHE, since it's not > an actual acl value that needs forgetting. After stopping to make certain I understand the issues, I don't think it makes sense to teach forget_cached_acl about ACL_DONT_CACHE. If you are fogetting a cached attribute ACL_DONT_CACHE simply doesn't make sense. Further it makes sense to cache a negative result for fuse when !fc->no_getxattr. Even if you would ordinarily not cache posix acls. So I think the better plan is to teach the posix acl code how to not cache results on a case by case basis. As I did in my rfc patch I posted a little earlier today. That works with forget_cached_acl and it supports local reasoning. Further while the performance might not be as good as ACL_DONT_CACHE I don't think that matters as always going to the fuse server to get acls is almost certainly going to dominate the acl costs. Eric