Received: by 10.223.185.116 with SMTP id b49csp4337263wrg; Mon, 26 Feb 2018 15:56:06 -0800 (PST) X-Google-Smtp-Source: AH8x225QwvXglu3sHGh7pfaeThHAJPQXkxa3eC/iLlvw4yuwneTlVhin5Ltw59Rnbwd+tMfiIwhC X-Received: by 10.98.48.2 with SMTP id w2mr12166112pfw.162.1519689366457; Mon, 26 Feb 2018 15:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519689366; cv=none; d=google.com; s=arc-20160816; b=jo6BsiKLpO3tOBK7iZE0VaKaMIDm0aglP1qg7M2XVQCUwb6lZjIGNA5aECwl6esmmZ QipDlfKFli4xmj6vk2kyiPPuo6v8ONgrBMjwpHh8nGi77CzY0vg3dE6D+63vcwl2tpet Lca+4ceSMOO6Hln0EfUZRZCfJtVpQlb84uZ4Ewu9RmGPdgbzqB/EJllfb2CBJIyDhM+r PkGexjvPBDdJaNS2TaD7aBH03DVxvm80jqnh3gEhIPO4d8pAndOhknghiPMkxBFlBXhO D03y3rfXjGEftFm8t1T6EiHdw7JOhbEmOw5BQV7mEGJfMzuMXYsa1Cww1JobNep1Wmly 4t8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:subject:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=JmtUyJiC28wenDqFrJsQ/rqHCVHpRDJyhyBwiqZrHos=; b=pgKR0qnOj5KbUI/AYFPMNc1cEA4/JyTDnWDYoZV4EAxxJl7bTAHVu8oC2hOEnFEJ3K zS9qhVqiec5Dn6aEvvFyhVAwCC7fx7oZSwpR1WBohYSqr9avP/is5OboYxW9CAGePhGL iC17R0/+54RNGj3jfaVBhvS8D78+D6LXHRWtVQYniByFWXLnb8T1RdQxa4kvFXseSVTr QgHnEf6sRerjrxEC58SIA84JyDR1XLeu2aWFkXImRN50BuTUhM/X+7XhmwZeUohENZS+ ho7LiUHKzZgpT65jp2n35joQ884BqpKqqVxvdAnEj9v2WQ/2L3rWijCl+948IYDN24SE 3cvw== 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 186si7488034pfe.411.2018.02.26.15.55.50; Mon, 26 Feb 2018 15:56:06 -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 S1751768AbeBZXym (ORCPT + 99 others); Mon, 26 Feb 2018 18:54:42 -0500 Received: from out01.mta.xmission.com ([166.70.13.231]:59845 "EHLO out01.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751675AbeBZXy0 (ORCPT ); Mon, 26 Feb 2018 18:54:26 -0500 Received: from in02.mta.xmission.com ([166.70.13.52]) by out01.mta.xmission.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1eqSbB-0004WN-Tq; Mon, 26 Feb 2018 16:54:25 -0700 Received: from 174-19-85-160.omah.qwest.net ([174.19.85.160] helo=x220.int.ebiederm.org) by in02.mta.xmission.com with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.87) (envelope-from ) id 1eqSbB-0005iL-DO; Mon, 26 Feb 2018 16:54:25 -0700 From: "Eric W. Biederman" To: Miklos Szeredi Cc: linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, linux-fsdevel@vger.kernel.org, Alban Crequy , Seth Forshee , Sargun Dhillon , Dongsu Park , "Serge E. Hallyn" , "Eric W. Biederman" Date: Mon, 26 Feb 2018 17:52:59 -0600 Message-Id: <20180226235302.12708-4-ebiederm@xmission.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <87po4rz4ui.fsf_-_@xmission.com> References: <87po4rz4ui.fsf_-_@xmission.com> X-XM-SPF: eid=1eqSbB-0005iL-DO;;;mid=<20180226235302.12708-4-ebiederm@xmission.com>;;;hst=in02.mta.xmission.com;;;ip=174.19.85.160;;;frm=ebiederm@xmission.com;;;spf=neutral X-XM-AID: U2FsdGVkX1//9JS+0CbA0AiBz6rUKt//SmBQIKZtfB4= 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.6 required=8.0 tests=ALL_TRUSTED,BAYES_50, DCC_CHECK_NEGATIVE,TVD_RCVD_IP,T_TooManySym_01,T_TooManySym_02, XMSolicitRefs_0,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.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4994] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug * 0.0 T_TooManySym_01 4+ unique symbols in subject * 0.0 T_TooManySym_02 5+ 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 171 ms - load_scoreonly_sql: 0.03 (0.0%), signal_user_changed: 2.9 (1.7%), b_tie_ro: 2.1 (1.2%), parse: 0.93 (0.5%), extract_message_metadata: 10 (5.7%), get_uri_detail_list: 0.85 (0.5%), tests_pri_-1000: 6 (3.2%), tests_pri_-950: 1.14 (0.7%), tests_pri_-900: 0.95 (0.6%), tests_pri_-400: 16 (9.5%), check_bayes: 15 (8.9%), b_tokenize: 4.7 (2.7%), b_tok_get_all: 5 (3.0%), b_comp_prob: 1.41 (0.8%), b_tok_touch_all: 2.3 (1.4%), b_finish: 0.62 (0.4%), tests_pri_0: 126 (73.5%), check_dkim_signature: 0.59 (0.3%), check_dkim_adsp: 2.4 (1.4%), tests_pri_500: 5 (3.1%), rewrite_mail: 0.00 (0.0%) Subject: [PATCH v7 4/7] fuse: Cache a NULL acl when FUSE_GETXATTR returns -ENOSYS 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 in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When FUSE_GETXATTR will never return anything call cache_no_acl to cache that state in the vfs as well in fuse with fc->no_getxattr. The only code path this affects are the code paths that call fuse_get_acl and caching a NULL or returning it immediately is exactly the same effect so this should not effect anything. This keeps the vfs from waisting it's time calling down into fuse when fuse isn't going to do anything, and it makes it clear when a NULL should be cached for optimal performance. Signed-off-by: "Eric W. Biederman" --- fs/fuse/xattr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/xattr.c b/fs/fuse/xattr.c index 3caac46b08b0..0520a4f47226 100644 --- a/fs/fuse/xattr.c +++ b/fs/fuse/xattr.c @@ -82,6 +82,7 @@ ssize_t fuse_getxattr(struct inode *inode, const char *name, void *value, ret = min_t(ssize_t, outarg.size, XATTR_SIZE_MAX); if (ret == -ENOSYS) { fc->no_getxattr = 1; + cache_no_acl(inode); ret = -EOPNOTSUPP; } return ret; -- 2.14.1