linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Christian Brauner <brauner@kernel.org>, Jan Kara <jack@suse.cz>,
	Jens Axboe <axboe@kernel.dk>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH 02/10] fsnotify: create helpers to get sb and connp from object
Date: Wed, 20 Mar 2024 10:57:41 +0100	[thread overview]
Message-ID: <20240320095741.iwfcrhya7s4lkxcs@quack3> (raw)
In-Reply-To: <CAOQ4uxi+uPePQKeqGiOLbqCvCyWKMsH4AJjZ7NXEH+SD7CQvbw@mail.gmail.com>

On Wed 20-03-24 10:34:45, Amir Goldstein wrote:
> On Wed, Mar 20, 2024 at 10:29 AM Christian Brauner <brauner@kernel.org> wrote:
> >
> > On Sun, Mar 17, 2024 at 08:41:46PM +0200, Amir Goldstein wrote:
> > > In preparation to passing an object pointer to add/remove/find mark
> > > helpers, create helpers to get sb and connp by object type.
> > >
> > > Signed-off-by: Amir Goldstein <amir73il@gmail.com>
> > > ---
> > >  fs/notify/fsnotify.h | 14 ++++++++++++++
> > >  fs/notify/mark.c     | 14 ++++++++++++++
> > >  2 files changed, 28 insertions(+)
> > >
> > > diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h
> > > index fde74eb333cc..87456ce40364 100644
> > > --- a/fs/notify/fsnotify.h
> > > +++ b/fs/notify/fsnotify.h
> > > @@ -27,6 +27,20 @@ static inline struct super_block *fsnotify_conn_sb(
> > >       return container_of(conn->obj, struct super_block, s_fsnotify_marks);
> > >  }
> > >
> > > +static inline struct super_block *fsnotify_object_sb(void *obj, int obj_type)
> >
> > If I read correctly, then in some places you use unsigned int obj_type
> > and here you use int obj_type. The best option would likely be to just
> > introduce an enum fsnotify_obj_type either in this series or in a
> > follow-up series.
> 
> Good point.
> 
> There is an enum already but we do not use it.
> Jan, WDYT?

Yeah. So far we just use enum fsnotify_obj_type to define values but don't
use it as a type itself. I guess it would be worthy cleanup but not in this
series. Here I guess we could just use the enum instead of introducing new
functions taking 'int' argument.

								Honza

-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

  reply	other threads:[~2024-03-20  9:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-17 18:41 [PATCH 00/10] Further reduce overhead of fsnotify permission hooks Amir Goldstein
2024-03-17 18:41 ` [PATCH 01/10] fsnotify: rename fsnotify_{get,put}_sb_connectors() Amir Goldstein
2024-03-27 10:01   ` Jan Kara
2024-03-27 10:05     ` Amir Goldstein
2024-03-17 18:41 ` [PATCH 02/10] fsnotify: create helpers to get sb and connp from object Amir Goldstein
2024-03-20  8:28   ` Christian Brauner
2024-03-20  8:34     ` Amir Goldstein
2024-03-20  9:57       ` Jan Kara [this message]
2024-03-17 18:41 ` [PATCH 03/10] fsnotify: create a wrapper fsnotify_find_inode_mark() Amir Goldstein
2024-03-17 18:41 ` [PATCH 04/10] fanotify: merge two checks regarding add of ignore mark Amir Goldstein
2024-03-17 18:41 ` [PATCH 05/10] fsnotify: pass object pointer and type to fsnotify mark helpers Amir Goldstein
2024-03-17 18:41 ` [PATCH 06/10] fsnotify: create helper fsnotify_update_sb_watchers() Amir Goldstein
2024-03-17 18:41 ` [PATCH 07/10] fsnotify: lazy attach fsnotify_sb_info state to sb Amir Goldstein
2024-03-20  8:47   ` Christian Brauner
2024-03-20  9:37     ` Amir Goldstein
2024-03-20  9:51       ` Jan Kara
2024-03-20 10:13         ` Christian Brauner
2024-03-17 18:41 ` [PATCH 08/10] fsnotify: move s_fsnotify_connectors into fsnotify_sb_info Amir Goldstein
2024-03-20  9:00   ` Christian Brauner
2024-03-17 18:41 ` [PATCH 09/10] fsnotify: use an enum for group priority constants Amir Goldstein
2024-03-17 18:41 ` [PATCH 10/10] fsnotify: optimize the case of no permission event watchers Amir Goldstein
2024-03-19  9:59 ` [PATCH 00/10] Further reduce overhead of fsnotify permission hooks Amir Goldstein
2024-04-04 14:34   ` Jan Kara
2024-04-04 14:41     ` Amir Goldstein
2024-04-04 15:53       ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240320095741.iwfcrhya7s4lkxcs@quack3 \
    --to=jack@suse.cz \
    --cc=amir73il@gmail.com \
    --cc=axboe@kernel.dk \
    --cc=brauner@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).