Commit Graph

909 Commits

Author SHA1 Message Date
jb
fe5ac1ba72 * Define YY_INPUT for flex since input() can't be re-defined.
* On FreeBSD define both LITTLE_ENDIAN and BIG_ENDIAN and then set the
  BYTE_ORDER to the one we are using. On Solaris they define one or
  the other but not both. For us to keep using FreeBSD header files,
  we need to use endian definitions the same way we do in pure BSD
  code.
2008-04-26 04:26:23 +00:00
jb
a656947bce Make this compile cleanly. 2008-04-26 04:22:32 +00:00
jb
2879d0ed4f Handle the different level of indirection between ioctl on SYSV vs BSD. 2008-04-26 04:20:11 +00:00
jb
37e61e49bf freopen() on FreeBSD behaves differently to the Solaris one. 2008-04-26 04:18:35 +00:00
jb
105579b1e6 * Use a portable POSIX timed wait.
* Handle the different ioctl format.
2008-04-26 04:16:17 +00:00
jb
71dafcd844 * Fix a function prototype.
* Allow for the different level of indirection between SYSV's ioctl and BSD's.
* Map a couple of sysconf definitions to one that FreeBSD has.
2008-04-26 04:13:23 +00:00
jb
db2123cf65 Simplify for FreeBSD for now, bypassing the multibyte char variables
that Solaris has. We may need to revisit this issue later.
2008-04-26 04:11:16 +00:00
jb
7063bf54fd Solaris has code which makes zlib optional, so they have to jump through
some hoops to get the compression functions. On FreeBSD have libz and
can just link against it.
2008-04-26 04:09:13 +00:00
jb
6e4e8caae1 'echo' behaviour differs between SYSV and BSD. 2008-04-26 04:03:58 +00:00
jb
17d482cf8c A lot of changes to make this code compile cleanly on FreeBSD. 2008-04-26 04:01:35 +00:00
jb
134952ed1b Use FreeBSD's libdwarf which is BSD licensed instead of the GPL'd one that
is used in Solaris.
2008-04-26 03:59:24 +00:00
jb
4e2e3671df We need to be consistent with prototype definitions. It isn't OK to
use 'const' and just override it whenever we feel like it. If we use
it at all, then we need to do it properly.

Add a couple of functions that were useful in getting this code ported.
2008-04-26 03:56:49 +00:00
jb
c8faa11c4f Make this file compile cleanly. 2008-04-26 03:54:23 +00:00
jb
4f3d158a74 Apply FreeBSD changes. 2008-04-26 03:47:34 +00:00
jb
36ed3b8831 On FreeBSD we can't afford to have a build fail simply because there
was some sort of CTF conversion error.
2008-04-26 03:44:47 +00:00
jb
221a9b981e Add a missing include file. We care about function prototype definitions. 2008-04-26 03:40:56 +00:00
jb
6a2b90b707 Apply FreeBSD changes.
There is an incomplete piece of code in here which requires the process
handling library which is still under development.
2008-04-26 03:39:02 +00:00
jb
7cf5dd8cd4 * Set the path to perl on FreeBSD.
* Use the FreeBSD shell.
* On FreeBSD the tests run from the OBJDIR, so output files go there
  rather than in the source tree like they do on Solaris.
* FreeBSD doesn't need a special path to the compiler.
2008-04-26 03:36:28 +00:00
jb
92d707013b Set the path to perl on FreeBSD. 2008-04-26 03:34:22 +00:00
jb
1b79cc0861 Port these test files to work under FreeBSD. 2008-04-26 03:32:20 +00:00
jb
52c14c7a3f Vendor import of the full userland contrib part of DTrace support from
OpenSolaris. This commit resets files to match the versions in the
OpenSolaris tree as of 2008/04/10.

