Commit Graph

744 Commits

Author SHA1 Message Date
Pawel Jakub Dawidek
8cb195f758 Uncomment forgotten check. Without this check in-place, ZFS will panic on
unload instead of returning EBUSY. This check tells if there are mounted
ZFS file systems or not. We can't unload if there are mounted file systems.

Reported by:	Andrey V. Elsukov <bu7cher@yandex.ru>
2007-04-16 10:23:24 +00:00
Pawel Jakub Dawidek
7ae6548e62 MFp4: Start DNLC after desiredvnodes variable is initialized.
Before this change if zfs.ko was loaded by the loader, DNLC was
      automatically disabled.

Reported by:	Zephiris <zephiris@gmail.com>
2007-04-15 09:10:17 +00:00
Pawel Jakub Dawidek
87e89536f1 Fix RAID-Z resilvering.
Obtained from:	OpenSolaris
2007-04-14 20:50:14 +00:00
Pawel Jakub Dawidek
d48078479c MFp4: Hmm, it seems to work now. 2007-04-14 15:01:50 +00:00
Pawel Jakub Dawidek
8aff52ca4e MFp4: Use max_ncpus, which is used in other places in the code. 2007-04-14 12:33:47 +00:00
Pawel Jakub Dawidek
8870baf005 MFp4: Add more debug, so we can see if zpool.cache was loaded or why it
wasn't loaded.
2007-04-14 12:23:03 +00:00
Pawel Jakub Dawidek
dbd490e0e2 MFp4: Allow to tune vfs.zfs.debug from loader.conf. 2007-04-14 12:21:06 +00:00
Pawel Jakub Dawidek
c98fbf0418 MFp4: - Allow to tune number of spa_zio_* threads.
- Reduce default number of spa_zio_* threads to N*spa_zio_issue
	  plus N*spa_zio_intr threads per ZIO type, where N is the number
	  of CPUs.
	- Put ZIO type number in thread's name.
2007-04-14 12:20:06 +00:00
Bruce M Simpson
05d91e4363 In member interface detach event handler, do not attempt to free state
which has already been freed by in_ifdetach(). With this cumulative change,
the removal of a member interface will not cause a panic in pfsync(4).

Requested by:	yar
PR:		86848
2007-04-14 01:01:46 +00:00
Pawel Jakub Dawidek
bd59d85850 Fix overflow, which was causing endless loops when 32bit machine had more
than 2GB of RAM. This was because our physmem is long and 'physmem*PAGESIZE'
can be negative for more than 2GB of memory.

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

It is not yet tested by Andrey, so there can be other problems, but this
was definiately a bug, so I'm committing a fix now.
2007-04-13 18:50:03 +00:00
Pawel Jakub Dawidek
f0bc5ac3e1 Fix vnodes starvation caused by DNLC (ZFS name cache):
- Tune number of namecache entires better (based on desiredvnodes).
- Handle vfs_lowvnodes event by releasing requested number of name cache
  entries, but no less than 5%.

Reported by:	simokawa
2007-04-13 08:42:01 +00:00
Pawel Jakub Dawidek
6704017a15 MFp4: Synchronize with vendor (mostly 'zfs rename -r'). 2007-04-12 23:16:02 +00:00
Pawel Jakub Dawidek
1da61b3665 MFp4: Bring back comments.
Requested by:	jhb
2007-04-12 23:14:25 +00:00
Ruslan Ermilov
9fd6e3d4a4 This commit was generated by cvs2svn to compensate for changes in r168616,
which included commits to RCS files with non-trunk default branches.
2007-04-11 11:09:18 +00:00
Ruslan Ermilov
1859f337c4 Unbreak world build. 2007-04-11 11:09:18 +00:00
Nate Lawson
1b96d500fb Put some overly verbose prints under bootverbose. This is on the vendor
branch but we need to work out a different interface with the vendor.
2007-04-11 02:03:36 +00:00
Nate Lawson
c1149e97bb This commit was generated by cvs2svn to compensate for changes in r168609,
which included commits to RCS files with non-trunk default branches.
2007-04-11 02:03:36 +00:00
Pawel Jakub Dawidek
1b6e2c02fe MFp4: Allow to set zfs_recover via vfs.zfs.recover from /boot/loader.conf. 2007-04-10 12:54:19 +00:00
Pawel Jakub Dawidek
5b9528e2d4 MFp4: Hide under '#ifdef _KERNEL' only what's really needed. 2007-04-10 12:52:14 +00:00
Pawel Jakub Dawidek
2d03e33170 Try to stabilize ZFS with regard to memory consumption:
- Allow to shrink ARC down to 16MB (instead of 64MB).
- Set arc_max to 1/2 of kmem_map by default.
- Start freeing things earlier when low memory situation is detected.
- Serialize execution of arc_lowmem().

I decided to setup minimum ZFS memory requirements to 512MB of RAM and 256MB of
kmem_map size. If there is less RAM or kmem_map, a warning will be printed.
World is cruel, be no better. In other words: modern file system requires
modern hardware:)

From ZFS administration guide:

"Currently the minimum amount of memory recommended to install a Solaris
 system is 512 Mbytes. However, for good ZFS performance, at least one
 Gbyte or more of memory is recommended."
