Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754660AbXL1ADL (ORCPT ); Thu, 27 Dec 2007 19:03:11 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753838AbXL1AC6 (ORCPT ); Thu, 27 Dec 2007 19:02:58 -0500 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:57734 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753567AbXL1AC5 (ORCPT ); Thu, 27 Dec 2007 19:02:57 -0500 Date: Thu, 27 Dec 2007 16:02:56 -0800 (PST) From: Christoph Lameter X-X-Sender: clameter@schroedinger.engr.sgi.com To: Al Viro cc: Steven Rostedt , Peter Zijlstra , LKML , "Rafael J. Wysocki" Subject: Re: SLUB sysfs support In-Reply-To: <20071227235804.GJ27894@ZenIV.linux.org.uk> Message-ID: References: <20071224034530.GB16658@thunk.org> <20071224233701.GB9784@kernel.org> <20071226221631.GD27894@ZenIV.linux.org.uk> <20071227225947.GH27894@ZenIV.linux.org.uk> <20071227235804.GJ27894@ZenIV.linux.org.uk> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1309 Lines: 33 On Thu, 27 Dec 2007, Al Viro wrote: > On Thu, Dec 27, 2007 at 03:53:43PM -0800, Christoph Lameter wrote: > > On Thu, 27 Dec 2007, Christoph Lameter wrote: > > > > > > a) remove symlink when slab goes away > > > > > > Ok. Need to think about how to code that. > > > > How do I iterate over all symlinks in /sys/kernel/slab/*? > > > > I remember trying to do it before and not being able to find a sysfs > > method for that. > > What the hell do you need that for? You have an obvious moment when > /sys/kernel/slab/cache_name -> should be gone - it's when > you remove the slab called cache_name. And at that point you don't > need to iterate over anything - you have the exact name, for fsck sake... > > Why would you want these symlinks to stick around for longer than that? /sys/kernel/slab/cache_name is a real directory but then there are the aliases in /sys/kernel/slab/alias_name pointing to that directory that also have to be removed. So I need to scan for symlinks in /sys/kernel/slab/* pointing to /sys/kernel/slab/cache_name. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/