From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: Re: inotify/sysfs Date: Fri, 28 Mar 2014 18:07:13 +0100 Message-ID: <20140328170713.GA11990@quack.suse.cz> References: <53342CA0.905@sardemff7.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: Quentin Glidic Return-path: Received: from cantor2.suse.de ([195.135.220.15]:39085 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751340AbaC1RHS (ORCPT ); Fri, 28 Mar 2014 13:07:18 -0400 Content-Disposition: inline In-Reply-To: <53342CA0.905@sardemff7.net> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: Hello, On Thu 27-03-14 14:50:24, Quentin Glidic wrote: > In GIO (GLib), the GFileMonitor[1] mechanism is using inotify for > local files. To detect file creation and some other weird cases, > they monitor the directory of the file and not the file directly > (see get_basename/get_dirname[2] usage). > > With sysfs, it does not work as expected for some reason. Well, I'm rather surprised inotify works with sysfs at all ;) Why do you need to watch sysfs? Udev is the tool with which you should generally look for e.g. new devices... Anyway, if you'd like to add fsnotify() support into sysfs, sysfs maintainer (Greg - added to CC) is the one to ask. Honza -- Jan Kara SUSE Labs, CR