From: Brad Boyer Subject: Re: [PATCH 0/4] Fiemap, an extent mapping ioctl - round 2 Date: Mon, 30 Jun 2008 19:01:03 -0700 Message-ID: <20080701020103.GA22868@cynthia.pants.nu> References: <20080626102403.GN6239@webber.adilger.int> <20080626121950.GB32417@shareable.org> <20080626131600.GS29319@disturbed> <48639E2B.4000401@redhat.com> <20080626141649.GD3356@shareable.org> <20080626165618.GP6239@webber.adilger.int> <1DAFD0EF-FF4A-456C-A7E6-E718031E220D@cam.ac.uk> <20080629214525.GI29319@disturbed> <20080630225730.GC20187@shareable.org> <20080630230741.GE28100@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Jamie Lokier , Anton Altaparmakov , Andreas Dilger , Eric Sandeen , linux-fsdevel@vger.kernel.org, Andreas Dilger , Kalpak Shah , Josef Bacik To: Mark Fasheh Return-path: Received: from [76.245.85.235] ([76.245.85.235]:33359 "EHLO cynthia.pants.nu" rhost-flags-FAIL-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1754679AbYGAC7A (ORCPT ); Mon, 30 Jun 2008 22:59:00 -0400 Content-Disposition: inline In-Reply-To: <20080630230741.GE28100@wotan.suse.de> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Jun 30, 2008 at 04:07:41PM -0700, Mark Fasheh wrote: > Yes. FIEMAP is not in the business of interpreting individual directory > entries. > > You can look at the Ocfs2 or ext4 patches for examples, but directory > extents are simply treated like file extents. In the case of Ocfs2, where > small directories can be stored inside of the inode meta data, the blob is > returned as a single extent, with the appropriate descriptor flags set > (FIEMAP_EXTENT_DATA_INLINE in particular). What would you expect as reasonable behavior for an FS type that doesn't have distinct storage for directories? On HFS and HFS+, the directory information is completely synthetic based on the parent ID of each file. A directory has no actual data dedicated to it other than the basic metadata that would be in the inode in ext3, and readdir just walks the catalog tree and finds all the entries that say they have the directory you want as a parent. They are sorted that way, so it's not as bad as it sounds for performance. Would it be reasonable for a filesystem like this to just say that a directory has no extents at all? You can open a directory and seek to an offset, but that doesn't logically map to any place on the disk. Is this going to cause problems? Brad Boyer flar@allandria.com