From: Greg KH <greg@kroah.com>
To: Beata Michalska <b.michalska@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
linux-api@vger.kernel.org, jack@suse.cz, tytso@mit.edu,
adilger.kernel@dilger.ca, hughd@google.com, lczerner@redhat.com,
hch@infradead.org, linux-ext4@vger.kernel.org,
linux-mm@kvack.org, kyungmin.park@samsung.com,
kmpark@infradead.org
Subject: Re: [RFC v2 1/4] fs: Add generic file system event notifications
Date: Mon, 27 Apr 2015 16:24:21 +0200 [thread overview]
Message-ID: <20150427142421.GB21942@kroah.com> (raw)
In-Reply-To: <1430135504-24334-2-git-send-email-b.michalska@samsung.com>
On Mon, Apr 27, 2015 at 01:51:41PM +0200, Beata Michalska wrote:
> Introduce configurable generic interface for file
> system-wide event notifications, to provide file
> systems with a common way of reporting any potential
> issues as they emerge.
>
> The notifications are to be issued through generic
> netlink interface by newly introduced multicast group.
>
> Threshold notifications have been included, allowing
> triggering an event whenever the amount of free space drops
> below a certain level - or levels to be more precise as two
> of them are being supported: the lower and the upper range.
> The notifications work both ways: once the threshold level
> has been reached, an event shall be generated whenever
> the number of available blocks goes up again re-activating
> the threshold.
>
> The interface has been exposed through a vfs. Once mounted,
> it serves as an entry point for the set-up where one can
> register for particular file system events.
>
> Signed-off-by: Beata Michalska <b.michalska@samsung.com>
> ---
> Documentation/filesystems/events.txt | 231 ++++++++++
> fs/Makefile | 1 +
> fs/events/Makefile | 6 +
> fs/events/fs_event.c | 770 ++++++++++++++++++++++++++++++++++
> fs/events/fs_event.h | 25 ++
> fs/events/fs_event_netlink.c | 99 +++++
> fs/namespace.c | 1 +
> include/linux/fs.h | 6 +-
> include/linux/fs_event.h | 58 +++
> include/uapi/linux/fs_event.h | 54 +++
> include/uapi/linux/genetlink.h | 1 +
> net/netlink/genetlink.c | 7 +-
> 12 files changed, 1257 insertions(+), 2 deletions(-)
> create mode 100644 Documentation/filesystems/events.txt
> create mode 100644 fs/events/Makefile
> create mode 100644 fs/events/fs_event.c
> create mode 100644 fs/events/fs_event.h
> create mode 100644 fs/events/fs_event_netlink.c
> create mode 100644 include/linux/fs_event.h
> create mode 100644 include/uapi/linux/fs_event.h
Any reason why you just don't do uevents for the block devices today,
and not create a new type of netlink message and userspace tool required
to read these?
> --- a/fs/Makefile
> +++ b/fs/Makefile
> @@ -126,3 +126,4 @@ obj-y += exofs/ # Multiple modules
> obj-$(CONFIG_CEPH_FS) += ceph/
> obj-$(CONFIG_PSTORE) += pstore/
> obj-$(CONFIG_EFIVAR_FS) += efivarfs/
> +obj-y += events/
Always?
> diff --git a/fs/events/Makefile b/fs/events/Makefile
> new file mode 100644
> index 0000000..58d1454
> --- /dev/null
> +++ b/fs/events/Makefile
> @@ -0,0 +1,6 @@
> +#
> +# Makefile for the Linux Generic File System Event Interface
> +#
> +
> +obj-y := fs_event.o
Always? Even if the option is not selected? Why is everyone forced to
always use this code? Can't you disable it for the "tiny" systems that
don't need it?
> +struct fs_trace_entry {
> + atomic_t count;
Why not just use a 'struct kref' for your count, which will save a bunch
of open-coding of reference counting, and forcing us to audit your code
to verify you got all the corner cases correct? :)
> + atomic_t active;
> + struct super_block *sb;
Are you properly reference counting this pointer? I didn't see where
that was happening, so I must have missed it.
thanks,
greg k-h
next prev parent reply other threads:[~2015-04-27 14:24 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-27 11:51 [RFC v2 0/4] fs: Add generic file system event notifications Beata Michalska
2015-04-27 11:51 ` [RFC v2 1/4] " Beata Michalska
2015-04-27 14:24 ` Greg KH [this message]
2015-04-27 15:08 ` Beata Michalska
2015-04-27 15:37 ` Greg KH
2015-04-28 9:05 ` Beata Michalska
2015-04-28 13:56 ` Jan Kara
2015-04-28 14:09 ` Greg KH
2015-04-28 14:46 ` Beata Michalska
2015-04-28 17:39 ` Greg KH
2015-04-29 7:03 ` Beata Michalska
2015-04-29 7:42 ` Jan Kara
2015-04-29 9:13 ` Greg KH
2015-04-29 11:10 ` Beata Michalska
2015-04-29 13:45 ` Greg KH
2015-04-29 15:48 ` Beata Michalska
2015-04-29 15:55 ` Greg KH
2015-04-30 8:21 ` Beata Michalska
2015-05-05 12:16 ` Beata Michalska
2015-05-07 11:57 ` Beata Michalska
2015-05-26 16:39 ` Beata Michalska
2015-05-27 2:34 ` Greg KH
2015-05-27 13:32 ` Beata Michalska
2015-04-27 11:51 ` [RFC v2 2/4] ext4: Add helper function to mark group as corrupted Beata Michalska
2015-04-27 11:51 ` [RFC v2 3/4] ext4: Add support for generic FS events Beata Michalska
2015-04-27 11:51 ` [RFC v2 4/4] shmem: " Beata Michalska
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=20150427142421.GB21942@kroah.com \
--to=greg@kroah.com \
--cc=adilger.kernel@dilger.ca \
--cc=b.michalska@samsung.com \
--cc=hch@infradead.org \
--cc=hughd@google.com \
--cc=jack@suse.cz \
--cc=kmpark@infradead.org \
--cc=kyungmin.park@samsung.com \
--cc=lczerner@redhat.com \
--cc=linux-api@vger.kernel.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=tytso@mit.edu \
/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).