From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:55182 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726956AbeIDSca (ORCPT ); Tue, 4 Sep 2018 14:32:30 -0400 Date: Tue, 4 Sep 2018 16:07:13 +0200 From: Jan Kara To: Paul Moore Cc: jack@suse.cz, linux-audit@redhat.com, linux-fsdevel@vger.kernel.org, viro@zeniv.linux.org.uk, rgb@redhat.com, amir73il@gmail.com Subject: Re: [PATCH 09/10] audit: Allocate fsnotify mark independently of chunk Message-ID: <20180904140713.GI9444@quack2.suse.cz> References: <20180710100217.12866-1-jack@suse.cz> <20180710100217.12866-10-jack@suse.cz> <20180904140307.GH9444@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180904140307.GH9444@quack2.suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Tue 04-09-18 16:03:07, Jan Kara wrote: > On Fri 27-07-18 00:47:37, Paul Moore wrote: > > On Tue, Jul 10, 2018 at 6:02 AM Jan Kara wrote: > > > Allocate fsnotify mark independently instead of embedding it inside > > > chunk. This will allow us to just replace chunk attached to mark when > > > growing / shrinking chunk instead of replacing mark attached to inode > > > which is a more complex operation. > > > > > > Signed-off-by: Jan Kara > > > --- > > > kernel/audit_tree.c | 59 ++++++++++++++++++++++++++++++++++++++++------------- > > > 1 file changed, 45 insertions(+), 14 deletions(-) > > > > ... > > > > > diff --git a/kernel/audit_tree.c b/kernel/audit_tree.c > > > index bce3b04a365d..aec9b27a20ff 100644 > > > --- a/kernel/audit_tree.c > > > +++ b/kernel/audit_tree.c > > > @@ -38,6 +38,11 @@ struct audit_chunk { > > > } owners[]; > > > }; > > > > > > +struct audit_tree_mark { > > > + struct fsnotify_mark fsn_mark; > > > + struct audit_chunk *chunk; > > > +}; > > > > It's probably okay to just call it "mark" considering we call > > fsnotify_mark fields "mark" elsewhere. If we are going to change it > > in one spot we should probably change it other places as well for the > > sake of readability. > > The current notation is that 'fsn_mark' (or sometimes 'entry') is struct > fsnotify_mark while plain 'mark' is struct audit_tree_mark (well, except > for audit_chunk AFAICS). So just replacing fsn_mark with mark is IMO going > to cause more confusion. But if you prefer different naming convention, > this is the right moment to bring some consistency into the whole thing. > So how do you prefer to differentiate between fsnotify_mark and > audit_tree_mark? After searching the code and given your observation that audit_tree_mark is rarely directly used, I guess I'll just make fsn_mark -> mark, entry->mark renaming and invent some name for the few places where we use audit_tree_mark directly. Honza -- Jan Kara SUSE Labs, CR