From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from zeniv.linux.org.uk ([195.92.253.2]:58919 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751886AbcD2Wbx (ORCPT ); Fri, 29 Apr 2016 18:31:53 -0400 Date: Fri, 29 Apr 2016 23:31:48 +0100 From: Al Viro To: Goldwyn Rodrigues Cc: Viacheslav Dubeyko , linux-fsdevel@vger.kernel.org, Goldwyn Rodrigues Subject: Re: [PoC 0/7] Kobjectify filesystem Message-ID: <20160429223147.GZ25498@ZenIV.linux.org.uk> References: <1461895282-4941-1-git-send-email-rgoldwyn@suse.de> <1461951179.2619.5.camel@slavad-ubuntu-14.04> <5723A7B0.9080901@suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5723A7B0.9080901@suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Apr 29, 2016 at 01:28:00PM -0500, Goldwyn Rodrigues wrote: > Yes, you can register any attribute to sysfs, and most filesystems > are doing exactly that. They maintain the kobject in their > _super_block struct and use it to create /sys/fs// > entries. So what I propose is this: [snip] What's really missing here is 0. carefully audit the existing sysfs users of that sort - they are _very_ easy to get wrong, especially wrt lifetime issues and locking. As you have demonstrated yourself in this patchset, BTW...