From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bombadil.infradead.org ([65.50.211.133]:42471 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751286AbdGQOJi (ORCPT ); Mon, 17 Jul 2017 10:09:38 -0400 Date: Mon, 17 Jul 2017 07:09:34 -0700 From: Matthew Wilcox To: Waiman Long Cc: Alexander Viro , Jonathan Corbet , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-fsdevel@vger.kernel.org, "Paul E. McKenney" , Andrew Morton , Ingo Molnar , Miklos Szeredi Subject: Re: [PATCH 2/4] fs/dcache: Report negative dentry number in dentry-state Message-ID: <20170717140934.GA14983@bombadil.infradead.org> References: <1500298773-7510-1-git-send-email-longman@redhat.com> <1500298773-7510-3-git-send-email-longman@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1500298773-7510-3-git-send-email-longman@redhat.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jul 17, 2017 at 09:39:31AM -0400, Waiman Long wrote: > @@ -63,9 +63,10 @@ struct qstr { > struct dentry_stat_t { > long nr_dentry; > long nr_unused; > - long age_limit; /* age in seconds */ > - long want_pages; /* pages requested by system */ > - long dummy[2]; > + long nr_negative; /* # of negative dentries */ > + long age_limit; /* age in seconds */ > + long want_pages; /* pages requested by system */ > + long dummy; > }; > extern struct dentry_stat_t dentry_stat; You can't just insert a field in the middle like that. It'll break any code parsing /proc/sys/fs/dentry-state. You have to put it at the end: long age_limit; /* age in seconds */ long want_pages; /* pages requested by system */ - long dummy[2]; + long nr_negative; /* # of negative dentries */ + long dummy; };