From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Dilger Subject: Re: [PATCH 1/5] vfs: vfs-level fiemap interface Date: Wed, 04 Jun 2008 23:18:29 -0600 Message-ID: <20080605051829.GA18021@webber.adilger.int> References: <20080525000157.GK8325@wotan.suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org To: Mark Fasheh Return-path: Received: from sca-es-mail-2.Sun.COM ([192.18.43.133]:56003 "EHLO sca-es-mail-2.sun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758559AbYFEFSh (ORCPT ); Thu, 5 Jun 2008 01:18:37 -0400 Received: from fe-sfbay-09.sun.com ([192.18.43.129]) by sca-es-mail-2.sun.com (8.13.7+Sun/8.12.9) with ESMTP id m555Iaa7026478 for ; Wed, 4 Jun 2008 22:18:36 -0700 (PDT) Received: from conversion-daemon.fe-sfbay-09.sun.com by fe-sfbay-09.sun.com (Sun Java System Messaging Server 6.2-8.04 (built Feb 28 2007)) id <0K1Z001015ARSV00@fe-sfbay-09.sun.com> (original mail from adilger@sun.com) for linux-fsdevel@vger.kernel.org; Wed, 04 Jun 2008 22:18:36 -0700 (PDT) In-reply-to: <20080525000157.GK8325@wotan.suse.de> Content-disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On May 24, 2008 17:01 -0700, Mark Fasheh wrote: > +Each extent is described by a single fiemap_extent structure as > +returned in fm_extents. > + > +struct fiemap_extent { > + __u64 fe_logical;/* logical offset in bytes for the start of > + * the extent */ > + __u64 fe_physical; /* physical offset in bytes for the start > + * of the extent */ > + __u64 fe_length; /* length in bytes for the extent */ > + __u32 fe_flags; /* returned FIEMAP_EXTENT_* flags for the extent *= / > + __u32 fe_lun; /* logical device number for extent (starting at 0= )*/ > +}; I was reading through the original FIEMAP thread, and one requirement which isn't addressed with the current code (it was missed in the origi= nal patch also) is the ability to return a physical extent length different from the logical extent length. This was originally brought up by J=F6rn Engel in the context of logfs compressing data on disk. It makes sense that the physical extent length is shorter than the logical extent length in this case. The same is probably true for cramfs, and even ext* if the block compressio= n code was still maintained. It wouldn't be a surprise if Chris was to add compression to btrfs also. So, I think we need another __u64 in he fiemap_extent which is fe_loglength, and rename fe_length to fe_physlength. Cheers, Andreas -- Andreas Dilger Sr. Staff Engineer, Lustre Group Sun Microsystems of Canada, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html