aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Only unlock if the lock is exclusive.Peter Holm2011-10-241-3/+2
| | | | | | | | Reported by: Subbsd <subbsd gmail com> Discussed with: kib Notes: svn path=/head/; revision=226681
* Some dmesg cosmetics:Alexander Motin2011-10-243-3/+18
| | | | | | | | | - for the legacy PCI ATA channels move channel number out of the device description, same as it is for ahci(4), siis(4) and mvs(4); - add device description for the ISA ATA channels. Notes: svn path=/head/; revision=226680
* Let net80211 also know about stopped BA sessions. This fixes some issuesBernhard Schmidt2011-10-241-0/+1
| | | | | | | | | | | | where the driver assumed that BA resources are still available due to net80211 saying so. PR: 161407, 159768 Tested by: cperciva, rene MFC after: 3 days Notes: svn path=/head/; revision=226679
* Include <sys/zfs_vfsops.h> only when compiling kernel module.Pawel Jakub Dawidek2011-10-241-0/+2
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=226678
* Allow to rename file systems without remounting if it is possible.Pawel Jakub Dawidek2011-10-2411-15/+91
| | | | | | | | | | | | | | | | | | | | | | | It is possible for file systems with 'mountpoint' preperty set to 'legacy' or 'none' - we don't have to change mount directory for them. Currently such file systems are unmounted on rename and not even mounted back. This introduces layering violation, as we need to update 'f_mntfromname' field in statfs structure related to mountpoint (for the dataset we are renaming and all its children). In my opinion it is worth it, as it allow to update FreeBSD in even cleaner way - in ZFS-only configuration root file system is ZFS file system with 'mountpoint' property set to 'legacy'. If root dataset is named system/rootfs, we can snapshot it (system/rootfs@upgrade), clone it (system/oldrootfs), update FreeBSD and if it doesn't boot we can boot back from system/oldrootfs and rename it back to system/rootfs while it is mounted as /. Before it was not possible, because unmounting / was not possible. MFC after: 2 weeks Notes: svn path=/head/; revision=226676
* Don't terminate the interactive root mount prompt on mount failure.Marcel Moolenaar2011-10-231-20/+21
| | | | | | | | | | | This restores the previous behaviour. While here, match '?' and '.' inputs exactly and improve the error message. Requested by: avg@ Derived from a patch by: Arnaud Lacombe <lacombar@gmail.com> Notes: svn path=/head/; revision=226673
* Add a "-P olddistfiles" facility to prefetch ports distfiles, using anPoul-Henning Kamp2011-10-231-12/+43
| | | | | | | | | | | | | | | | old distfile directory as primary source: mkdir /freebsd/ports/distfiles.old mv /freebsd/ports/distfiles/* /freebsd/ports/distfiles.old sh sysbuild.sh -c $yourconfig -P /freebsd/ports/distfiles.old rm -rf /freebsd/ports/distfiles.old Unfortunately bsd.ports.mk does not attempt to use a hard-link so while this runs you need diskspace for both your old and your "new" distfiles. Notes: svn path=/head/; revision=226672
* Avoid some "Invalid argument" errors in the installer.Nathan Whitehorn2011-10-231-3/+20
| | | | | | | | PR: bin/161926 MFC after: 5 days Notes: svn path=/head/; revision=226666
* Conditionalize a pair of FreeBSD GCC extensions so that its CFLAGS are onlyRobert Millan2011-10-231-2/+12
| | | | | | | | | used with FreeBSD GCC. Approved by: kib (mentor) Notes: svn path=/head/; revision=226665
* - Fix installation when WITH_BSD_GREP is set to yesGabor Kovesdan2011-10-231-0/+2
| | | | | | | Submitted by: Aleksandr Rybalko <ray@ddteam.net> Notes: svn path=/head/; revision=226664
* Merge several fixes to bulk update processing from OpenBSD. MergedGleb Smirnoff2011-10-231-27/+44
| | | | | | | | revisions: 1.148, 1.149, 1.150. This makes number of states on master/slave to be of a sane value. Notes: svn path=/head/; revision=226663
* Fix indentation, no code changed.Gleb Smirnoff2011-10-231-2/+2
| | | | Notes: svn path=/head/; revision=226662
* - Fix a bad typo (FreeBSD specific) in pfsync_bulk_update(). InsteadGleb Smirnoff2011-10-231-3/+3
| | | | | | | | | | | | | | | | | of scheduling next run pfsync_bulk_update(), pfsync_bulk_fail() was scheduled. This lead to instant 100% state leak after first bulk update request. - After above fix, it appeared that pfsync_bulk_update() lacks locking. To fix this, sc_bulk_tmo callout was converted to an mtx one. Eventually, all pf/pfsync callouts should be converted to mtx version, since it isn't possible to stop or drain a non-mtx callout without risk of race. - Add comment that callout_stop() in pfsync_clone_destroy() lacks locking. Since pfsync0 can't be destroyed (yet), let it be here. Notes: svn path=/head/; revision=226661
* Fix from r226623 is not sufficient to close all races in pfsync(4).Gleb Smirnoff2011-10-231-40/+59
| | | | | | | | | | | | | | | | | | | | | | | | | The root of problem is re-locking at the end of pfsync_sendout(). Several functions are calling pfsync_sendout() holding pointers to pf data on stack, and these functions expect this data to be consistent. To fix this, the following approach was taken: - The pfsync_sendout() doesn't call ip_output() directly, but enqueues the mbuf on sc->sc_ifp's interfaces queue, that is currently unused. Then pfsync netisr is scheduled. PF_LOCK isn't dropped in pfsync_sendout(). - The netisr runs through queue and ip_output()s packets on it. Apart from fixing race, this also decouples stack, fixing potential issues, that may happen, when sending pfsync(4) packets on input path. Reviewed by: eri (a quick review) Notes: svn path=/head/; revision=226660
* Add information about static_ndp_pairs to rc.conf(5) manual pageMartin Matuska2011-10-231-0/+16
| | | | | | | | Submitted by: Sergey Kandaurov <pluknet@FreeBSD.org> MFC after: 3 days Notes: svn path=/head/; revision=226658
* Correctly reassign copyright of etc/rc.d/static_ndp back to delphij@Martin Matuska2011-10-231-1/+1
| | | | | | | | | | as the project itself is no legal entity Reported by: Joe Dahl <joel@vnode.se> MFC after: 3 days Notes: svn path=/head/; revision=226657
* Absense of M_WAITOK in malloc flags for UMA doesn'tGleb Smirnoff2011-10-231-1/+1
| | | | | | | | | equals presense of M_NOWAIT. Specify M_NOWAIT explicitly. This fixes sleeping with PF_LOCK(). Notes: svn path=/head/; revision=226656
* Correct flag for uma_zalloc() is M_WAITOK. M_WAIT is an old andGleb Smirnoff2011-10-231-1/+1
| | | | | | | | | deprecated flag from historical mbuf(9) allocator. This is style only change. Notes: svn path=/head/; revision=226655
* Add etc/rc.d/static_ndp, analogous to etc/rc.d/static_arp.Martin Matuska2011-10-234-1/+77
| | | | | | | | | | | | | Make sure that static ARP and NDP bindings are set before NETWORKING. As static_ndp is based on static_arp, pass copyright to the project with permission of the original author (delphij@). Reviewed by: delphij@FreeBSD.org MFC after: 3 days Notes: svn path=/head/; revision=226654
* Fix typos.Hiroki Sato2011-10-231-1/+1
| | | | Notes: svn path=/head/; revision=226653
* Add support for removing addresses added by ipv6_prefix_hostid_addr_up()Hiroki Sato2011-10-231-7/+10
| | | | | | | upon rc.d/netif stop. Notes: svn path=/head/; revision=226652
* - Add description that IPv6 configuration will be ignored if $ifconfig_IF_ipv6Hiroki Sato2011-10-231-8/+37
| | | | | | | | | | is empty. - Move a configuration example "inet6 accept_rtadv" to just after the manual GUA configuration. - Add an example of $ipv6_prefix_IF. Notes: svn path=/head/; revision=226651
* Add '%' and '@' to the set of characters which can appear in path names.Colin Percival2011-10-231-1/+1
| | | | | | | Without this change, freebsd-update refuses to accept 9.0 metadata files. Notes: svn path=/head/; revision=226650
* Fix an issue that 127/8 is not configured when $ifconfig_DEFAULT is not empty.Hiroki Sato2011-10-231-1/+1
| | | | | | | Spotted by: ume Notes: svn path=/head/; revision=226649
* Fix missing space in SEE ALSO section.Nathan Whitehorn2011-10-231-1/+1
| | | | | | | Submitted by: novel Notes: svn path=/head/; revision=226648
* Add support for Boot Camp. The support is defined as follows:Marcel Moolenaar2011-10-231-97/+213
| | | | | | | | | | | | | | | o Detect when Boot Camp is enabled (i.e. the MBR mirrors the GPT). o When Boot Camp is enabled, update the MBR whenever we write the GPT. o Creation of a Boot Camp enabled GPT is not supported. o Automatically disable Boot Camp when the GPT has been changed so that there's either no EFI partition or no HFS+ partition. o The first 4 partitions (by index) get mirrored in the MBR. Requested by, discussed with and tested by: kris@pcbsd.org MFC after: 1 week Notes: svn path=/head/; revision=226647
* Fix Buildworld WITHOUT_OPENSSL.Tim Kientzle2011-10-222-4/+32
| | | | | | | | PR: kern/160922 MFC after: 3 days Notes: svn path=/head/; revision=226643
* VN_NRESERVLEVEL is used in this file but opt_vm is not includedAttilio Rao2011-10-221-0/+1
| | | | | | | | | | | thus the stub switch won't be correctly handled. Include opt_vm.h. Submitted by: jeff MFC after: 3 days Notes: svn path=/head/; revision=226642
* Correct the spelling of getgrgid and getpwuid in the man page.Tim Kientzle2011-10-221-6/+6
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=226638
* Typo from previous commit. Urgh.Tim Kientzle2011-10-221-1/+1
| | | | Notes: svn path=/head/; revision=226636
* Bring in the --gid --gname --uid and --uname implementationTim Kientzle2011-10-225-8/+68
| | | | | | | | | from libarchive.googlecode.com. MFC after: 3 days Notes: svn path=/head/; revision=226635
*-. Upgrade our copy of llvm/clang to r142614, from upstream's release_30Dimitry Andric2011-10-221744-80449/+130351
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | branch. This brings us very close to the 3.0 release, which is expected in a week or two. MFC after: 1 week Notes: svn path=/head/; revision=226633
| | * Vendor import of clang release_30 branch r142614:vendor/clang/clang-r142614Dimitry Andric2011-10-202436-47629/+101599
| | | | | | | | | | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/cfe/branches/release_30@142614 Notes: svn path=/vendor/clang/dist/; revision=226586 svn path=/vendor/clang/clang-r142614/; revision=226587; tag=vendor/clang/clang-r142614
| * | Vendor import of llvm release_30 branch r142614:vendor/llvm/llvm-r142614Dimitry Andric2011-10-202799-95056/+226852
| | | | | | | | | | | | | | | | | | | | | | | | http://llvm.org/svn/llvm-project/llvm/branches/release_30@142614 Notes: svn path=/vendor/llvm/dist/; revision=226584 svn path=/vendor/llvm/llvm-r142614/; revision=226585; tag=vendor/llvm/llvm-r142614
* | | Revert the previous commit and add a comment explaining why it was wrong.Dag-Erling Smørgrav2011-10-221-2/+14
| | | | | | | | | | | | Notes: svn path=/head/; revision=226632
* | | openpam_static.c isn't auto-generated.Dag-Erling Smørgrav2011-10-221-5/+2
| | | | | | | | | | | | Notes: svn path=/head/; revision=226625
* | | Fix a race: we should update sc_len before dropping the pf lock, otherwise aGleb Smirnoff2011-10-211-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | number of packets can be queued on sc, while we are in ip_output(), and then we wipe the accumulated sc_len. On next pfsync_sendout() that would lead to writing beyond our mbuf cluster. Notes: svn path=/head/; revision=226623
* | | Update per-thread I/O statistics collection in ZFS.Pawel Jakub Dawidek2011-10-212-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows to see processes I/O activity in 'top -m io' output. PR kern/156218 Reported by: Marcus Reid <marcus@blazingdot.com> Patch by: avg MFC after: 3 days Notes: svn path=/head/; revision=226620
* | | Spelling.Gleb Smirnoff2011-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | Submitted by: dougb Notes: svn path=/head/; revision=226619
* | | Minor corrections and clarifications regarding exceptions.David Schultz2011-10-211-12/+23
| | | | | | | | | | | | Notes: svn path=/head/; revision=226618
* | | zfs vdev_file_io_start: validate vdev before using vdev_tsdPawel Jakub Dawidek2011-10-211-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vdev_tsd can be NULL for certain vdev states. At least in userland testing with ztest. Submitted by: avg MFC after: 3 days Notes: svn path=/head/; revision=226617
* | | zdb: access dp_free_bpobj only if pool version is >= SPA_VERSION_DEADLISTSPawel Jakub Dawidek2011-10-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: avg MFC after: 3 days Notes: svn path=/head/; revision=226616
* | | thr_create: new_thread_ID may be NULLPawel Jakub Dawidek2011-10-211-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | Submitted by: avg MFC after: 3 days Notes: svn path=/head/; revision=226615
* | | Note that it is still not possible to guard special kind of allocations, thoseGleb Smirnoff2011-10-211-1/+15
| | | | | | | | | | | | | | | | | | | | | that have special relationships with uma(9). Currently only mbuf clusters. Notes: svn path=/head/; revision=226614
* | | libzpool task_alloc: pass only valid flags to kmem_allocPawel Jakub Dawidek2011-10-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | tqflags may contain other flags besided those that are suitable for kmem_alloc == umem_alloc Submitted by: avg MFC after: 3 days Notes: svn path=/head/; revision=226613
* | | Because ZFS boot code was very fragile in the past and real PITA to debug,Pawel Jakub Dawidek2011-10-212-0/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | introduce zfsboottest.sh script that will verify if it will be possible to boot from the given pool. # zfsboottest.sh system Where "system" is pool name of the pool we want to boot from. What is being verified by the script: - Does the pool exist? - Does it have bootfs property configured? - Is mountpoint property of the boot dataset set to 'legacy'? Dataset configured in bootfs property has to be mounted to perform more checks: - Does the /boot directory in boot dataset exist? - Is this dataset configured as root file system in /etc/fstab or set in vfs.root.mountfrom variable in /boot/loader.conf? By using zfsboottest tool the script will read all the files in /boot directory using ZFS boot code and calculate their checksums. Then, it will walk /boot directory using find(1) though regular file sytem and also read all the files in /boot directory and calculate their checksums. If any of the files cannot be looked up, read or checksum is invalid it will be reported and booting off of this pool is probably not possible. Some additional checks may be interesting as well. For example if the disks contain proper pmbr and gptzfsboot code or if all expected files in /boot/ are present. When upgrading FreeBSD, one should snapshot datasets that contain operating system, upgrade (install new world and kernel) and use zfsboottest.sh to verify if it will be possible to boot from new configuration. If all is good one should upgrade boot blocks, by eg.: # gpart -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada1 If something is wrong, one should rollback datasets and report the problems. MFC after: 3 days Notes: svn path=/head/; revision=226612
* | | - Allow to specify multiple files to check, eg.Pawel Jakub Dawidek2011-10-212-35/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zfsboottest gpt/system0 gpt/system1 - /boot/kernel/kernel /boot/zfsloader - Instead of printing file's content calculate MD5 hash of the file, so it can be easly compared to the hash calculated via file system. - Some other minor improvements. MFC after: 3 days Notes: svn path=/head/; revision=226611
* | | Add missing #includes.Ed Schouten2011-10-212-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | According to POSIX, these two header files should be able to be included by themselves, not depending on other headers. The <net/if.h> header uses struct sockaddr when __BSD_VISIBLE=1, while <netinet/tcp.h> uses integer datatypes (u_int32_t, u_short, etc). MFC after: 2 months Notes: svn path=/head/; revision=226610
* | | In FreeBSD ip_output() expects ip_len and ip_off in host byte orderGleb Smirnoff2011-10-211-0/+8
| | | | | | | | | | | | | | | | | | | | | PR: kern/159029 Notes: svn path=/head/; revision=226609
* | | It turns out that truss also used kdump's mkioctls script, and expectedDag-Erling Smørgrav2011-10-214-20/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ioctlname() to return a pointer to the name rather than print it. This did not show up in testing because truss had its own prototype for ioctlname(), so it would build fine and run fine as long as the program being traced did not issue an ioctl. Teach mkioctls to generate different versions of ioctlname() based on its first command-line argument. Pointed out by: Garrett Cooper <yanegomi@gmail.com> Notes: svn path=/head/; revision=226608