From mboxrd@z Thu Jan 1 00:00:00 1970 From: Zheng Liu Subject: Re: VFS hot tracking: How to calculate data temperature? Date: Fri, 2 Nov 2012 16:41:09 +0800 Message-ID: <20121102084109.GA19753@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org, linuxram@linux.vnet.ibm.com, Dave Chinner , cmm@us.ibm.com, Ben Chociej , James Northrup To: Zhi Yong Wu Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:41875 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754296Ab2KBI3T (ORCPT ); Fri, 2 Nov 2012 04:29:19 -0400 Received: by mail-pb0-f46.google.com with SMTP id rr4so2318673pbb.19 for ; Fri, 02 Nov 2012 01:29:19 -0700 (PDT) Content-Disposition: inline In-Reply-To: Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Fri, Nov 02, 2012 at 02:38:29PM +0800, Zhi Yong Wu wrote: > Here also has another question. > > How to save the file temperature among the umount to be able to > preserve the file tempreture after reboot? > > This above is the requirement from DB product. > I thought that we can save file temperature in its inode struct, that > is, add one new field in struct inode, then this info will be written > to disk with inode. > > Any comments or ideas are appreciated, thanks. Hi Zhiyong, I think that we might define a callback function. If a filesystem wants to save these data, it can implement a function to save them. The filesystem can decide whether adding it or not by themselves. BTW, actually I don't really care about how to save these data because I only want to observe which file is accessed in real time, which is very useful for me to track a problem in our product system. Regards, Zheng