The changes in this import from the previous import are the ones that
will subsequently re-applied to take files off the vendor branch. This
is unfortunately necessary because the Solaris developers won't allow
FreeBSD support #ifdefs in their source code because that creates
'dead code' (stuff that they never compile).
2008-04-26 00:54:52 +00:00
jb
c597f58d4f This commit was generated by cvs2svn to compensate for changes in r178528,
which included commits to RCS files with non-trunk default branches.
2008-04-26 00:54:52 +00:00
jb
cb8ce77727 Vendor import of DTrace support files from OpenSolaris. 2008-04-25 23:33:18 +00:00
jb
18b082dc88 This commit was generated by cvs2svn to compensate for changes in r178525,
which included commits to RCS files with non-trunk default branches.
2008-04-25 23:33:18 +00:00
jb
ce71c4333f Vendor import of the CTF (Compact C Type Format) code used by DTrace
from OpenSolaris.
2008-04-25 09:07:28 +00:00
jb
b63bf93fe6 This commit was generated by cvs2svn to compensate for changes in r178481,
which included commits to RCS files with non-trunk default branches.
2008-04-25 09:07:28 +00:00
jb
e01c5b1252 Vendor import of libraries for DTrace from OpenSolaris. 2008-04-25 09:04:09 +00:00
jb
d4d782d7b1 This commit was generated by cvs2svn to compensate for changes in r178479,
which included commits to RCS files with non-trunk default branches.
2008-04-25 09:04:09 +00:00
jb
871ee96d6f Vendor import of the DTrace app and test suite from OpenSolaris. 2008-04-25 06:56:31 +00:00
jb
41b995a0c9 This commit was generated by cvs2svn to compensate for changes in r178476,
which included commits to RCS files with non-trunk default branches.
2008-04-25 06:56:31 +00:00
jb
d018fd8cf0 Add FreeBSD IDs to files that originate in FreeBSD. 2008-04-22 07:43:00 +00:00
ru
0f0375e36a Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer
build libkse.  This should fix WITHOUT_LIBTHR builds as a side effect.
2008-03-29 17:44:40 +00:00
jb
5794ada908 The sources covered by Sun's CDDL have been repo copied below the
src/cddl and src/sys/cddl directories per the core@ decision following
the license review.

This change modifies the affected Makefiles to reference the sources
in their new location.
2008-03-27 23:21:25 +00:00
jb
769c37d0ba Remove _SOLARIS_C_SOURCE now that it doesn't do anything in FreeBSD
headers. All OpenSolaris compatibility comes via the set of specific
compatibility headers in src/compat/opensolaris and
src/sys/compat/opensolaris.
2007-11-28 22:58:09 +00:00
jb
148af6bc9b Remove a couple of definitions which now exist in compatibility headers. 2007-11-28 22:10:36 +00:00
jb
817ac88e3e Add more OpenSolaris compatibilty headers. 2007-11-28 21:40:07 +00:00
obrien
a1598920aa Tweak the handling of "WITHOUT_LIBPTHREAD". Also remove the accidental
treatment of 'LIBKSE' as an "old style" knob.

Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 23:31:11 +00:00
obrien
eb3f6a9e74 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +00:00
ru
c05a2547c6 Don't build bits that depend on the pthreads support if a
system was configured without such support.

Approved by:	re (kensmith)
2007-10-01 18:23:24 +00:00
ru
62d48a1604 Fixed static linkage (build with -DNO_SHARED).
Approved by:	re (kensmith)
2007-10-01 18:17:24 +00:00
pjd
a4c30a2063 Now that we have CDDLed code in the tree, add CDDL license.
Discussed with:	core
Approved by:	re (kensmith)
2007-09-23 07:04:50 +00:00
simokawa
194ebb69c9 Use ioctl() to get correct media size so that we can locate
ZFS labels in the tail of the media.

Approved by: re (kensmith), pjd
2007-08-07 12:42:03 +00:00
pjd
9eba2904d1 - Reduce number of atomic operations needed to be implemented in asm by
implementing some of them using existing ones.
- Allow to compile ZFS on all archs and use atomic operations surrounded
  by global mutex on archs we don't have or can't have all atomic
  operations needed by ZFS.
