Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E8EE0C433F5 for ; Wed, 22 Dec 2021 08:01:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243170AbhLVIBH (ORCPT ); Wed, 22 Dec 2021 03:01:07 -0500 Received: from verein.lst.de ([213.95.11.211]:49536 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243161AbhLVIBF (ORCPT ); Wed, 22 Dec 2021 03:01:05 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id EE38368AFE; Wed, 22 Dec 2021 09:01:01 +0100 (CET) Date: Wed, 22 Dec 2021 09:01:01 +0100 From: Christoph Hellwig To: Dan Williams Cc: Greg KH , "Chen, Mike Ximing" , "linux-kernel@vger.kernel.org" , "arnd@arndb.de" , "pierre-louis.bossart@linux.intel.com" , "netdev@vger.kernel.org" , "davem@davemloft.net" , "kuba@kernel.org" , Christoph Hellwig Subject: Re: [RFC PATCH v12 00/17] dlb: introduce DLB device driver Message-ID: <20211222080101.GA21077@lst.de> References: <20211221065047.290182-1-mike.ximing.chen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 21, 2021 at 10:44:11AM -0800, Dan Williams wrote: > are likely FAQs with using configfs. Specifically the observation that > configfs, like sysfs, lacks an "atomically update multiple attributes" > capability. To my knowledge that's just the expected tradeoff with > pseudo-fs based configuration and it is up to userspace to coordinate > multiple configuration writers. Yes. For the SCSI and nvme targets we do a required attributes must be set before something can be enabled, but that might not work everywhere. > The other question is the use of anon_inode_getfd(). To me that > mechanism is reserved for syscall and ioctl based architectures, and It is. > in this case it was only being used as a mechanism to get an automatic > teardown action at process exit. Again, my inclination is that configs > requires userspace to clean up anything it created. If "tear down on > last close" behavior is needed that would either need to come from a > userspace daemon to watch clients, or another character device that > clients could open to represent the active users of the configuration. > My preference is for the former. This really sounds like configfs is the wrong interface. But I'd have to find time to see what dlb actually is before commenting on what might be a better interface.