From owner-freebsd-fs@FreeBSD.ORG Fri Nov 21 18:21:18 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 8C599443; Fri, 21 Nov 2014 18:21:18 +0000 (UTC) Received: from mail-pa0-x22d.google.com (mail-pa0-x22d.google.com [IPv6:2607:f8b0:400e:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 61F047BD; Fri, 21 Nov 2014 18:21:18 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id lj1so5353857pab.18 for ; Fri, 21 Nov 2014 10:21:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=UdjYP3NsJ7duKL74c5mPyc5oM21Md2BXbYGUGdMMB2E=; b=Q5RzM6UO/CIlodj1BkFSY67Qs4DbLt+axFhGVTJ/pBDSgmp9eHoKdc1rqo9fIo+j9B ptGTYYBc32P1/qslFbZlNgJ7VA+zS55wqAgZMtkFbN3ylvHF7Pucig92preb3ZDCRklj Ls6IU8LVimHzUrKCg6df6N3rBdGmJaZgQVpMJI8v+a+j/6HEoAUQg+i5QO/VI6mlJmeF h3EjNO/9AG0w27wYtF7mpdjFcOklQr1yzJaYFzS9swnInzZqteChkXgyaKgjbjipY8vu Hs7LspXPysJcarXvHKM/ijkeGjsvSjUz5v4a21A6kqm4HOk+0ONvXKahTKzt+tazNwIB 0z0A== X-Received: by 10.66.221.198 with SMTP id qg6mr9951470pac.106.1416594077766; Fri, 21 Nov 2014 10:21:17 -0800 (PST) Received: from localhost (c-76-21-76-83.hsd1.ca.comcast.net. [76.21.76.83]) by mx.google.com with ESMTPSA id mr4sm5427208pdb.64.2014.11.21.10.21.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Nov 2014 10:21:16 -0800 (PST) Sender: Gleb Kurtsou Date: Fri, 21 Nov 2014 10:22:19 -0800 From: Gleb Kurtsou To: John Baldwin Subject: Re: RFC: patch to make d_fileno 64bits Message-ID: <20141121182219.GA1076@reks> References: <539201047.4538834.1416539954794.JavaMail.root@uoguelph.ca> <9692214.Bs3rxl0ePH@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <9692214.Bs3rxl0ePH@ralph.baldwin.cx> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-fs@freebsd.org 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 18:21:18 -0000 On (21/11/2014 10:25), John Baldwin wrote: > 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? projects/ino64 was created by mdf for merging GSoC commits, and it didn't even get half way through. I'm currently working on merging the code to CURRENT. It's been more than 2 years, so there is quite some work in there. I intend to update the branch as soon as code is ready for review. Besides branch also changes dev_t to 64-bit, bumps MNAMELEN to 1024 and has complete ABI compatibility shims (probably except openaudit which had issues).