From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 648DAC35280 for ; Wed, 2 Oct 2019 12:46:56 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3223F20842 for ; Wed, 2 Oct 2019 12:46:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726016AbfJBMqz (ORCPT ); Wed, 2 Oct 2019 08:46:55 -0400 Received: from outgoing-auth-1.mit.edu ([18.9.28.11]:52776 "EHLO outgoing.mit.edu" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725747AbfJBMqz (ORCPT ); Wed, 2 Oct 2019 08:46:55 -0400 Received: from callcc.thunk.org (guestnat-104-133-0-98.corp.google.com [104.133.0.98] (may be forged)) (authenticated bits=0) (User authenticated as tytso@ATHENA.MIT.EDU) by outgoing.mit.edu (8.14.7/8.12.4) with ESMTP id x92CkpbR023681 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 2 Oct 2019 08:46:52 -0400 Received: by callcc.thunk.org (Postfix, from userid 15806) id 451AA42088C; Wed, 2 Oct 2019 08:46:51 -0400 (EDT) Date: Wed, 2 Oct 2019 08:46:51 -0400 From: "Theodore Y. Ts'o" To: Daegyu Han Cc: linux-fsdevel@vger.kernel.org Subject: Re: How can I completely evict(remove) the inode from memory and access the disk next time? Message-ID: <20191002124651.GC13880@mit.edu> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Wed, Oct 02, 2019 at 05:30:21PM +0900, Daegyu Han wrote: > Hi linux file system experts, > > I'm so sorry that I've asked again the general question about Linux > file systems. > > For example, if there is a file a.txt in the path /foo/ bar, > what should I do to completely evict(remove) the inode of bar > directory from memory and read the inode via disk access? There is no API to do this from userspace. The only way to do this is to unmount the entire file system. >From the kernel, it's *way* more complicated than this. Making a shared-disk file system requires a lot more changes to the kernel code. You might want to take a look at ocfs2. This was a file system that started using the ext3 file system code, and **extensive** kernel-level code changes were made to make it be a shared-disk file system. - Ted