summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Rename global cnt to vm_cnt to avoid shadowing.bdrewery2014-03-223-4/+4
| | | | | | | | | | | | | | To reduce the diff struct pcu.cnt field was not renamed, so PCPU_OP(cnt.field) is still used. pc_cnt and pcpu are also used in kvm(3) and vmstat(8). The goal was to not affect externally used KPI. Bump __FreeBSD_version_ in case some out-of-tree module/code relies on the the global cnt variable. Exp-run revealed no ports using it directly. No objection from: arch@ Sponsored by: EMC / Isilon Storage Division
* Update kernel inclusions of capability.h to use capsicum.h instead; somerwatson2014-03-161-1/+1
| | | | | | | | further refinement is required as some device drivers intended to be portable over FreeBSD versions rely on __FreeBSD_version to decide whether to include capability.h. MFC after: 3 weeks
* Report ZVOL block size as GEOM stripesize.mav2014-03-131-5/+9
| | | | MFC after: 2 weeks
* MFV r262983:delphij2014-03-111-1/+21
| | | | | | 4638 Panic in ZFS via rfs3_setattr()/rfs3_write(): dirtying snapshot! illumos/illumos-gate@2144b121c08e0eb676cc6ca4662ebbc9f9c22fe3
* All callers of static method load_nvlist() in spa.c handles error case,delphij2014-03-021-1/+3
| | | | | | | | | | so there is no reason to assert that we won't hit an error. Instead, just return that error to caller and have the upper layer handle it. Obtained from: FreeNAS Reported by: rodrigc Reviewed by: Matthew Ahrens MFC after: 2 weeks
* Expose a few DTrace parameters as sysctls under kern.dtrace and addmarkj2014-03-013-4/+16
| | | | | | | | descriptions for several existing sysctls. PR: 187027 Submitted by: Fedor Indutny <fedor@indutny.com> (original version) MFC after: 2 weeks
* Fix emulation of call and jmp instructions on i386 and for 32-bit processesmarkj2014-03-011-11/+4
| | | | | | | on amd64. Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in> MFC after: 2 weeks
* 4478 dtrace_dof_maxsize is far too smallmarkj2014-02-281-1/+1
| | | | | | | illumos/illumos-gate@d339a29bb4765c4b6883a935cf69b669cd05bca0 PR: 187027 MFC after: 1 week
* Fix the struct reg mappings for i386 and amd64, which differ between illumosmarkj2014-02-271-0/+51
| | | | | | | and FreeBSD. Submitted by: Prashanth Kumar <pra_udupi@yahoo.co.in> MFC after: 2 weeks
* Move some files that are identical on i386 and amd64 to an x86 subdirectorymarkj2014-02-277-5079/+1
| | | | | | | rather than keeping duplicate copies. Discussed with: avg MFC after: 1 week
* Revert r262466, as it does not compile on PowerPC.markj2014-02-261-5/+1
| | | | Reported by: jhibbits
* Make all 8 syscall arguments available to syscall probes in the same waymarkj2014-02-251-1/+5
| | | | | | | | that this is done for SDT probes. This fixes the syscall/tst.args.d test, which was failing because mmap(2)'s sixth argument wasn't available to the probe. MFC after: 2 weeks
* 1452 DTrace buffer autoscaling should be less violentmarkj2014-02-221-15/+33
| | | | | | | | | | | illumos/illumos-gate@6fb4854bed54ce82bd8610896b64ddebcd4af706 This fixes the tst.resize1.d and tst.resize2.d DTrace tests, which have been failing since r261122 since they were causing dtrace(1) to attempt to allocate and use large amounts of memory, and get killed by the OOM killer as a result. MFC after: 1 month
* Define the KM_NORMALPRI flag for kmem_alloc(), as it is used in somemarkj2014-02-221-0/+1
| | | | | | | upstream DTrace code. It indicates that the kernel memory allocator need not attempt to satisfy non-blocking allocations in low-memory conditions. This has no direct equivalent in the malloc(9) flags, so it is just defined to 0 for now.
* MFV r261619:delphij2014-02-081-2/+3
| | | | | | | | | | | 4574 get_clones_stat does not call zap_count in non-debug kernel zap_count(...) is never called in non-DEBUG kernel. As result "count" variable is always 0, and "goto fail" is always reached. This means get_clones_stat function never makes up list of clones for "clones" properties. MFC after: 2 weeks
* MFV r260834:delphij2014-01-181-9/+8
| | | | | Fix memory leak of compressed buffers in l2arc_write_done (Illumos #3995).
* traverse_visitbp: visit DMU_GROUPUSED_OBJECT before DMU_USERUSED_OBJECTavg2014-01-171-6/+6
| | | | | | | | | | | | | | | This is done to ensure that visited object IDs are always increasing. Also, pass correct object ID to prefetch_dnode_metadata for os_groupused_dnode. Without this change we would hit an assert if traversal was paused on a GROUPUSED object, which is unlikely but possible. Apparently the same change was independently developed by Deplhix. Reviewed by: Matthew Ahrens <mahrens@delphix.com> MFC after: 10 days Sponsored by: HybridCluster
* fix a build problem with INVARIANTS enabled introduced in r260704avg2014-01-161-1/+1
| | | | | | Reported by: glebius MFC after: 5 days X-MFC with: r260704
* fix a bug in ZFS mirror code for handling multiple DVAaavg2014-01-161-3/+6
| | | | | | | | | | | | | | | | The bug was introduced in r256956 "Improve ZFS N-way mirror read performance". The code in vdev_mirror_dva_select erroneously considers already tried DVAs for the next attempt. Thus, it is possible that a failing DVA would be retried forever. As a secondary effect, if the attempts fail with checksum error, then checksum error reports are accumulated until the original request ultimately fails or succeeds. But because retrying is going on indefinitely the cheksum reports accumulation will effectively be a memory leak. Reviewed by: gibbs MFC after: 13 days Sponsored by: HybridCluster
* Revert r260705: wrong patch committed by accidentavg2014-01-161-4/+0
| | | | An earlier, less efficient version was committed by accident.
* zfs_deleteextattr: name buffer from namei is needed by zfs_renameavg2014-01-161-1/+3
| | | | | | | | | If we prematurely free the name buffer and it gets quickly recycled, then zfs_rename may see data from another lookup or even unmapped memory via cn_nameptr. MFC after: 6 days Sponsored by: HybridCluster
* fix a bug in ZFS mirror code for handling multiple DVAaavg2014-01-161-0/+4
| | | | | | | | | | | | | | | | The bug was introduced in r256956 "Improve ZFS N-way mirror read performance". The code in vdev_mirror_dva_select erroneously considers already tried DVAs for the next attempt. Thus, it is possible that a failing DVA would be retried forever. As a secondary effect, if the attempts fail with checksum error, then checksum error reports are accumulated until the original request ultimately fails or succeeds. But because retrying is going on indefinitely the cheksum reports accumulation will effectively be a memory leak. Reviewed by: gibbs MFC after: 13 days Sponsored by: HybridCluster
* zfs: getnewvnode_reserve must be called outside of a zfs transactionavg2014-01-163-2/+30
| | | | | | | | | | | | | | | | | | | | | | | Otherwise we could run into the following deadlock. A thread has a transaction open and assigned to a transaction group. That would prevent the transaction group from be quiesced and synced. The thread is blocked in getnewvnode_reserve waiting for a vnode to a be reclaimed. vnlru thread is blocked trying to enter ZFS VOP because a filesystem is suspended by an ongoing rollback or receive operation. In its turn the operation is waiting for the current transaction group to be synced. zfs_zget is always used outside of active transactions, but zfs_mknode is always used in a transaction context. Thus, we hoist getnewvnode_reserve from zfs_mknode to its callers. While there, assert that ZFS always calls getnewvnode while having a vnode reserved. Reported by: adrian Tested by: adrian MFC after: 17 days Sponsored by: HybridCluster
* In atomic_or_8_nv() load 1 and not 8 bytes from the addressmarcel2014-01-061-1/+1
| | | | given. Note that atomic_or_8_nv() is not used at this time.
* Fix build after r260234 by converting ddi_get_lbolt64() from inline intomav2014-01-051-14/+3
| | | | | a macro. Otherwise compiler complains that hz variable used there either undefined or defined twice, thanks to header mess caused by compat shims.
* In dmu_zfetch_stream_reclaim() replace division with multiplication andmav2014-01-031-1/+3
| | | | move it out of the loop and lock.
* Remove extra conversion to nanoseconds from ddi_get_lbolt64().mav2014-01-031-1/+2
| | | | | As result this uses one multiplication and shifts instead of one division and two multiplications.
* MFV r260155:delphij2014-01-025-9/+26
| | | | | | | | | | | | | | | | | When we encounter an I/O error on a piece of metadata while deleting a file system or zvol, we don't update the bptree_entry_phys_t's bookmark. This would lead to double free of bp's which will lead to space map corruption. Instead of tolerating and allowing the corruption, panic immediately. See Illumos #4390 for more details. 4391 panic system rather than corrupting pool if we hit bug 4390 Illumos/illumos-gate@8b36997aa24d9817807faa4efa301ac9c07a2b78 MFC after: 2 weeks
* MFV r260154 + 260182:delphij2014-01-0221-121/+908
| | | | | | | | | 4369 implement zfs bookmarks 4368 zfs send filesystems from readonly pools Illumos/illumos-gate@78f171005391b928aaf1642b3206c534ed644332 MFC after: 2 weeks
* Fix build on platforms where atomic_swap_64 is not available.delphij2014-01-021-0/+4
|
* MFV r260153:delphij2014-01-011-1/+1
| | | | | | | | | 4121 vdev_label_init should treat request as succeeded when pool is read only Illumos/illumos-gate@973c78e94bf9634782164382c9e291bf81161fa5 MFC after: 2 weeks
* MFV r259170:delphij2014-01-0131-349/+561
| | | | | | | | | | | | | 4370 avoid transmitting holes during zfs send 4371 DMU code clean up illumos/illumos-gate@43466aae47bfcd2ad9bf501faec8e75c08095e4f NOTE: Make sure the boot code is updated if a zpool upgrade is done on boot zpool. MFC after: 2 weeks
* MFV r258385:delphij2013-12-312-18/+230
| | | | | | | | | | | (Note: this change is not applicable to FreeBSD and the file is not included in build. It's integrated for completeness). 4128 disks in zpools never go away when pulled illumos/illumos-gate@39cddb10a31c1c2e66aed69e6871d09caa4c8147 MFC after: 2 weeks
* MFV r242733:delphij2013-12-312-12/+17
| | | | | | | | | | | | | | | 3306 zdb should be able to issue reads in parallel 3321 'zpool reopen' command should be documented in the man page and help message illumos/illumos-gate@31d7e8fa33fae995f558673adb22641b5aa8b6e1 FreeBSD porting notes: the kernel part of this changeset depends on Solaris buf(9S) interfaces and are not really applicable for our use. vdev_disk.c is patched as-is to reduce diverge from upstream, but vdev_file.c is left intact. MFC after: 2 weeks
* Allocate the probe ID unrhdr before the DTrace kld_* event handlers aremarkj2013-12-311-2/+2
| | | | | | | registered. Otherwise there is a small window during which probe IDs may be allocated before the unrhdr is allocated. MFC after: 2 weeks
* Revert r260091. The vmem calls seem to be slower than the *_unr() calls thatmarkj2013-12-314-26/+22
| | | | | they replaced, which is important considering that probe IDs are allocated during process startup for USDT probes.
* Now that vmem(9) is available, use vmem arenas to allocate probe andmarkj2013-12-304-22/+26
| | | | | | | | aggregation IDs, as is done in the upstream illumos code. This still requires some FreeBSD-specific code, as our vmem API is not identical to the one in illumos. Submitted by: Mike Ma <mikemandarine@gmail.com>
* MFV r258374:delphij2013-12-2423-252/+305
| | | | | | | | | | | 4171 clean up spa_feature_*() interfaces 4172 implement extensible_dataset feature for use by other zpool features illumos/illumos-gate@2acef22db7808606888f8f92715629ff3ba555b9 MFC after: 2 weeks
* MFV r258373:delphij2013-12-242-10/+0
| | | | | | | | | | | 4168 ztest assertion failure in dbuf_undirty 4169 verbatim import causes zdb to segfa 4170 zhack leaves pool in ACTIVE state illumos/illumos-gate@7fdd916c474ea52896c671bbe7b56ba34a1ca132 MFC after: 2 weeks
* Fix a brain-o. I had misread the limit as a size, but it's a pointer.jhibbits2013-12-211-1/+1
| | | | | | Submitted by: Howard Su MFC after: 2 weeks X-MFC-with: r259668
* Fix a couple bugs in FBT PowerPC. Clamp the size to a 'instruction size' notjhibbits2013-12-201-2/+2
| | | | | | 'byte size', and fix a typo. MFC after: 2 weeks
* MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0pjd2013-12-181-1/+8
| | | | | | illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a MFC after: 3 days
* The fasttrap fork handler is responsible for removing tracepoints in themarkj2013-12-181-8/+23
| | | | | | | | | | | | | | | | | | child process that were inherited from its parent. However, this should not be done in the case of a vfork, since the fork handler ends up removing the tracepoints from the shared vm space, and userland DTrace probes in the parent will no longer fire as a result. Now the child of a vfork may trigger userland DTrace probes enabled in its parent, so modify the fasttrap probe handler to handle this case and handle the child process in the same way that it would handle the traced process. In particular, if once traces function foo() in a process that vforks, and the child calls foo(), fasttrap will treat this call as having come from the parent. This is the behaviour of the upstream code. While here, add #ifdef guards to some code that isn't present upstream. MFC after: 1 month
* sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.casomers2013-12-121-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | When a da or ada device dissappears, outstanding IOs fail with ENXIO, not EIO. The check for EIO was probably copied from Illumos, where that is indeed the correct errno. Without this change, pulling a busy drive from a zpool would usually turn it into UNAVAIL, even though pulling an idle drive would turn it into REMOVED. With this change, it is REMOVED every time. Also, vdev_geom_io_intr shouldn't do zfs_post_remove, because that results in devd getting two resource.fs.zfs.removed events. The comment said that the event had to be sent directly instead of through the async removal thread because "the DE engine is using this information to discard prevoius I/O errors". However, the fact that vdev_geom_io_intr was never actually sending the events until now, and that vdev_geom_orphan never sent them at all, and that vdev_geom_orphan usually gets called about 2 seconds after the actual removal, means that FreeBSD's userland can cope with a late event just fine. Approved by: ken (mentor) Sponsored by: Spectra Logic Corporation MFC after: 4 weeks
* Correct the check for errors from proc_rwmem().markj2013-12-112-2/+2
| | | | MFC after: 2 weeks
* Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZEmav2013-12-101-2/+8
| | | | | | (64MB). Even if we would find one somehow, ZFS kernel code rejects such devices. It is funny to look on attempts to read 4 256K vdev labels from 1.44MB floppy, though it is not very practical and quite slow.
* Expose spa_asize_inflation.delphij2013-12-061-0/+3
| | | | X-MFC-With: r258632
* zfs: add zfs_freebsd_putpagesavg2013-11-293-23/+170
| | | | | | | this should be more optimal than writing pages one-by-one via zfs_write -> update_pages in the case of multi-page putpages call MFC after: 16 days
* zfs: add dmu_write_pages variant for freebsdavg2013-11-292-0/+66
| | | | | | | | The freebsd variant of dmu_write_pages is hidden under _KERNEL to avoid needlessly pulling in vm_page_t declaration. Besides, this function seems to be useless for ZFS userland counterpart. MFC after: 15 days
* zfs: make zfs_map_page / zfs_unmap_page publicavg2013-11-292-16/+15
| | | | MFC after: 15 days
OpenPOWER on IntegriCloud