From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S964880AbcJ0SRe (ORCPT ); Thu, 27 Oct 2016 14:17:34 -0400 Received: from mga05.intel.com ([192.55.52.43]:1983 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933792AbcJ0SR3 (ORCPT ); Thu, 27 Oct 2016 14:17:29 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,553,1473145200"; d="scan'208";a="184649263" Date: Thu, 27 Oct 2016 11:17:16 -0700 From: Fenghua Yu To: Thomas Gleixner Cc: Fenghua Yu , "H. Peter Anvin" , Ingo Molnar , Tony Luck , Peter Zijlstra , Stephane Eranian , Borislav Petkov , Dave Hansen , Nilay Vaish , Shaohua Li , David Carrillo-Cisneros , Ravi V Shankar , Sai Prakhya , Vikas Shivappa , linux-kernel , x86 Subject: Re: [PATCH v5 12/18] x86/intel_rdt: Add "info" files to resctrl file system Message-ID: <20161027181715.GD1752@linux.intel.com> References: <1477142405-32078-1-git-send-email-fenghua.yu@intel.com> <1477142405-32078-13-git-send-email-fenghua.yu@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Oct 26, 2016 at 04:45:50PM +0200, Thomas Gleixner wrote: > On Sat, 22 Oct 2016, Fenghua Yu wrote: > > +/* > > + * Forcibly remove all of subdirectories under root. > > + */ > > +static void rmdir_all_sub(void) > > +{ > > + kernfs_remove(kn_info); > > What clears kn_info? Is the question "Why clears kn_info?" kn_info is created during mount time and has different contents under "info" directory with CDP enabled or disabled by mount parameter "cdp". umount needs to remove kn_info so that it's ready to be created next time during mount time. So user can do CAT mount, check "info", umount, and then CDP mount, check "info". The user will see different contents in two "info" checks. Thanks. -Fenghua