freebsd-dev/sbin
Pawel Jakub Dawidek 18713ab672 MFC r196456,r196457,r196458,r196662,r196702,r196703,r196919,r196927,r196928,
r196943,r196944,r196947,r196950,r196953,r196954,r196965,r196978,r196979,
r196980,r196982,r196985,r196992,r197131,r197133,r197150,r197151,r197152,
r197153,r197167,r197172,r197177,r197200,r197201:

r196456:
- Give minclsyspri and maxclsyspri real values (consulted with kmacy).
- Honour 'pri' argument for thread_create().

r196457:
Set priority of vdev_geom threads and zvol threads to PRIBIO.

r196458:
- Hide ZFS kernel threads under zfskern process.
- Use better (shorter) threads names:
	'zvol:worker zvol/tank/vol00' -> 'zvol tank/vol00'
	'vdev:worker da0' -> 'vdev da0'

r196662:
Add missing mountpoint vnode locking.
This fixes panic on assertion with DEBUG_VFS_LOCKS and vfs.usermount=1 when
regular user tries to mount dataset owned by him.

r196702:
Remove empty directory.

r196703:
Backport the 'dirtying dbuf' panic fix from newer ZFS version.

Reported by:	Thomas Backman <serenity@exscape.org>

r196919:
bzero() on-stack argument, so mutex_init() won't misinterpret that the
lock is already initialized if we have some garbage on the stack.

PR:	kern/135480
Reported by:	Emil Mikulic <emikulic@gmail.com>

r196927:
Changing provider size is not really supported by GEOM, but doing so when
provider is closed should be ok.
When administrator requests to change ZVOL size do it immediately if ZVOL
is closed or do it on last ZVOL close.

PR:	kern/136942
Requested by:	Bernard Buri <bsd@ask-us.at>

r196928:
Teach zdb(8) how to obtain GEOM provider size.

PR:	kern/133134
Reported by:	Philipp Wuensche <cryx-freebsd@h3q.com>

r196943:
- Avoid holding mutex around M_WAITOK allocations.
- Add locking for mnt_opt field.

r196944:
Don't recheck ownership on update mount. This will eliminate LOR between
vfs_busy() and mount mutex. We check ownership in vfs_domount() anyway.

Noticed by:	kib
Reviewed by:	kib

r196947:
Defer thread start until we set priority.

Reviewed by:	kib

r196950:
Fix detection of file system being shared. Now zfs unshare/destroy/rename
command will properly remove exported file systems.

r196953:
When snapshot mount point is busy (for example we are still in it)
we will fail to unmount it, but it won't be removed from the tree,
so in that case there is no need to reinsert it.

Reported by:	trasz

r196954:
If we have to use avl_find(), optimize a bit and use avl_insert() instead of
avl_add() (the latter is actually a wrapper around avl_find() + avl_insert()).
Fix similar case in the code that is currently commented out.

r196965:
Fix reference count leak for a case where snapshot's mount point is updated.

r196978:
Call ZFS_EXIT() after locking the vnode.

r196979:
On FreeBSD we don't have to look for snapshot's mount point,
because fhtovp method is already called with proper mount point.

r196980:
When we automatically mount snapshot we want to return vnode of the mount point
from the lookup and not covered vnode. This is one of the fixes for using .zfs/
over NFS.

r196982:
We don't export individual snapshots, so mnt_export field in snapshot's
mount point is NULL. That's why when we try to access snapshots over NFS
use mnt_export field from the parent file system.

r196985:
Only log successful commands! Without this fix we log even unsuccessful
commands executed by unprivileged users. Action is not really taken, but it is
logged to pool history, which might be confusing.

Reported by:	Denis Ahrens <denis@h3q.com>

r196992:
Implement __assert() for Solaris-specific code. Until now Solaris code was
using Solaris prototype for __assert(), but FreeBSD's implementation.
Both take different arguments, so we were either core-dumping in assert()
or printing garbage.

Reported by:	avg

r197131:
Tighten up the check for race in zfs_zget() - ZTOV(zp) can not only contain
NULL, but also can point to dead vnode, take that into account.

