summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Fix clang warnings.benl2011-06-181-1/+1
| | | | Approved by: philip (mentor)
* Remove C constructs that are incompatible with C++ from variousgibbs2011-06-107-100/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OpenSolaris and ZFS header files. These changes are sufficient to allow a C++ program to use the libzfs library. Note: The majority of these files already included 'extern "C"' declarations, so the intention of providing C++ compatibility already existed even if it wasn't provided. cddl/compat/opensolaris/include/assert.h: Wrap our compatibility assert implementation in 'extern "C"'. Since this is a compatibility header I matched the Solaris style of doing this explicitly rather than rely on FreeBSD's __BEGIN/END_DECLS macro. sys/cddl/compat/opensolaris/sys/kstat.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_pool.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/ddt.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h: Rename parameters in function declarations that conflict with C++ keywords. This was the solution preferred by members of the Illumos community. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h: In C, nested structures are visible in the global namespace, but in C++, they take on the namespace of the structure in which they are contained. Flatten nested structure definitions within struct zfs_cmd so these structures are visible in the global namespace when compiled in both languages. Sponsored by: Spectra Logic Corporation
* Silence notice on pool creation, import and access.mm2011-06-071-0/+2
| | | | | | Suggested by: Jeremy Chadwick (freebsd-stable@) Discussed with: pjd MFC after: 1 week
* MFCattilio2011-06-061-2/+0
|\
| * Remove empty #ifndefmm2011-06-061-2/+0
| | | | | | | | MFC after: 3 days
* | MFCattilio2011-06-042-2/+18
|\ \ | |/
| * opensolaris compat / zfs: avoid early overflow in ddi_get_lbolt*avg2011-06-042-2/+18
| | | | | | | | | | | | | | | | Reported by: David P. Discher <dpd@bitgravity.com> Tested by: will Reviewed by: art Discussed with: dwhite MFC after: 2 weeks
* | MFCattilio2011-05-311-0/+5
|\ \ | |/
| * Imagine situation where a security problem is found in setuid binary.pjd2011-05-311-0/+5
| | | | | | | | | | | | | | | | | | | | User upgrades his system to fix the problem, but if he has any ZFS snapshots for the file system which contains problematic binary, any user can mount the snapshot and execute vulnerable binary. Prevent this from happening by always mounting snapshots with setuid turned off. MFC after: 2 weeks
* | MFCattilio2011-05-271-0/+4
|\ \ | |/
| * Silence warnings about unsupoorted value types.pjd2011-05-271-0/+4
| | | | | | | | MFC after: 2 weeks
* | MFCattilio2011-05-265-40/+14
|\ \ | |/
| * Don't pass pointer to name buffer which is on the stack to another thread,pjd2011-05-241-20/+11
| | | | | | | | | | | | | | because the stack might be paged out once the other thread tries to use the data. Instead, just allocate memory. MFC after: 2 weeks
| * Don't access task structure once we call task function.pjd2011-05-244-20/+3
| | | | | | | | | | | | | | | | The task structure might be no longer available. This also allows to eliminates the need for two tasks in the zio structure. Submitted by: anonymous MFC after: 2 weeks
| * Fix the zfs file system so that it uses the lockrmacklem2011-05-221-2/+2
| | | | | | | | | | | | flags argument added to VFS_FHTOVP() by r222167. Reviewed by: pjd
* | MFCattilio2011-05-221-2/+2
| |
* | MFCattilio2011-05-221-2/+2
|\ \ | |/
| * Add a lock flags argument to the VFS_FHTOVP() file systemrmacklem2011-05-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib
| * Restore old (v15) behaviour for a recursive snapshot destroy.mm2011-05-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (zfs destroy -r pool/dataset@snapshot) To destroy all descendent snapshots with the same name the top level snapshot was not required to exist. So if the top level snapshot does not exist, check permissions of the parent dataset instead. Filed as Illumos Bug #1043 Reviewed by: delphij Approved by: pjd MFC after: together with v28
| * Revert accidentally committed local change in r221990avg2011-05-161-1/+1
| | | | | | | | Pointyhat to: avg
| * better integrate cyclic module with clocksource/eventtimer subsystemavg2011-05-163-22/+34
| | | | | | | | | | | | | | | | | | | | Now in the case when one-shot timers are used cyclic events should fire closer to theier scheduled times. As the cyclic is currently used only to drive DTrace profile provider, this is the area where the change makes a difference. Reviewed by: mav (earlier version, a while ago) X-MFC after: clocksource/eventtimer subsystem
* | MFCattilio2011-05-181-0/+6
| |
* | MFCattilio2011-05-162-20/+32
| |
* | MFCattilio2011-05-102-42/+2
|\ \ | |/
| * dtrace: remove unused codeavg2011-05-102-42/+2
| | | | | | | | | | | | Which is also useless, IMO. MFC after: 5 days
* | Commit the support for removing cpumask_t and replacing it directly withattilio2011-05-053-9/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cpuset_t objects. That is going to offer the underlying support for a simple bump of MAXCPU and then support for number of cpus > 32 (as it is today). Right now, cpumask_t is an int, 32 bits on all our supported architecture. cpumask_t on the other side is implemented as an array of longs, and easilly extendible by definition. The architectures touched by this commit are the following: - amd64 - i386 - pc98 - arm - ia64 - XEN while the others are still missing. Userland is believed to be fully converted with the changes contained here. Some technical notes: - This commit may be considered an ABI nop for all the architectures different from amd64 and ia64 (and sparc64 in the future) - per-cpu members, which are now converted to cpuset_t, needs to be accessed avoiding migration, because the size of cpuset_t should be considered unknown - size of cpuset_t objects is different from kernel and userland (this is primirally done in order to leave some more space in userland to cope with KBI extensions). If you need to access kernel cpuset_t from the userland please refer to example in this patch on how to do that correctly (kgdb may be a good source, for example). - Support for other architectures is going to be added soon - Only MAXCPU for amd64 is bumped now The patch has been tested by sbruno and Nicholas Esborn on opteron 4 x 12 pack CPUs. More testing on big SMP is expected to came soon. pluknet tested the patch with his 8-ways on both amd64 and i386. Tested by: pluknet, sbruno, gianni, Nicholas Esborn Reviewed by: jeff, jhb, sbruno
* Convert the last use of xcopyout() to ddi_copyout() and remove the nowmarius2011-05-032-5/+2
| | | | | | | unused xcopyin() as well as xcopyout(). MFC together with r219089. Approved by: mm
* Fix deduplicated zfs receivemm2011-04-302-58/+37
| | | | | | | | | | (dmu_recv_stream builds incomplete guid_to_ds_map) Illumos-gate changeset: 13329:c48b8bf84ab7 MFC together with v28 Approved by: pjd Obtained from: Illumos (Bug #755)
* Fix copy-paste bug.marcel2011-04-271-1/+1
|
* Partially fix ZFS compat code for sparc64.mm2011-04-082-25/+82
| | | | | | | Some endianess bugs still need to be resolved. Submitted by: marius (parts of the fix) MFC after: 1 month
* Stripped '32' suffix from linux systrace module name on i386.art2011-04-081-2/+3
| | | | Approved by: avg
* Use atomic load & store for TSC frequency. It may be overkill for amd64 butjkim2011-04-072-2/+2
| | | | | | | | | safer for i386 because it can be easily over 4 GHz now. More worse, it can be easily changed by user with 'machdep.tsc_freq' tunable (directly) or cpufreq(4) (indirectly). Note it is intentionally not used in performance critical paths to avoid performance regression (but we should, in theory). Alternatively, we may add "virtual TSC" with lower frequency if maximum frequency overflows 32 bits (and ignore possible incoherency as we do now).
* Checking file access on size change is bogus. The checks are done earlier bypjd2011-03-241-5/+0
| | | | | | | | | | | | VFS where we know if this is truncate(2) or ftruncate(2). If this is the latter we should depend on the mode the file was opened and not on the current permission. PR: standards/154873 Reported by: Mark Martinec <Mark.Martinec@ijs.si> Discussed with: Eric Schrock <eric.schrock@delphix.com> Discussed with: Mark Maybee <Mark.Maybee@Oracle.COM> MFC after: 1 month
* Fix potential panic in dbuf_sync_list() relate to spill blocks handling.pjd2011-03-141-4/+16
| | | | | Obtained from: IllumOS MFC after: 1 month
* add DTrace systrace support for linux32 and freebsd32 on amd64 syscallsavg2011-03-121-18/+45
| | | | | | | | | | | | | | | | | | | Add systrace_linux32 and systrace_freebsd32 modules which provide support for tracing compat system calls in addition to native system call tracing provided by systrace module. Provided that all the systrace modules are loaded now you can select what syscalls to trace in the following manner: syscall::xxx:yyy - work on all system calls that match the specification syscall:freebsd:xxx:yyy - only native system calls syscall:linux32:xxx:yyy - linux32 compat system calls syscall:freebsd32:xxx:yyy - freebsd32 compat system calls on amd64 PR: kern/152822 Submitted by: Artem Belevich <fbsdlist@src.cx> Reviewed by: jhb (earlier version) MFC after: 3 weeks
* Correct readdir over ZFS handling.pjd2011-03-081-11/+8
| | | | | Reported by: Pierre Beyssac <pb@fasterix.frmug.org> MFC after: 1 month
* Fix libzpool build.pjd2011-03-063-1/+5
| | | | MFC after: 1 month
* Make renaming of a ZVOL, ZVOL's parent directory and ZVOL snapshot work.pjd2011-03-055-2/+77
| | | | | Reported by: avg MFC after: 1 month
* Simplify zvol_remove_minors() a bit.pjd2011-03-051-7/+8
| | | | MFC after: 1 month
* Use proper lock in assertion.pjd2011-02-281-2/+2
| | | | MFC after: 1 month
* Finally... Import the latest open-source ZFS version - (SPA) 28.pjd2011-02-27224-13515/+41225
| | | | | | | | | | | | | | | Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month
* Fix typos - remove duplicate "the".brucec2011-02-212-2/+2
| | | | | | PR: bin/154928 Submitted by: Eitan Adler <lists at eitanadler.com> MFC after: 3 days
* Use the preload_fetch_addr() and preload_fetch_size() conveniencemarcel2011-02-131-2/+1
| | | | | | | functions to obtain the address and size of the preloaded pool configuration file/repository. Sponsored by: Juniper Networks.
* For UIO_NOCOPY case of reading request on zfs vnode, which has vm objectkib2011-02-111-2/+8
| | | | | | | | | | | | | attached, activate the page after the successful read, and free the page if read was unsuccessfull. Freshly allocated page is not on any queue yet, and not activating (or deactivating) the page leaves it on no queue, excluding the page from pagedaemon scans and making the memory disappeared until the vnode reclaimed. Reviewed by: avg MFC after: 1 week
* Make it impossible to clear the MNT_NFS4ACLS flag on ZFS filesystemtrasz2011-02-061-1/+3
| | | | | | | by using "mount -uw". Reviewed by: pjd MFC after: 2 weeks
* vdev's sectorsize should not be greater than 8 Kbytes and alsoae2011-02-041-1/+13
| | | | | | | | | it should be power of 2. This prevents non-aligned access while probing vdev's labels. PR: kern/147852 Reviewed by: pjd MFC after: 1 week
* Recommit r218169, enclosing with #ifdef _KERNELmm2011-02-011-0/+6
| | | | | | | This change is sufficient for the ZFS kernel module. Discussed with: pjd MFC after: 1 week
* Revert r218169 until it can be tested and fixed properly.kan2011-02-011-4/+0
|
* For ZFS, change the type of clock_t to int64_t.mm2011-02-011-0/+4
| | | | | | | | | | | | | | The clock_t type in OpenSolaris is long (int64_t on amd64). On FreeBSD clock_t is int32_t. The clock_t type is used in several places in the ZFS code to store system uptime in milliseconds ("seconds * hz"). With hz=1000 we have a 32-bit integer overflow in 24 days, 20 hours, 31 minutes and 23.648 seconds. This has a user reported negative impact on l2arc_feed_thread() and may cause unexpected results from other functions using clock_t. Reported by: Artem Belevich <fbsdlist@src.cx> on freebsd-fs@ MFC after: 1 week
* CDDL fixes for MIPS n32.jchandra2011-01-282-3/+5
| | | | Provide 64 bit atomic ops, and use 32 bit pointer.
OpenPOWER on IntegriCloud