From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Xin Zhao" Subject: question regarding the Linux block device cache Date: Fri, 9 Mar 2007 17:24:18 -0500 Message-ID: <4ae3c140703091424i25a0a3fcm6ba9d7bf348d04b6@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: linux-kernel , linux-fsdevel Return-path: Received: from an-out-0708.google.com ([209.85.132.245]:59043 "EHLO an-out-0708.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1766786AbXCIWYT (ORCPT ); Fri, 9 Mar 2007 17:24:19 -0500 Received: by an-out-0708.google.com with SMTP id b33so897520ana for ; Fri, 09 Mar 2007 14:24:19 -0800 (PST) Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, I am working on a file system that allow multiple files to share data blocks. That is, a data block can be shared by two or more files. Now my question is: suppose file A and B share the same data block D. Now a process open file A and read block D, then this process closes file A. If another process open file B and read block D right after the first process closes A, is the data of block D read from some cache or has to be loaded from disk again? I think this has to do with the Linux block device buffer cache. But I am not quite familiar with this part. Can someone help me or direct me to the right place to find the answer? Thanks in advance! -x