Commit Graph

25 Commits

Author SHA1 Message Date
kib
7d33ec3750 Add d_off support for multiple filesystems.
The d_off field has been added to the dirent structure recently.
Currently filesystems don't support this feature.  Support has been
added and tested for zfs, ufs, ext2fs, fdescfs, msdosfs and unionfs.
A stub implementation is available for cd9660, nandfs, udf and
pseudofs but hasn't been tested.

Motivation for this feature: our usecase is for a userspace nfs server
(nfs-ganesha) with zfs.  At the moment we cache direntry offsets by
calling lseek once per entry, with this patch we can get the offset
directly from getdirentries(2) calls which provides a significant
speedup.

Submitted by:	Jack Halford <jack@gandi.net>
Reviewed by:	mckusick, pfg, rmacklem (previous versions)
Sponsored by:	Gandi.net
MFC after:	1 week
Differential revision:	https://reviews.freebsd.org/D17917
2018-11-14 14:18:35 +00:00
bdrewery
e56bf6ed29 ino64 uses 8 byte padding now. 2018-06-21 16:39:38 +00:00
kib
e75ba1d5c4 Commit the 64-bit inode project.
Extend the ino_t, dev_t, nlink_t types to 64-bit ints.  Modify
struct dirent layout to add d_off, increase the size of d_fileno
to 64-bits, increase the size of d_namlen to 16-bits, and change
the required alignment.  Increase struct statfs f_mntfromname[] and
f_mntonname[] array length MNAMELEN to 1024.

ABI breakage is mitigated by providing compatibility using versioned
symbols, ingenious use of the existing padding in structures, and
by employing other tricks.  Unfortunately, not everything can be
fixed, especially outside the base system.  For instance, third-party
APIs which pass struct stat around are broken in backward and
forward incompatible ways.

Kinfo sysctl MIBs ABI is changed in backward-compatible way, but
there is no general mechanism to handle other sysctl MIBS which
return structures where the layout has changed. It was considered
that the breakage is either in the management interfaces, where we
usually allow ABI slip, or is not important.

Struct xvnode changed layout, no compat shims are provided.

For struct xtty, dev_t tty device member was reduced to uint32_t.
It was decided that keeping ABI compat in this case is more useful
than reporting 64-bit dev_t, for the sake of pstat.

Update note: strictly follow the instructions in UPDATING.  Build
and install the new kernel with COMPAT_FREEBSD11 option enabled,
then reboot, and only then install new world.

Credits: The 64-bit inode project, also known as ino64, started life
many years ago as a project by Gleb Kurtsou (gleb).  Kirk McKusick
(mckusick) then picked up and updated the patch, and acted as a
flag-waver.  Feedback, suggestions, and discussions were carried
by Ed Maste (emaste), John Baldwin (jhb), Jilles Tjoelker (jilles),
and Rick Macklem (rmacklem).  Kris Moore (kris) performed an initial
ports investigation followed by an exp-run by Antoine Brodin (antoine).
Essential and all-embracing testing was done by Peter Holm (pho).
The heavy lifting of coordinating all these efforts and bringing the
project to completion were done by Konstantin Belousov (kib).

Sponsored by:	The FreeBSD Foundation (emaste, kib)
Differential revision:	https://reviews.freebsd.org/D10439
2017-05-23 09:29:05 +00:00
eadler
118094e60b multiple: Remove 3rd clause from BSD license where approved by the
regents and renumber.

This patch skips files in contrib/ and crypto/

Acked by:	imp
Discussed with:	emaste
2014-03-14 03:07:51 +00:00
ru
7a3e657c56 Sort sections. 2005-01-21 08:36:40 +00:00
ru
1edcd1b018 mdoc(7): Properly mark C headers. 2003-09-10 19:24:35 +00:00
ru
041d1287e8 Uniformly refer to a file system as "file system".
Approved by:	re
2002-12-12 17:26:04 +00:00
trhodes
1de8f5f8fc More file system > filesystem 2002-05-16 05:21:58 +00:00
ru
623da62a5a mdoc(7) police: Use the new .In macro for #include statements. 2001-10-01 16:09:29 +00:00
schweikh
511e378b14 Removed whitespace at end-of-line; no content changes. I simply did
cd src/share; find man[1-9] -type f|xargs perl -pi -e 's/[ \t]+$//'

BTW, what editors are the culprits? I'm using vim and it shows
me whitespace at EOL in troff files with a thick blue block...

Reviewed by:	Silence from cvs diff -b
MFC after:	7 days
2001-07-14 19:41:16 +00:00
ru
9001bc7070 mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:31:11 +00:00
ru
17ba214098 Prepare for mdoc(7)NG. 2000-12-29 09:18:45 +00:00
ru
7d99729431 Use Fx macro wherever possible. 2000-11-14 11:20:58 +00:00
bde
d39d38eacd Refreshed the silly copy of <sys/dirent.h>. _KERNEL was still spelled
KERNEL, and the changes to remove the <sys/types.h> prerequisite had
not reached here.

Removed unused/wrong include of <sys/types.h> in synopsis.
2000-01-05 17:04:36 +00:00
peter
76f0c923fe $Id$ -> $FreeBSD$ 1999-08-28 00:22:10 +00:00
nik
a076fb6f6e Note that using the dirent.d_type member is non-portable, and might
fail on some filesystems.

PR:             docs/11645
Submitted by:   Harold Gutch <logix@foobar.franken.de>
1999-05-29 12:59:51 +00:00
bde
fe00dbc3ff Update to sort of match reality by literally including <sys/dirent.h>
instead of a pre-BSD4.4 version of <dirent.h>.  The old version had
library goop which is still in <dirent.h>.  See reality if you want
real details.
1998-02-24 02:39:00 +00:00
bde
f8bda83de0 Fixed wrong #include in synopsis. <sys/dir.h> has been deprecated for
years.

Not fixed: stale, misformatted copy of <dirent.h>.  I will be cleaning
up the dirent.h and dir.h headers soon (ufs stuff needs to be separated
better), so don't change the man page yet.
1997-03-19 03:48:12 +00:00
peter
d69a45675f Revert $FreeBSD$ back to $Id$ 1997-02-22 13:26:29 +00:00
mpp
41a5f91245 Update to match current include files. 1997-01-28 07:03:33 +00:00
jkh
808a36ef65 Make the long-awaited change from $Id$ to $FreeBSD$
This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore.  This update would have been
insane otherwise.
1997-01-14 07:20:47 +00:00
wosch
89dea7c61d add missing comma(s) in .Xr macros 1996-09-23 22:24:39 +00:00
mpp
86b292ffbd Correct some man page cross references and file location references. 1996-04-07 00:06:21 +00:00
mpp
511d4f82b2 Fix a bunch of spelling errors in a bunch of man pages. 1996-01-30 13:52:50 +00:00
rgrimes
b0d61785ca BSD 4.4 Lite Share Sources 1994-05-30 19:09:18 +00:00