From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753885AbbDQNQd (ORCPT ); Fri, 17 Apr 2015 09:16:33 -0400 Received: from cantor2.suse.de ([195.135.220.15]:32918 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752034AbbDQNQb (ORCPT ); Fri, 17 Apr 2015 09:16:31 -0400 Date: Fri, 17 Apr 2015 15:16:28 +0200 From: Jan Kara To: Beata Michalska Cc: Jan Kara , linux-kernel@vger.kernel.org, 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, Linux Filesystem Mailing List , linux-api@vger.kernel.org Subject: Re: [RFC 1/4] fs: Add generic file system event notifications Message-ID: <20150417131628.GA21539@quack.suse.cz> References: <1429082147-4151-1-git-send-email-b.michalska@samsung.com> <1429082147-4151-2-git-send-email-b.michalska@samsung.com> <20150417113110.GD3116@quack.suse.cz> <553104E5.2040704@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <553104E5.2040704@samsung.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri 17-04-15 15:04:37, Beata Michalska wrote: > On 04/17/2015 01:31 PM, Jan Kara wrote: > > On Wed 15-04-15 09:15:44, Beata Michalska wrote: > > Also I think that we should make it clear that each event type has > > different set of arguments. For threshold events they'll be L1 & L2, for > > other events there may be no arguments, for other events maybe something > > else... > > > > Currently only the threshold events use arguments - not sure what arguments > could be used for the remaining notifications. But any suggestions are welcomed. Me neither be someone will surely find something in future ;) > > ... > >> +static const match_table_t fs_etypes = { > >> + { FS_EVENT_INFO, "info" }, > >> + { FS_EVENT_WARN, "warn" }, > >> + { FS_EVENT_THRESH, "thr" }, > >> + { FS_EVENT_ERR, "err" }, > >> + { 0, NULL }, > >> +}; > > Why are there these generic message types? Threshold messages make good > > sense to me. But not so much the rest. If they don't have a clear meaning, > > it will be a mess. So I also agree with a message like - "filesystem has > > trouble, you should probably unmount and run fsck" - that's fine. But > > generic "info" or "warning" doesn't really carry any meaning on its own and > > thus seems pretty useless to me. To explain a bit more, AFAIU this > > shouldn't be a generic logging interface where something like severity > > makes sense but rather a relatively specific interface notifying about > > events in filesystem userspace should know about so I expect relatively low > > number of types of events, not tens or even hundreds... > > > > Getting rid of those would simplify the configuration part, indeed. > So we would be left with 'generic' and threshold events. > I guess I've overdone this part. Well, I would avoid defining anything that's not really used. So currently you can define threshold events and we start with just those. When someone hooks up filesystem error paths to send notification, we can create event type for telling "filesystem corrupted". And so on... We just have to be careful to document that new event types can be added and userspace has to ignore events it does not understand. Honza -- Jan Kara SUSE Labs, CR From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: [RFC 1/4] fs: Add generic file system event notifications Date: Fri, 17 Apr 2015 15:16:28 +0200 Message-ID: <20150417131628.GA21539@quack.suse.cz> References: <1429082147-4151-1-git-send-email-b.michalska@samsung.com> <1429082147-4151-2-git-send-email-b.michalska@samsung.com> <20150417113110.GD3116@quack.suse.cz> <553104E5.2040704@samsung.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jan Kara , linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, tytso-3s7WtUTddSA@public.gmane.org, adilger.kernel-m1MBpc4rdrD3fQ9qLvQP4Q@public.gmane.org, hughd-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, lczerner-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, hch-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, linux-ext4-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, kyungmin.park-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org, kmpark-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, Linux Filesystem Mailing List , linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Beata Michalska Return-path: Content-Disposition: inline In-Reply-To: <553104E5.2040704-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-fsdevel.vger.kernel.org On Fri 17-04-15 15:04:37, Beata Michalska wrote: > On 04/17/2015 01:31 PM, Jan Kara wrote: > > On Wed 15-04-15 09:15:44, Beata Michalska wrote: > > Also I think that we should make it clear that each event type has > > different set of arguments. For threshold events they'll be L1 & L2, for > > other events there may be no arguments, for other events maybe something > > else... > > > > Currently only the threshold events use arguments - not sure what arguments > could be used for the remaining notifications. But any suggestions are welcomed. Me neither be someone will surely find something in future ;) > > ... > >> +static const match_table_t fs_etypes = { > >> + { FS_EVENT_INFO, "info" }, > >> + { FS_EVENT_WARN, "warn" }, > >> + { FS_EVENT_THRESH, "thr" }, > >> + { FS_EVENT_ERR, "err" }, > >> + { 0, NULL }, > >> +}; > > Why are there these generic message types? Threshold messages make good > > sense to me. But not so much the rest. If they don't have a clear meaning, > > it will be a mess. So I also agree with a message like - "filesystem has > > trouble, you should probably unmount and run fsck" - that's fine. But > > generic "info" or "warning" doesn't really carry any meaning on its own and > > thus seems pretty useless to me. To explain a bit more, AFAIU this > > shouldn't be a generic logging interface where something like severity > > makes sense but rather a relatively specific interface notifying about > > events in filesystem userspace should know about so I expect relatively low > > number of types of events, not tens or even hundreds... > > > > Getting rid of those would simplify the configuration part, indeed. > So we would be left with 'generic' and threshold events. > I guess I've overdone this part. Well, I would avoid defining anything that's not really used. So currently you can define threshold events and we start with just those. When someone hooks up filesystem error paths to send notification, we can create event type for telling "filesystem corrupted". And so on... We just have to be careful to document that new event types can be added and userspace has to ignore events it does not understand. Honza -- Jan Kara SUSE Labs, CR From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-la0-f41.google.com (mail-la0-f41.google.com [209.85.215.41]) by kanga.kvack.org (Postfix) with ESMTP id 05A8E6B0071 for ; Fri, 17 Apr 2015 09:16:32 -0400 (EDT) Received: by lagv1 with SMTP id v1so80016338lag.3 for ; Fri, 17 Apr 2015 06:16:31 -0700 (PDT) Received: from mx2.suse.de (cantor2.suse.de. [195.135.220.15]) by mx.google.com with ESMTPS id q7si2979300wix.4.2015.04.17.06.16.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 17 Apr 2015 06:16:30 -0700 (PDT) Date: Fri, 17 Apr 2015 15:16:28 +0200 From: Jan Kara Subject: Re: [RFC 1/4] fs: Add generic file system event notifications Message-ID: <20150417131628.GA21539@quack.suse.cz> References: <1429082147-4151-1-git-send-email-b.michalska@samsung.com> <1429082147-4151-2-git-send-email-b.michalska@samsung.com> <20150417113110.GD3116@quack.suse.cz> <553104E5.2040704@samsung.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <553104E5.2040704@samsung.com> Sender: owner-linux-mm@kvack.org List-ID: To: Beata Michalska Cc: Jan Kara , linux-kernel@vger.kernel.org, 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, Linux Filesystem Mailing List , linux-api@vger.kernel.org On Fri 17-04-15 15:04:37, Beata Michalska wrote: > On 04/17/2015 01:31 PM, Jan Kara wrote: > > On Wed 15-04-15 09:15:44, Beata Michalska wrote: > > Also I think that we should make it clear that each event type has > > different set of arguments. For threshold events they'll be L1 & L2, for > > other events there may be no arguments, for other events maybe something > > else... > > > > Currently only the threshold events use arguments - not sure what arguments > could be used for the remaining notifications. But any suggestions are welcomed. Me neither be someone will surely find something in future ;) > > ... > >> +static const match_table_t fs_etypes = { > >> + { FS_EVENT_INFO, "info" }, > >> + { FS_EVENT_WARN, "warn" }, > >> + { FS_EVENT_THRESH, "thr" }, > >> + { FS_EVENT_ERR, "err" }, > >> + { 0, NULL }, > >> +}; > > Why are there these generic message types? Threshold messages make good > > sense to me. But not so much the rest. If they don't have a clear meaning, > > it will be a mess. So I also agree with a message like - "filesystem has > > trouble, you should probably unmount and run fsck" - that's fine. But > > generic "info" or "warning" doesn't really carry any meaning on its own and > > thus seems pretty useless to me. To explain a bit more, AFAIU this > > shouldn't be a generic logging interface where something like severity > > makes sense but rather a relatively specific interface notifying about > > events in filesystem userspace should know about so I expect relatively low > > number of types of events, not tens or even hundreds... > > > > Getting rid of those would simplify the configuration part, indeed. > So we would be left with 'generic' and threshold events. > I guess I've overdone this part. Well, I would avoid defining anything that's not really used. So currently you can define threshold events and we start with just those. When someone hooks up filesystem error paths to send notification, we can create event type for telling "filesystem corrupted". And so on... We just have to be careful to document that new event types can be added and userspace has to ignore events it does not understand. Honza -- Jan Kara SUSE Labs, CR -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org