From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de ([195.135.220.15]:41909 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751547AbcLWNbY (ORCPT ); Fri, 23 Dec 2016 08:31:24 -0500 Date: Fri, 23 Dec 2016 14:31:22 +0100 From: Jan Kara To: Amir Goldstein Cc: Jan Kara , linux-fsdevel , Lino Sanfilippo , Miklos Szeredi , Paul Moore Subject: Re: [PATCH 11/22] fsnotify: Remove special handling of mark destruction on group shutdown Message-ID: <20161223133122.GD22679@quack2.suse.cz> References: <20161222091538.28702-1-jack@suse.cz> <20161222091538.28702-12-jack@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri 23-12-16 14:12:19, Amir Goldstein wrote: > On Thu, Dec 22, 2016 at 11:15 AM, Jan Kara wrote: > > Currently we queue all marks for destruction on group shutdown and then > > destroy them from fsnotify_destroy_group() instead from a worker thread > > which is the usual path. However worker can already be processing some > > list of marks to destroy so this does not make 100% all marks are really > > destroyed by the time group is shut down. This isn't a big problem as > > each mark holds group reference and thus group stays partially alive > > until all marks are really freed but there's no point in complicating > > our lives - just wait for the delayed work to be finished instead. > > > > Signed-off-by: Jan Kara > > Isn't it *required* to wait for all marks to really be freed and not only > nice behavior following the same reason for > 35e4817 fsnotify: avoid spurious EMFILE errors from inotify_init() > > Otherwise > > Reviewed-by: Amir Goldstein Well, it is not nice to leave marks dangling after the group destruction exactly for the reason you reference above. But OTOH it is mostly an annoyance and not a serious issue unless it happens a lot (which it did not in this case). Honza -- Jan Kara SUSE Labs, CR