From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 16/17] fs: Convert nr_inodes to a per-cpu counter Date: Sat, 2 Oct 2010 12:02:10 -0400 Message-ID: <20101002160210.GA30697@infradead.org> References: <1285762729-17928-1-git-send-email-david@fromorbit.com> <1285762729-17928-17-git-send-email-david@fromorbit.com> <20100929215322.ff635d3e.akpm@linux-foundation.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Dave Chinner , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org To: Andrew Morton Return-path: Received: from casper.infradead.org ([85.118.1.10]:41066 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754462Ab0JBQCU (ORCPT ); Sat, 2 Oct 2010 12:02:20 -0400 Content-Disposition: inline In-Reply-To: <20100929215322.ff635d3e.akpm@linux-foundation.org> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Sep 29, 2010 at 09:53:22PM -0700, Andrew Morton wrote: > > +extern int get_nr_inodes(void); > > +extern int get_nr_inodes_unused(void); > > These are pretty cruddy names. Unfotunately we don't really have a vfs > or "inode" subsystem name to prefix them with. We don't really need to export these anyway. We have two callers for each of them, and both are in the form of: /* approximate dirty inodes */ nr_dirty_inodes = get_nr_inodes() - get_nr_inodes_unused(); if (nr_dirty_inodes < 0) nr_dirty_inodes = 0; which means we should just have a properly documented get_nr_dirty_inodes() helper, the rest can stay private to inode.c