From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [PATCH v7 5/7] fuse: Simplfiy the posix acl handling logic. Sender: linux-kernel-owner@vger.kernel.org List-ID: 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