2007-06-08 12:35:47 +00:00
pjd
1effa32b66 Use provider's ident to handle situations when disks are moved around
and show up with different names: first try to open provider using
remembered name and compare its ident, if equal, this is our provider,
if not equal or there is no provider with such name, find provider with
remembered ident and don't care about the name.
2007-05-06 01:39:39 +00:00
pjd
cf2d754ee0 Clean up a little.
Obtained from:	OpenSolaris
2007-05-06 01:23:03 +00:00
pjd
2cd524ebed Improve sharenfs option handling, so it is possible to give hosts list.
Before the change the command above:

	# zfs set sharenfs=freefall.freebsd.org,69.147.83.54 tank/foo

was translated to:

/tank/foo -freefall.freebsd.org -69.147.83.54

instead of:

/tank/foo freefall.freebsd.org 69.147.83.54

This commit corrects this.
2007-04-21 13:17:23 +00:00
pjd
24d4489802 MFp4:
@118370	Correct typo.

@118371	Integrate changes from vendor.

@118491	Show backtrace on unexpected code paths.

@118494	Integrate changes from vendor.

@118504	Fix sendfile(2). I had two ways of fixing it:
	1. Fixing sendfile(2) itself to use VOP_GETPAGES() instead of
	   hacking around with vn_rdwr(UIO_NOCOPY), which was suggested
	   by ups.
	2. Modify ZFS behaviour to handle this special case.

	Although 1 is more correct, I've choosen 2, because hack from 1
	have a side-effect of beeing faster - it reads ahead MAXBSIZE
	bytes instead of reading page by page. This is not easy to implement
	with VOP_GETPAGES(), at least not for me in this very moment.

	Reported by:	Andrey V. Elsukov <bu7cher@yandex.ru>

@118525	Reorganize the code to reduce diff.

@118526	This code path is expected. It is simply when file is opened with
	O_FSYNC flag.

	Reported by:	kris
	Reported by:	Michal Suszko <dry@dry.pl>
2007-04-21 12:02:57 +00:00
pjd
485e86be3b Fix build breakage. Most of ZFS code is also compiled in userland and I
should really stop forgetting about that.
2007-04-17 21:38:15 +00:00
pjd
5c0f9c4bd3 Link libzpool, ztest and zdb against libpthread.
Requested by:	ru
2007-04-17 15:52:37 +00:00
ru
fc861d6ddf Apply a set of style.Makefile(5) changes to src/cddl/ makefiles.
There are some insignificant non-style changes as well.

Not fixed: makefiles use ${LIBTHR} that doesn't exist, thus
breaking "make checkdpadd" and not tracking dependencies
properly.

Approved by:	pjd
2007-04-16 21:20:26 +00:00
simokawa
2867905cf5 In FreeBSD,
- cv_timedwait() takes delta instead of absolute time,
- we need ioctl() for mediasize.

Reviewed by: pjd
2007-04-14 14:39:38 +00:00
pjd
f2c622ab52 MFp4: Synchronize with vendor (mostly 'zfs rename -r'). 2007-04-12 23:16:02 +00:00
pjd
3a0d881c5a MFp4: Add missing kmem_size() definition. 2007-04-10 13:26:45 +00:00
pjd
adf9b82198 MFp4: Hide under '#ifdef _KERNEL' only what's really needed. 2007-04-10 12:52:14 +00:00
pjd
2b260dcd5e MFp4: Synchronize with recent OpenSolaris changes. 2007-04-08 16:29:25 +00:00
pjd
f04caa18dd If we cannot open /dev/zfs try to load zfs.ko automatically and reopen. 2007-04-08 03:02:08 +00:00
pjd
65ca3ed324 Move atomic.S files to directories that better fit OpenSolaris directory
layout.
2007-04-07 23:54:54 +00:00
des
fa363796e1 Build ZFS on amd64 and pc98.
Approved by:	pjd@
2007-04-07 19:12:10 +00:00
pjd
3b005d3302 Please welcome ZFS - The last word in file systems.
ZFS file system was ported from OpenSolaris operating system. The code in under
CDDL license.

I'd like to thank all SUN developers that created this great piece of software.

Supported by:	Wheel LTD (http://www.wheel.pl/)
Supported by:	The FreeBSD Foundation (http://www.freebsdfoundation.org/)
Supported by:	Sentex (http://www.sentex.net/)
2007-04-06 01:09:06 +00:00