Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934338AbcKNL7r (ORCPT ); Mon, 14 Nov 2016 06:59:47 -0500 Received: from mail-it0-f42.google.com ([209.85.214.42]:34233 "EHLO mail-it0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933551AbcKNL7p (ORCPT ); Mon, 14 Nov 2016 06:59:45 -0500 MIME-Version: 1.0 In-Reply-To: References: <20161102220851.GA1839@veci.piliscsaba.szeredi.hu> <20161105213411.GA32353@quack2.suse.cz> <20161109111005.GA32353@quack2.suse.cz> <20161110194625.GG31098@quack2.suse.cz> From: Amir Goldstein Date: Mon, 14 Nov 2016 13:59:44 +0200 Message-ID: Subject: Re: fsnotify_mark_srcu wtf? To: Jan Kara Cc: Miklos Szeredi , Eric Paris , linux-fsdevel , linux-kernel Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1024 Lines: 33 On Sun, Nov 13, 2016 at 8:43 PM, Amir Goldstein wrote: > On Thu, Nov 10, 2016 at 9:46 PM, Jan Kara wrote: > > ... > >> >> Well but how would you like to protect the mark list hanging off the inode >> / mountpoint with two SRCUs? You'd need two lists hanging off the inode & >> mountpoint (for different priorities) and that's too big cost to pay to >> accomodate broken userspace... >> > > This is the plan. > I have a rough implementation, which still requires some testing: > 2 patches posted: fsnotify: separate fsnotify_mark_srcu for groups with permission events fsnotify: handle permission events without holding fsnotify_mark_srcu[0] Miklos, Your test program actually passes after the first patch (split to 2 SRCU) but only because it does not add any inotify mark, so I modified your test a bit and made it available on my github: https://github.com/amir73il/fsnotify-utils/blob/master/fanotify_bug.c Jan, Please let me know what you think of this version. Thanks, Amir.