From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756921AbYGDHvv (ORCPT ); Fri, 4 Jul 2008 03:51:51 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751848AbYGDHvk (ORCPT ); Fri, 4 Jul 2008 03:51:40 -0400 Received: from rv-out-0506.google.com ([209.85.198.229]:12070 "EHLO rv-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751679AbYGDHvj (ORCPT ); Fri, 4 Jul 2008 03:51:39 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=SCtTEJBcTsX2rzoB35o6CnR+ZK/0ITAWGJ3VkEmis1yF0U9uSrow4vp13Enmp28wn2 HaQE/3wix8Yv3BE/PXHhaDcRhyX5TnUeOPwaYAsZJ1vMYDMRLAhmhXuEmVbqHMOca8kE do1qqEcOplJh8gzsO3+bJognIcOrN0guvpY2c= Message-ID: <486DD650.3000804@gmail.com> Date: Fri, 04 Jul 2008 16:50:40 +0900 From: Tejun Heo User-Agent: Thunderbird 2.0.0.12 (X11/20071114) MIME-Version: 1.0 To: "Eric W. Biederman" CC: Greg Kroah-Hartman , Andrew Morton , Daniel Lezcano , linux-kernel@vger.kernel.org, Al Viro , Linux Containers , Benjamin Thery , netdev@vger.kernel.org Subject: Re: [PATCH 12/15] driver core: Implement tagged directory support for device classes. References: <20080618170729.808539948@theryb.frec.bull.fr> <486B060C.7030607@gmail.com> <486C4515.1070007@gmail.com> <486CB051.5000507@fr.ibm.com> <486CF71F.5090405@gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Eric W. Biederman wrote: > This patch enables tagging on every class directory if struct class > has a tag_type. > > In addition device_del and device_rename were modified to uses > sysfs_delete_link and sysfs_rename_link respectively to ensure > when these operations happen on devices whose classes have > tag_ops that they work properly. > > Signed-off-by: Eric W. Biederman > Signed-off-by: Benjamin Thery Okay, I went through the users this time but I still think determine-tags-by-callbacks is a bad idea. Please just add const void *tag to kobject and set it during initialization. If you want to move a device from one tag to another, implement kobject_rename_tagged(kobj, new_name, new_tag). The determine-tag-by-callback basically multiplexes basic functions to do tag-specific things which are determined by ktype callback called back from down the layer. It's simply a bad interface. Those operations become something else depending on how those callbacks behave. That's unnecessarily subtle. Advertising what it's gonna do in the function name and as arguments is way more straight forward and it's not like determining or renaming tags should be done asynchronously. I personally think it would be better to make tags explicit in the mount interface too but if extracting ns information from the mounting process is what's currently being done, well... I'm sorry but Nacked-by: Tejun Heo Thanks. -- tejun