From owner-freebsd-fs@FreeBSD.ORG Fri Nov 21 16:15:20 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E3325E9 for ; Fri, 21 Nov 2014 16:15:20 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ECA42634 for ; Fri, 21 Nov 2014 16:15:19 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EE63EB9B2; Fri, 21 Nov 2014 11:15:18 -0500 (EST) From: John Baldwin To: freebsd-fs@freebsd.org Subject: Re: RFC: patch to make d_fileno 64bits Date: Fri, 21 Nov 2014 10:25:45 -0500 Message-ID: <9692214.Bs3rxl0ePH@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-PRERELEASE; KDE/4.14.2; amd64; ; ) In-Reply-To: <539201047.4538834.1416539954794.JavaMail.root@uoguelph.ca> References: <539201047.4538834.1416539954794.JavaMail.root@uoguelph.ca> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Fri, 21 Nov 2014 11:15:19 -0500 (EST) X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Nov 2014 16:15:20 -0000 On Thursday, November 20, 2014 10:19:14 PM Rick Macklem wrote: > The attached patch covers the basics of a way to > convert the d_fileno field of "struct dirent" to > 64bits. This patch is incomplete and won't even > build, but I thought I'd post it in case anyone > wanted to take a look and comment on the approach > it uses. > > - renames the old/current one "struct dirent32" > - changes d_fileno to 64bits and adds a 64bit > d_off field for the offset of the underlying > file system > - defines a new VOP_READDIR() that will return > the new "struct dirent" that is used as the > default one for a new getdirentries(2). > - the old/current getdirentries(2) uses the old > VOP_READDIR32() by default. > > For the case of a file system that supports both > the new and old VOP_READDIR(), they are used by > the corresponding new and old getdirentries(2) > syscalls. > > For a file system that only supports one of > the VOP_READDIR()s, the "struct dirent32" > is copied to "struct dirent" (or vice versa). > > At this point, all file systems would support > the old VOP_READDIR() and I think the new > VOP_READDIR() can easily be added for NFS, > ZFS. (OpenBSD already has UFS code for > essentially a new struct dirent and hopefully > that code could be ported easily, too.) > > Anyhow, any comments on this approach? rick I think this is already done (along with several other changes) more fully in the projects/ino64 branch in svn? -- John Baldwin