PR:	kern/132068
Reported by:	Edward Fisk <7ogcg7g02@sneakemail.com>, kris
Fix based on patch from:	Jaakko Heinonen <jh@saunalahti.fi>

r197133:
- Protect reclaim with z_teardown_inactive_lock.
- Be prepared for dbuf to disappear in zfs_reclaim_complete() and check if
  z_dbuf field is NULL - this might happen in case of rollback or forced
  unmount between zfs_freebsd_reclaim() and zfs_reclaim_complete().
- On forced unmount wait for all znodes to be destroyed - destruction can be
  done asynchronously via zfs_reclaim_complete().

r197150:
There is a bug where mze_insert() can trigger an assert() of inserting
the same entry twice. This bug is not fixed yet, but leads to situation
where when try to access corrupted directory the kernel will panic.
Until the bug is properly fixed, try to recover from it and log that it
happened.

Reported by:	marck
OpenSolaris bug:	6709336

r197151:
Be sure not to overflow struct fid.

r197152:
Extend scope of the z_teardown_lock lock for consistency and "just in case".

r197153:
When zfs.ko is compiled with debug, make sure that znode and vnode point at
each other.

r197167:
Work-around READDIRPLUS problem with .zfs/ and .zfs/snapshot/ directories
by just returning EOPNOTSUPP. This will allow NFS server to fall back to
regular READDIR.
Note that converting inode number to snapshot's vnode is expensive operation.
Snapshots are stored in AVL tree, but based on their names, not inode numbers,
so to convert inode to snapshot vnode we have to interate over all snalshots.
This is not a problem in OpenSolaris, because in their READDIRPLUS
implementation they use VOP_LOOKUP() on d_name, instead of VFS_VGET() on
d_fileno as we do.

PR:	kern/125149
Reported by:	Weldon Godfrey <wgodfrey@ena.com>
Analysis by:	Jaakko Heinonen <jh@saunalahti.fi>

r197172:
Add missing \n.

Reported by:	marck

r197177:
Support both case: when snapshot is already mounted and when it is not yet
mounted.

r197200:
Modify mount(8) to skip MNT_IGNORE file systems by default, just like df(1)
does. This is not POLA violation, because there is no single file system in the
base that use MNT_IGNORE currently, although ZFS snapshots will be mounted with
MNT_IGNORE after next commit.

Reviewed by:	kib

r197201:
- Mount ZFS snapshots with MNT_IGNORE flag, so they are not visible in regular
  df(1) and mount(8) output. This is a bit smilar to OpenSolaris and follows
  ZFS route of not listing snapshots by default with 'zfs list' command.
- Add UPDATING entry to note that ZFS snapshots are no longer visible in
  mount(8) and df(1) output by default.

Reviewed by:	kib

