summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Revert r230913 and r230914.mm2012-02-031-6/+3
| | | | The initialization was correct, the problem needs deeper analysis.
* Add copyright information on last commits to comply with CDDL.mm2012-02-021-0/+3
| | | | | Discussed with: pluknet@ MFC after: 3 days
* Fix out of bounds write causing random panics,mm2012-02-021-3/+3
| | | | | | | uncovered by the change in r230256 Reviewed by: pluknet@ MFC after: 3 days
* always exclude data bufs regardless of debug settingskmacy2012-01-291-1/+1
|
* add tunable for developers working on areas outside of ZFSkmacy2012-01-281-1/+6
| | | | | to further reduce core size by excluding ARC metadata buffers from core dumps
* exclude kmem_alloc'ed ARC data buffers from kernel minidumps on amd64kmacy2012-01-272-2/+4
| | | | | | | | excluding other allocations including UMA now entails the addition of a single flag to kmem_alloc or uma zone create Reviewed by: alc, avg MFC after: 2 weeks
* Merge illumos revisions 13572, 13573, 13574:mm2012-01-247-23/+51
| | | | | | | | | | | | | | | | | | | | | | | | | Rev. 13572: disk sync write perf regression when slog is used post oi_148 [1] Rev. 13573: crash during reguid causes stale config [2] allow and unallow missing from zpool history since removal of pyzfs [5] Rev. 13574: leaking a vdev when removing an l2cache device [3] memory leak when adding a file-based l2arc device [4] leak in ZFS from metaslab_group_create and zfs_ereport_checksum [6] References: https://www.illumos.org/issues/1909 [1] https://www.illumos.org/issues/1949 [2] https://www.illumos.org/issues/1951 [3] https://www.illumos.org/issues/1952 [4] https://www.illumos.org/issues/1953 [5] https://www.illumos.org/issues/1954 [6] Obtained from: illumos (issues #1909, #1949, #1951, #1952, #1953, #1954) MFC after: 2 weeks
* Use provided name when allocating ksid domain. It isn't really used on FreeBSD,pjd2012-01-221-3/+3
| | | | | | but should fix a panic when pool is imported from another OS that is using this. MFC after: 1 week
* Dramatically optimize listing snapshots when user requests only snapshotpjd2012-01-212-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | names and wants to sort them by name, ie. when executes: # zfs list -t snapshot -o name -s name Because only name is needed we don't have to read all snapshot properties. Below you can find how long does it take to list 34509 snapshots from a single disk pool before and after this change with cold and warm cache: before: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 525s warm cache: 218s after: # time zfs list -t snapshot -o name -s name > /dev/null cold cache: 1.7s warm cache: 1.1s MFC after: 1 week
* By default turn off prefetch when listing snapshots.pjd2012-01-201-1/+7
| | | | | | | In my tests it makes listing snapshots 19% faster with cold cache and 47% faster with warm cache. MFC after: 1 week
* Fix the "lock &zrl->zr_mtx already initialized" assertion by initializingpluknet2012-01-171-1/+1
| | | | | | | | | | the allocated memory before calling mtx_init(9) on mtx pointing to it. Otherwize, random contents of uninitialized memory might occasionally trigger the assertion. Reported by: Pavel Polyakov <bsd kobyla org> Reviewed by: pjd MFC after: 1 week
* - Allow to change vfs.zfs.arc_meta_limit at runtime.pjd2012-01-051-4/+4
| | | | | | | - Change vfs.zfs.arc_meta_used from CTLFLAG_RDTUN to CTLFLAG_RD, as it is not a tunable. MFC after: 3 days
* In sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c, check thedim2012-01-031-1/+1
| | | | | | | | | the number of links against LINK_MAX (which is INT16_MAX), not against UINT32_MAX. Otherwise, the constant would implicitly be converted to -1. Reviewed by: pjd MFC after: 1 week
* opensolaris compat: fix vcmn_err so that panic(9) produces a proper messageavg2011-12-191-8/+14
| | | | | | | ... instead of just a verbatim format string. Reviewed by: pjd MFC after: 1 week
* From time to time people report space map corruption resulting in panicpjd2011-12-181-1/+25
| | | | | | | | | | | (ss == NULL) on pool import. I had such a panic recently. With current version of ZFS it is still possible to import the pool in readonly mode and backup all the data, but in case it is impossible for some reason add tunable vfs.zfs.space_map_last_hope, which when set to '1' will tell ZFS to remove colliding range and retry. This seems to have worked for me, but I consider it highly risky to use. MFC after: 1 week
* Implement replying of ACLs updates. ACL changes should go to ZIL onlypjd2011-12-182-13/+16
| | | | | | if the 'sync' property is set to 'always', so replying them is not common. MFC after: 1 month
* Revert the approach for skipping lockstat_probe_func call when doingattilio2011-12-121-0/+3
| | | | | | | | | | | | | lock_success/lock_failure, introduced in r228424, by directly skipping in dtrace_probe. This mainly helps in avoiding namespace pollution and thus lockstat.h dependency by systm.h. As an added bonus, this also helps in MFC case. Reviewed by: avg MFC after: 3 months (or never) X-MFC: r228424
* Move ru_inblock increment into arc_read_nolock() so we don't account forpjd2011-12-102-4/+3
| | | | | | | | | cached reads. Discussed with: gibbs No objections from: avg Tested by: Marcus Reid <marcus@blazingdot.com> MFC after: 1 week
* The vfs.zfs.txg.timeout sysctl can be safely modified at run time.pjd2011-12-091-1/+1
| | | | MFC after: 1 week
* Fix typo in copyright notice.mm2011-11-281-1/+1
| | | | MFC after: 1 month
* Merge new ZFS features from illumos:mm2011-11-2824-118/+808
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1644 add ZFS "clones" property https://www.illumos.org/issues/1644 1645 add ZFS "written" and "written@..." properties https://www.illumos.org/issues/1645 1646 "zfs send" should estimate size of stream https://www.illumos.org/issues/1646 1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots https://www.illumos.org/issues/1647 1693 persistent 'comment' field for a zpool https://www.illumos.org/issues/1693 1708 adjust size of zpool history data https://www.illumos.org/issues/1708 1748 desire support for reguid in zfs https://www.illumos.org/issues/1748 Obtained from: illumos (changesets 13514, 13524, 13525) MFC after: 1 month
* Existing VOP_VPTOCNP() interface has a fatal flow that is critical forkib2011-11-191-1/+1
| | | | | | | | | | | | | | | | | | | | | nullfs. The problem is that resulting vnode is only required to be held on return from the successfull call to vop, instead of being referenced. Nullfs VOP_INACTIVE() method reclaims the vnode, which in combination with the VOP_VPTOCNP() interface means that the directory vnode returned from VOP_VPTOCNP() is reclaimed in advance, causing vn_fullpath() to error with EBADF or like. Change the interface for VOP_VPTOCNP(), now the dvp must be referenced. Convert all in-tree implementations of VOP_VPTOCNP(), which is trivial, because vhold(9) and vref(9) are similar in the locking prerequisites. Out-of-tree fs implementation of VOP_VPTOCNP(), if any, should have no trouble with the fix. Tested by: pho Reviewed by: mckusick MFC after: 3 weeks (subject of re approval)
* Correct the types of the arguments to return probes of the syscallrstone2011-11-111-2/+7
| | | | | | | | provider. Previously we were erroneously supplying the argument types of the corresponding entry probe. Reviewed by: rpaulo MFC after: 1 week
* On i386, fbt probes are implemented by writing an invalid opcode overrstone2011-11-101-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | certain instructions in a function prologue or epilogue. DTrace has a hook into the invalid opcode fault handler that checks whether the fault was due to an probe and if so, runs the DTrace magic. Upon returning from an invalid opcode fault caused by a probe, DTrace must emulate the instruction that was replaced with the invalid opcode and then return control to the instruction following the invalid opcode. There were a pair of related bugs in the emulation for the leave instruction. The leave instruction is used to pop off a stack frame prior to returning from a function. The emulation for this instruction must move the trap frame for the invalid opcode fault down the stack to the bottom of the stack frame that is being removed, and then execute an iret. At two points in this process, the emulation code was storing values above the current value of the stack pointer. This opened up a window in which if we were two take an interrupt, the trap frame for the interrupt would overwrite the values stored on the stack, causing the system to panic later. The first bug was that at one point the emulation code saves the new value for $esp above the current stack pointer value. The fix is to save this value instead inside of the original trap frame. At this point we do not need the original trap frame so this is safe. The second bug is that when the emulate code loads $esp from the stack, it points part-way through the new trap frame instead of at its beginning. The emulation code adjusts the stack pointer to the correct value immediately afterwards, but this still leaves a one instruction window in which an interrupt would corrupt this trap frame. Fix this by adjusting the stack frame value before loading it into $esp. This fixes panics in invop_leave on i386 when using fbt return probes. Reviewed by: rpaulo, attilio MFC after: 1 week
* Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs.ed2011-11-072-2/+2
| | | | This means that their use is restricted to a single C file.
* Replace fasttrap_copyout() with uwrite(). FreeBSD copyout() is not able torstone2011-11-071-3/+8
| | | | | | | write to the .text section of a process. Obtained from: rpaulo MFC after: 3 days
* Correct typo in comment.pjd2011-11-051-1/+1
| | | | | Reported by: Fabian Keil <fk@fabiankeil.de> MFC after: 3 days
* In zvol_open() if the spa_namespace_lock is already held, it means thatpjd2011-11-051-0/+8
| | | | | | | | | ZFS is trying to open and taste ZVOL as its VDEV. This is not supported, so return an error instead of panicing on spa_namespace_lock recursion. Reported by: Robert Millan <rmh@debian.org> PR: kern/162008 MFC after: 3 days
* Fix typo in copyright notice introduced in r226724mm2011-10-251-1/+1
| | | | | | | (missing character in e-mail adress) Reported by: pjd MFC after: 3 days
* Update copyright information in several ZFS files, as the clause 3.3mm2011-10-255-0/+5
| | | | | | | | | | of the CDDL licence explicitly requires every Contributor to add a copyright notice. This also reflects the copyright notices for the changes recently added by Illumos. MFC after: 3 days
* - Use better naming now that we allow to rename any mounted file system (notpjd2011-10-248-9/+24
| | | | | | | only legacy). - Update copyright to include myself. MFC after: 2 weeks
* Don't forget to rename mounted snapshots of the file system being renamed.pjd2011-10-241-1/+1
| | | | MFC after: 2 weeks
* Include <sys/zfs_vfsops.h> only when compiling kernel module.pjd2011-10-241-0/+2
| | | | MFC after: 2 weeks
* Allow to rename file systems without remounting if it is possible.pjd2011-10-248-12/+69
| | | | | | | | | | | | | | | | | | | | 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
* Update per-thread I/O statistics collection in ZFS.pjd2011-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
* zfs vdev_file_io_start: validate vdev before using vdev_tsdpjd2011-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
* - Correctly read gang header from raidz.pjd2011-10-201-6/+9
| | | | | | | | | | - Decompress assembled gang block data if compressed. - Verify checksum of a gang header. - Verify checksum of assembled gang block data. - Verify checksum of uber block. Submitted by: avg MFC after: 3 days
* Always pass data size for checksum verification function, as usingpjd2011-10-191-10/+10
| | | | | | | | | | physical block size declared in bp may not always be what we want. For example in case of gang block header physical block size declared in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum calculation failed. This bug could lead to accessing unallocated memory and resets/failures during boot. MFC after: 3 days
* Initialize 'rc' properly before using it. This error could lead to infinitepjd2011-10-191-1/+3
| | | | | | loop when data reconstruction was needed. MFC after: 3 days
* Remove redundant size calculation.pjd2011-10-191-5/+0
| | | | MFC after: 3 days
* Import fix for Illumos bug #1475 to reduce diff against upstream.mm2011-10-181-8/+12
| | | | | | | | | | | | | Panic caused by this bug was already partially fixed by pjd@ in p4 CH 185940 and 185942. Reference: 1475 zfs spill block hold can access invalid spill blkptr https://www.illumos.org/issues/1475 Reviewed by: delphij Obtained from: Illumos (issue 1475, changeset 13469:b8e89e5c4167) MFC after: 1 week
* Fix a bug in sa_find_sizes() which could lead to panic:delphij2011-10-171-2/+2
| | | | | | | | | | | | | | | | When calculating space needed for SA_BONUS buffers, hdrsize is always rounded up to next 8-aligned boundary. However, in two places the round up was done against sum of 'total' plus hdrsize. On the other hand, hdrsize increments by 4 each time, which means in certain conditions, we would end up returning with will_spill == 0 and (total + hdrsize) larger than full_space, leading to a failed assertion because it's invalid for dmu_set_bonus. Sponsored by: iXsystems, Inc. Reviewed by: mm MFC after: 3 days
* Define dtrace_cmpset_long in terms of atomic_cmpset_longmarcel2011-10-161-43/+3
| | | | | and not by virtue of inline assembly. Now this file compiles on all supported architectures.
* In order to maximize the re-usability of kernel code in user space thiskmacy2011-09-162-4/+4
| | | | | | | | | | | | | patch modifies makesyscalls.sh to prefix all of the non-compatibility calls (e.g. not linux_, freebsd32_) with sys_ and updates the kernel entry points and all places in the code that use them. It also fixes an additional name space collision between the kernel function psignal and the libc function of the same name by renaming the kernel psignal kern_psignal(). By introducing this change now we will ease future MFCs that change syscalls. Reviewed by: rwatson Approved by: re (bz)
* zfs boot subroutines: correctly specify type of an integer literalavg2011-09-131-1/+1
| | | | | | | Found by adding more warning flags to zfs boot blocks build. Approved by: re (kib) MFC after: 1 week
* Split the vm_page flags PG_WRITEABLE and PG_REFERENCED into atomickib2011-09-061-2/+1
| | | | | | | | | | | | | | | | | flags field. Updates to the atomic flags are performed using the atomic ops on the containing word, do not require any vm lock to be held, and are non-blocking. The vm_page_aflag_set(9) and vm_page_aflag_clear(9) functions are provided to modify afalgs. Document the changes to flags field to only require the page lock. Introduce vm_page_reference(9) function to provide a stable KPI and KBI for filesystems like tmpfs and zfs which need to mark a page as referenced. Reviewed by: alc, attilio Tested by: marius, flo (sparc64); andreast (powerpc, powerpc64) Approved by: re (bz)
* Generalize ffs_pages_remove() into vn_pages_remove().mm2011-08-251-4/+9
| | | | | | | | | | | Remove mapped pages for all dataset vnodes in zfs_rezget() using new vn_pages_remove() to fix mmapped files changed by zfs rollback or zfs receive -F. PR: kern/160035, kern/156933 Reviewed by: kib, pjd Approved by: re (kib) MFC after: 1 week
* We need to unlock and destroy vnode attached to znode which we are freeing.pjd2011-08-241-0/+14
| | | | | | Reviewed by: kib Approved by: re (bz) MFC after: 1 week
* zfs_ioctl.c: improve code readability in zfs_ioc_dataset_list_next()mm2011-08-132-7/+8
| | | | | | | | | | | | | | | | | | | zvol.c: fix calling of dmu_objset_prefetch() in zvol_create_minors() by passing full instead of relative dataset name and prefetching all visible datasets to be processed later instead of just the pool name Reviewed by: pjd Approved by: re (kib) MFC after: 1 week > Reviewed by: If someone else reviewed your modification. > Approved by: If you needed approval for this commit. > Obtained from: If the change is from a third party. > MFC after: N [day[s]|week[s]|month[s]]. Request a reminder email. > Security: Vulnerability reference (one per line) or description. > Empty fields above will be automatically removed. M opensolaris/uts/common/fs/zfs/zfs_ioctl.c M opensolaris/uts/common/fs/zfs/zvol.c
* Fix race between dmu_objset_prefetch() invoked frommm2011-08-131-1/+2
| | | | | | | | | | | | | | | | zfs_ioc_dataset_list_next() and dsl_dir_destroy_check() indirectly invoked from dmu_recv_existing_end() via dsl_dataset_destroy() by not prefetching temporary clones, as these count as always inconsistent. In addition, do not prefetch hidden datasets at all as we are not going to process these later. Filed as Illumos Bug #1346 PR: kern/157728 Tested by: Borja Marcos <borjam@sarenet.es>, mm Reviewed by: pjd Approved by: re (kib) MFC after: 1 week
OpenPOWER on IntegriCloud