Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758379AbXFQV2h (ORCPT ); Sun, 17 Jun 2007 17:28:37 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753342AbXFQV2a (ORCPT ); Sun, 17 Jun 2007 17:28:30 -0400 Received: from nz-out-0506.google.com ([64.233.162.228]:49822 "EHLO nz-out-0506.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753082AbXFQV23 (ORCPT ); Sun, 17 Jun 2007 17:28:29 -0400 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OJmumnJi5bBgeFl64SL6hkiN0u2jrWAqPvRMXlQdY/2u1da8ZXt8qx8Y3TTYQCHLu0bJ1TAOQr8GDmKonilUuzMbFHOgUOb3nG8bM/zNAB8oYnO2lOntl1WSSAeF52J1hcuRRpFvwzY2FpNBmISOKbtPNLIP8TX/TezChrmERKs= Message-ID: <9c21eeae0706171428u5a9ff79rad2b2083d3436d7f@mail.gmail.com> Date: Sun, 17 Jun 2007 14:28:28 -0700 From: "David Brown" To: fuse-devel@lists.sourceforge.net, "Linux Kernel Mailing List" Subject: FS block count, size and seek offset? MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1506 Lines: 43 I was looking at various file systems and how they return stat.st_blocks and stat.st_size for directories and had some questions on how a fuse filesystem is supposed to implement readdir with the seek offset when trying to union two directories together. Is the offset a byte offset into the DIR *dp? or is it the struct dirent size (which is relative based on the name of the file) into the dir pointer? Also, if you want to be accurate when you stat a directory that's unioned in the fuse file system how many blocks should one return? Since each filesystem seems to return different values for size and number of blocks for directories. I know I could just say that its not supported with my filesystem built using fuse... but I'd like to at least try to be accurate. Is it accurate to assume that the size or number of blocks returned from a stat will be used to pass a seek offset? When does fuse use the seek offset? These are the number of blocks and size on an empty dir. ext3 size 4096 nblocks 8 reiserfs size 48 nblocks 0 jfs size 1 nblocks 0 xfs size 6 nblocks 0 Any help to figure out how to union two directories and return correct values would be helpful. Thanks, - David Brown P.S. maybe a posix filesystem interface manual would be good? - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/