From owner-freebsd-fs@FreeBSD.ORG Mon Dec 29 07:02:21 2014 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E81ECB29; Mon, 29 Dec 2014 07:02:21 +0000 (UTC) Received: from chez.mckusick.com (chez.mckusick.com [IPv6:2001:5a8:4:7e72:4a5b:39ff:fe12:452]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7EB321D2; Mon, 29 Dec 2014 07:02:21 +0000 (UTC) Received: from chez.mckusick.com (localhost [127.0.0.1]) by chez.mckusick.com (8.14.3/8.14.3) with ESMTP id sBT72I8G087361; Sun, 28 Dec 2014 23:02:18 -0800 (PST) (envelope-from mckusick@chez.mckusick.com) Message-Id: <201412290702.sBT72I8G087361@chez.mckusick.com> To: Rick Macklem Subject: Re: patch that makes d_fileno 64bits In-reply-to: <1966344327.2961798.1419723168645.JavaMail.root@uoguelph.ca> Date: Sun, 28 Dec 2014 23:02:18 -0800 From: Kirk McKusick Cc: FreeBSD Filesystems , Gleb Kurtsou , Konstantin Belousov 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: Mon, 29 Dec 2014 07:02:22 -0000 > Date: Sat, 27 Dec 2014 18:32:48 -0500 (EST) > From: Rick Macklem > To: FreeBSD Filesystems , > Kirk McKusick , Gleb Kurtsou , > Konstantin Belousov > Subject: patch that makes d_fileno 64bits > > Hi, > > Kirk and Gleb Kurtsou (plus some others) are working through > the difficult job of changing ino_t to 64bits. (Changes to syscalls, > libraries, etc.) > > This patch: > http://people.freebsd.org/~rmacklem/64bitfileno.patch > > is somewhat tangential to the above, in that it changes the > d_fileno field of "struct dirent" and va_fileid to uint64_t. > It also includes adding a field called d_cookie to "struct dirent", > which is the position of the next directory entry in the underlying > file system. A majority of this patch are changes to the NFS code, > but it includes a simple "new struct dirent"->"old struct dirent32" > copy routine for getdirentries(2) and small changes to all the > file systems so they fill in the "new struct dirent". > > This patch can be applied to head/current and the resultant kernel > should work fine, although I've only been able to test some of the > file systems. However, DO NOT propagate the changes to sys/sys/dirent.h > out to userland (/usr/include/sys/dirent.h) and build a userland from > it or things will get badly broken. > > I don't know if Kirk and/or Gleb will find some of this useful for > their updates to project/ino64, but it will allow people to test > these changes. (It modifies the NFS server so that it no longer uses > the "cookie" args to VOP_READDIR(), but that part can easily > be removed from the patch.) > > If folks can test this patch, I think it would be helpful for > the effort of changing ino_t to 64bits. > > Have fun with it, rick Thanks Rick, this does look useful. Since Gleb is leading the charge with changing ino_t to 64 bits, I will let him have final say on when it would be helpful to have this go into HEAD. But it does seem that it should be possible to do it before the other changes and independently of them since it only chnges the internal kernel interfaces. But perhaps I am missing something that Gleb or kib can point out. It seems to me that the cookies calculation could be taken out of the VOP_GETDIRENTRIES interface since NFS is the only client of it. In looking through your patch, I did not see anything that looked wrong. But as you point out, more testing is needed :-) Kirk McKusick