2007-04-10 02:35:57 +00:00
Pawel Jakub Dawidek
52124c7f1c Reduce diff against vendor - we have now stronger check for "mutex already
initialized", so we can go back to kmem_alloc().
2007-04-10 02:19:12 +00:00
Pawel Jakub Dawidek
0404b7791b Remove unused #define. 2007-04-09 23:30:28 +00:00
Pawel Jakub Dawidek
33fc425c85 We don't have to wait for the root file system to be mounted anymore, now that
kobj KPI supports operating on files loaded by the loader.
2007-04-09 00:03:45 +00:00
Pawel Jakub Dawidek
5fc5d6ed61 Drop the Giant lock before calling zfs_domount(), which is held when
mounting root file system.
2007-04-09 00:02:11 +00:00
Pawel Jakub Dawidek
f92cb15e7b Move zpool.cache from /etc/zfs/ to /boot/zfs/, so we can keep it on
dedicated /boot/ file system and use ZFS for the root file system.
2007-04-08 23:59:39 +00:00
Pawel Jakub Dawidek
ffe54ff0ec MFp4: Synchronize with recent OpenSolaris changes. 2007-04-08 16:29:25 +00:00
Pawel Jakub Dawidek
425d75486e - Use 'name=value' so it can be properly recognized by devd(8).
- Use only subclass as devd's type.
2007-04-08 15:55:48 +00:00
Pawel Jakub Dawidek
61cfeccd58 Take vnode pointer and hold it under znode lock, so we won't race with
zfs_reclaim(). This may or may not fix problem reported by kris, but it's
definiatelly better that way.
2007-04-08 10:29:14 +00:00
Pawel Jakub Dawidek
3dc4488c91 Move atomic.S files to directories that better fit OpenSolaris directory
layout.
2007-04-07 23:54:54 +00:00
Pawel Jakub Dawidek
e321494eca Fix libzpool compilation.
Reported by:	des
2007-04-07 23:47:14 +00:00
Pawel Jakub Dawidek
9a691cb33a Limit the number of system taskq threads to the number of CPUs.
They are only used when there is a need for reducing namecache.

Observed by:	kris, csjp
2007-04-07 21:41:11 +00:00
Dag-Erling Smørgrav
29665eac3f Fix some type mismatches.
Reviewed by:	pjd@
2007-04-07 19:11:41 +00:00
Pawel Jakub Dawidek
639fdcd852 Allow to tune maximum and minimum memory used by ARC. 2007-04-07 19:10:50 +00:00
Pawel Jakub Dawidek
a583dae953 Add missing mutex_init() which was causing assertion panic when on clone
destruction.

Reported by:	kris
2007-04-07 11:04:37 +00:00
Pawel Jakub Dawidek
f0a75d274a 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
Nate Lawson
0d4ac62a35 Add an interface for drivers to be notified of changes to CPU frequency.
cpufreq_pre_change is called before the change, giving each driver a chance
to revoke the change.  cpufreq_post_change provides the results of the
change (success or failure).  cpufreq_levels_changed gives the unit number
of the cpufreq device whose number of available levels has changed.  Hook
in all the drivers I could find that needed it.

* TSC: update TSC frequency value.  When the available levels change, take the
highest possible level and notify the timecounter set_cputicker() of that
freq.  This gets rid of the "calcru: runtime went backwards" messages.
* identcpu: updates the sysctl hw.clockrate value
* Profiling: if profiling is active when the clock changes, let the user
know the results may be inaccurate.

Reviewed by:	bde, phk
MFC after:	1 month
2007-03-26 18:03:29 +00:00
Jung-uk Kim
a19b8275ad Merge from vendor branch to fix tinderbox breakage. 2007-03-22 21:23:29 +00:00
Jung-uk Kim
6e6ecbd187 Fix tinderbox build breakage.
Note that it is committed on the vendor branch because it will be
submitted to the vendor.
2007-03-22 21:14:43 +00:00
Jung-uk Kim
1178769589 This commit was generated by cvs2svn to compensate for changes in r167817,
which included commits to RCS files with non-trunk default branches.
2007-03-22 21:14:43 +00:00
Jung-uk Kim
df6b852a3a Update to reflect import of ACPI-CA 20070320. 2007-03-22 18:08:11 +00:00
Jung-uk Kim
566829f919 Resolve conflicts from import of Intel ACPI-CA 20070320. 2007-03-22 18:02:34 +00:00
Jung-uk Kim
676ba8b815 Resolve conflicts of unchanged files that are off the vendor branch. 2007-03-22 17:58:27 +00:00
Jung-uk Kim
58bffa15c2 Remove files that removed on the vendor branch. 2007-03-22 17:47:41 +00:00
Jung-uk Kim
471dd6b2d7 Remove files that are no longer needed or removed by vendor. 2007-03-22 17:43:38 +00:00
Jung-uk Kim
73d8e290c6 This commit was generated by cvs2svn to compensate for changes in r167807,
which included commits to RCS files with non-trunk default branches.
2007-03-22 17:43:38 +00:00
Jung-uk Kim
6976fc7f02 Add fixes for FreeBSD build that were submitted upstream. 2007-03-22 17:36:29 +00:00
Jung-uk Kim
b8377236a6 This commit was generated by cvs2svn to compensate for changes in r167805,
which included commits to RCS files with non-trunk default branches.
2007-03-22 17:36:29 +00:00
Jung-uk Kim
1a39cfb03c Vendor import of Intel ACPI-CA 20070320 2007-03-22 17:24:05 +00:00
Jung-uk Kim
70f0d34262 This commit was generated by cvs2svn to compensate for changes in r167802,
which included commits to RCS files with non-trunk default branches.
2007-03-22 17:24:05 +00:00
Bruce M Simpson
6b47cca2a7 Teach pfsync(4) that its member interfaces may go away.
This change partially resolves the issue in the PR. Further architectural
fixes, in the form of reference counting, are needed.

PR:		86848
Reviewed by:	yar
MFC after:	1 month
2007-03-19 17:52:15 +00:00