Approved by:	re (bz)
2009-09-15 11:13:40 +00:00
..
adjkerntz If not compiled for debugging, redirect standard input/output/error 2006-10-23 10:48:19 +00:00
atacontrol Bring SATA revision reporting into conformance with SATA-IO guidelines. 2009-02-23 22:29:38 +00:00
atm Remove netatm from HEAD as it is not MPSAFE and relies on the now removed 2008-05-25 22:11:40 +00:00
badsect Expand *n't contractions. 2005-02-13 22:25:33 +00:00
bsdlabel MFC change 196383: 2009-08-19 16:40:45 +00:00
camcontrol MFC r196831: 2009-09-06 14:05:01 +00:00
ccdconfig Fix markup and some typos. 2006-04-14 09:20:25 +00:00
clri Use an intermediate pointer to avoid strict alias check warnings 2007-11-20 01:55:37 +00:00
comcontrol Sort sections. 2005-01-18 10:09:38 +00:00
conscontrol Sync program's usage() with manpage's SYNOPSIS. 2005-02-10 09:19:34 +00:00
ddb Apply various fixes: 2008-12-24 11:12:21 +00:00
devd o Spell. Sort .Xrs. 2009-03-08 18:02:30 +00:00
devfs Support for filtering on major device number was removed in rev. 1.7 or 2008-06-27 09:09:50 +00:00
dhclient Fix the logic to count the number of "live interfaces". With this change 2009-07-21 15:06:10 +00:00
dmesg Avoid moving onto a new line while testing if there is a syslog priority 2006-02-27 19:13:47 +00:00
dump Make dump -W show the level correctly. 2009-05-29 07:26:44 +00:00
dumpfs Print disk offets as %jd rather than %lld; I fixed one before committing 2009-01-28 12:08:19 +00:00
dumpon Whitespace and style nits. 2006-10-31 22:36:49 +00:00
fdisk - Back out the previous change in order to maintain compatibility. 2009-06-17 06:41:10 +00:00
fdisk_pc98 Use the common PC98_SID_ACTIVE define instead of a local define. 2009-03-19 12:31:59 +00:00
ffsinfo Don't coredump when executed with -o. 2008-01-29 00:20:00 +00:00
fsck Add the '-C' "check clean" flag. If the FS is marked clean, skip file 2009-01-30 18:33:05 +00:00
fsck_ffs Correct comment. 2009-06-03 09:23:31 +00:00
fsck_msdosfs fsck_msdosfs: accept no-op -C option for compatibilty with fsck 2009-06-10 19:02:54 +00:00
fsdb Update after function renames. 2006-10-31 22:07:29 +00:00
fsirand
gbde Remove temporary files when there are no longer needed. 2007-04-06 11:16:11 +00:00
geom MFC change 196278: 2009-08-16 21:32:12 +00:00
ggate The signature for a pthread function requires that it 2008-06-26 07:05:35 +00:00
growfs Fix an int overflow on very large file systems. 2007-12-17 08:03:18 +00:00
gvinum Bump doc date for previous changes. 2009-04-11 08:49:15 +00:00
ifconfig MFC r196929: Suppress an options line when no bit is on. 2009-09-13 11:31:25 +00:00
init Remove redundant code from runshutdown() now tcsetsid(3) works reliably. 2009-06-15 19:24:47 +00:00
ipf This makefile builds contrib code, so I won't try to fix all the 2007-11-18 03:29:10 +00:00
ipfw - 'burst' description rewritten. 2009-06-26 19:49:06 +00:00
iscontrol Big update to the iSCSI initiator code. Highlights include IPv6 support, 2008-11-25 07:17:11 +00:00
kldconfig Fix malloc size (visible on amd64, with "kldconfig -r"). 2005-11-07 19:22:20 +00:00
kldload Add a note about the implication of secure level setting against kldload, 2009-06-23 23:56:56 +00:00
kldstat Only show the pathname in verbose output as intended in the last commit (r172862). 2008-12-22 19:52:21 +00:00
kldunload Mark up lkm with .Nm, since lkm is name of an api. 2007-02-13 17:06:15 +00:00
ldconfig Remove unused reference to objformat.h 2007-01-25 22:38:58 +00:00
mca Markup nit. 2006-09-30 11:12:36 +00:00
md5 Minor markup fix for the r186836 update. 2009-01-06 21:16:42 +00:00
mdconfig Add the possibility to specify "-o force" with "mdconfig -du". 2009-01-10 17:17:18 +00:00
mdmfs -n is used by newfs to tell "do not generate a .snap directory" instead of 2007-05-14 19:23:13 +00:00
mknod In the previous changeset a cast of myminor to u_int were 2007-06-14 03:16:16 +00:00
mksnap_ffs Initialize iov and iovlen before use. 2009-06-02 18:30:09 +00:00
mount MFC r196456,r196457,r196458,r196662,r196702,r196703,r196919,r196927,r196928, 2009-09-15 11:13:40 +00:00
mount_autofs spell "file system" correctly 2005-01-24 20:06:16 +00:00
mount_cd9660 Fixing multi-session disc mount by passing the correct "ssector" option 2005-12-19 05:52:37 +00:00
mount_ext2fs Convert mount_ext2fs to a simple program which passes "-o option" to nmount(). 2007-01-28 00:51:01 +00:00
mount_hpfs Use MOPT_END in favor of MOPT_NULL, which better describes the purporse 2005-06-10 09:51:43 +00:00
mount_msdosfs Add missing qualifier which was missed in the previous commit. 2009-01-05 12:10:22 +00:00
mount_nfs Delete the descriptions of the gssname and allgssname optionss from 2009-07-29 14:44:09 +00:00
mount_ntfs Tone down warning about the quality of the NTFS VFS module. It appears that 2009-01-20 02:08:21 +00:00
mount_nullfs Add a missing .Pp call. 2006-04-19 19:21:42 +00:00
mount_reiserfs Increase WARNS level to 6. 2005-11-13 01:47:04 +00:00
mount_std Reduce the number of errors under WARNS=6 2006-09-13 04:50:44 +00:00
mount_udf style.Makefile(5): Remove -Wall from CFLAGS. 2006-07-17 20:53:25 +00:00
mount_unionfs Added whiteout behavior option. ``-o whiteout=always'' is default mode 2007-10-14 13:55:38 +00:00
natd Check rule numbers against maximum value to avoid rules cleanup due 2008-09-06 17:26:52 +00:00
newfs Slightly improve gjournal documentation. 2009-04-29 10:02:50 +00:00
newfs_msdos Style fixes to the newfs_msdos manpage. 2009-04-11 15:07:27 +00:00
nfsiod When accessing the sysctl vfs.nfs.iodmax, don't report errors as being 2005-04-07 20:37:04 +00:00
nos-tun Expand *n't contractions. 2005-02-13 22:25:33 +00:00
pfctl Link pf 4.1 to the build: 2007-07-03 12:46:08 +00:00
pflogd Let pflogd's Makefile just use WARNS instead of changing CFLAGS. 2009-04-23 09:11:37 +00:00
ping - improve readability 2009-01-11 22:36:45 +00:00
ping6 Implement -R support, similar to ping(8)'s -A. 2008-08-27 15:01:23 +00:00
quotacheck Drag this code kicking and screaming into the twenty-first century. 2008-07-02 15:51:59 +00:00
rcorder Document the misleading nature of the REQUIRE line. The patch in 2008-06-09 09:07:58 +00:00
reboot Remove and unused variable. 2009-01-31 13:48:15 +00:00
recoverdisk Save (empty) worklist at successful completion 2009-03-23 11:07:34 +00:00
restore Make 'struct acl' larger, as required to support NFSv4 ACLs. Provide 2009-05-22 15:56:43 +00:00
route Extend route command: 2009-04-14 23:05:36 +00:00
routed Only raise WARNS to 6 on i386 and amd64, strict alignment platforms still 2009-04-06 07:13:26 +00:00
rtsol Add eye candy while I'm here: a blank line between 2006-07-27 18:28:14 +00:00
savecore Correct the information about when the respective functionality first 2009-04-23 08:37:56 +00:00
sconfig Do not set IFF_DEBUG directly from the driver. 2008-06-30 21:18:27 +00:00
setkey o Add missed dot. 2008-09-29 05:31:27 +00:00
shutdown Note that when shutdown is run without options, it will place 2008-12-23 15:00:03 +00:00
spppcontrol Use a cast that doesn't create a compiler warning. 2007-11-18 00:33:23 +00:00
sunlabel Fix grammar error caused by my previous edit. 2005-03-30 18:54:41 +00:00
swapon Add a -q flag to swapon(8) to suppress informational messages. Use it in 2008-06-23 22:17:08 +00:00
sysctl time_t does not always fit into long, for instance on arm. So rather cast 2009-06-23 06:46:14 +00:00
tunefs Slightly improve gjournal documentation. 2009-04-29 10:02:50 +00:00
umount MFC r196287: 2009-08-17 07:46:55 +00:00
Makefile Remove the unmaintained University of Michigan NFSv4 client from 8.x 2009-05-22 12:35:12 +00:00
Makefile.inc Reimplementation of world/kernel build options. For details, see: 2006-03-17 18:54:44 +00:00