summaryrefslogtreecommitdiffstats
path: root/sys/cddl
Commit message (Collapse)AuthorAgeFilesLines
* MFC r258622: dtrace sdt: remove the ugly sname parameter of SDT_PROBE_DEFINEavg2014-01-172-2/+15
|
* MFC r258744-258746: zfs: add zfs_freebsd_putpagesavg2014-01-165-39/+251
|
* MFC r258720: MFV r258665: 4347 ZPL can use dmu_tx_assign(TXG_WAIT)avg2014-01-163-51/+20
|
* MFC r258739: zfs mappedread_sf: assert that a page is never partially validavg2014-01-161-1/+3
|
* MFC r258634: MFV r258376: 3964 L2ARC should always compress metadata buffersavg2014-01-163-2/+6
|
* MFC r258633: MFV r255256: 3954 metaslabs continue to load even afteravg2014-01-163-5/+113
| | | | hitting zfs_mg_alloc_failure limit
* MFC r258632,258704: MFV r255255: 4045 zfs write throttle & i/o scheduleravg2014-01-1635-720/+1512
| | | | | | performance work Sponsored by: HybridCluster [merge]
* MFC r258631: MFV r247578avg2014-01-163-81/+172
| | | | 3581 spa_zio_taskq[ZIO_TYPE_FREE][ZIO_TASKQ_ISSUE]->tq_lock is piping hot
* MFC r258743: drop ZUT_OBJavg2014-01-161-3/+0
|
* MFC r258630: 734 taskq_dispatch_prealloc() desiredavg2014-01-166-82/+51
|
* MFC r258628: opensolaris taskq: some cosmetic changesavg2014-01-162-19/+16
|
* MFC r258638,258642: expose zfs_flags as debug.zfs_flags r/w tunable and sysctlavg2014-01-161-0/+4
| | | | Sponsored by: HybridCluster
* MFC r256543,r259245,r259421,r259668,r259674jhibbits2014-01-153-11/+585
| | | | | | | | | | | | | | | | | | | r256543: Add fasttrap for PowerPC. This is the last piece of the DTrace/ppc puzzle. It's incomplete, it doesn't contain full instruction emulation, but it should be sufficient for most cases. r259245,r259421: (FBT) FBT now does work fully on PowerPC. Save r3 before using it for the trap check, else we end up saving the new r3, containing the trap instruction encoding (0x7c810808), and restoring it back with the frame on return. This caused it to panic on my ppc32 machine. r259668,r259674: Fix a typo in the FBT code.
* MFC r259811:delphij2014-01-142-10/+0
| | | | | | | | | | | MFV r258373: 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 259240asomers2014-01-101-9/+1
| | | | | | | | | | | | | | | | | | | | | | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c 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.
* MFC Alexander Motin's GEOM direct dispatch work:scottl2014-01-072-9/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r256603: Introduce new function devstat_end_transaction_bio_bt(), adding new argument to specify present time. Use this function to move binuptime() out of lock, substantially reducing lock congestion when slow timecounter is used. r256606: Move g_io_deliver() out of the lock, as required for direct dispatch. Move g_destroy_bio() out too to reduce lock scope even more. r256607: Fix passing uninitialized bio_resid argument to g_trace(). r256610: Add unmapped I/O support to GEOM RAID. r256830: Restore BIO_UNMAPPED and BIO_TRANSIENT_MAPPING in biodonne() when unmapping temporary mapped buffer. That fixes double unmap if biodone() called twice for the same BIO (but with different done methods). r256880: Merge GEOM direct dispatch changes from the projects/camlock branch. When safety requirements are met, it allows to avoid passing I/O requests to GEOM g_up/g_down thread, executing them directly in the caller context. That allows to avoid CPU bottlenecks in g_up/g_down threads, plus avoid several context switches per I/O. r259247: Fix bug introduced at r256607. We have to recalculate bp_resid here since sizes of original and completed requests may differ due to end of media. Testing of the stable/10 merge was done by Netflix, but all of the credit goes to Alexander and iX Systems. Submitted by: mav Sponsored by: iX Systems
* MFC r259168:mav2014-01-051-2/+8
| | | | | | | Don't even try to read vdev labels from devices smaller then SPA_MINDEVSIZE (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.
* MFC r258342:mav2014-01-051-0/+4
| | | | | | | | | Reenable vfs.zfs.zio.use_uma for amd64, disabled at r209261. On machines with seveal CPUs and enough RAM this can easily twice improve ZFS performance or twice reduce CPU usage. It was disabled three years ago due to memory and KVA exhaustion reports, but our VM subsystem got improved a lot since that time, hopefully enough to make another try.
* MFC r258137:mav2014-01-053-2/+28
| | | | | | | | | | | Introduce allocation cache to store LZ4 compression contexts without kicking VM subsystem twice for every written record. Tests on 24-core system show double reduction of CPU time spent on copying single large well-compressed file. This patch is not really needed on illumos (while not harm either) since their memory allocator by default uses caching for all requests up to 128K.
* MFC r259576:pjd2013-12-221-1/+8
| | | | | | MFV r258923: 4188 assertion failed in dmu_tx_hold_free(): dn_datablkshift != 0 illumos/illumos-gate@bb411a08b05466bfe0c7095b6373bbc1587e259a
* MFC r258311asomers2013-12-161-23/+40
| | | | | | | | | | | | | | | | | | | | | | | | | opensolaris/uts/common/dtrace/fasttrap.c Fix several problems that can cause panics on kldload and kldunload. * kproc_create(fasttrap_pid_cleanup_cb, ...) gets called before fasttrap_provs.fth_table gets allocated. This can lead to a panic on module load, because fasttrap_pid_cleanup_cb references fasttrap_provs.fth_table. Move kproc_create down after the point that fasttrap_provs.fth_table gets allocated, and modify the error handling accordingly. * dtrace_fasttrap_{fork,exec,exit} weren't getting NULLed until after fasttrap_provs.fth_table got freed. That caused panics on module unload because fasttrap_exec_exit calls fasttrap_provider_retire, which references fasttrap_provs.fth_table. NULL those function pointers earlier. * There wasn't any code to destroy the fasttrap_{tpoints,provs,procs}.fth_table mutexes on module unload, leading to a resource leak when WITNESS is enabled. Destroy those mutexes during fasttrap_unload(). Sponsored by: Spectra Logic Corporation
* MFC r258294:smh2013-11-251-2/+4
| | | | | | | Fix ZFS deadlock when sending a snapshot which is mounted. Approved by: re (glebius) Sponsored by: Multiplay
* MFV r258378: 4089 NULL pointer dereference in arc_read()avg2013-11-251-9/+11
| | | | | | | illumos/illumos-gate@57815f6b95a743697e148327725b7f568e75e6ea Tested by: adrian Approved by: re (gjb)
* MFV r258377: 4088 use after free in arc_release()avg2013-11-251-1/+1
| | | | | | illumos/illumos-gate@ccc22e130479b5bd7c0002267fee1e0602d3f772 Approved by: re (gjb)
* MFC r258353: zfs page_busy: fix the boundaries of the cleared rangeavg2013-11-251-1/+16
| | | | | | | | | | | | | | | | | | This is a fix for a regression introduced in r246293. vm_page_clear_dirty expects the range to have DEV_BSIZE aligned boundaries, otherwise it extends them. Thus it can happen that the whole page is marked clean while actually having some small dirty region(s). This commit makes the range properly aligned and ensures that only the clean data is marked as such. It would interesting to evaluate how much benefit clearing with DEV_BSIZE granularity produces. Perhaps instead we should clear the whole page when it is completely overwritten and don't bother clearing any bits if only a portion a page is written. Reviewed by: kib Approved by: re (gjb)
* MFC r256889:smh2013-10-241-1/+1
| | | | | | | | | | | Use the vdev's ashift to calculate the supported min block size passed to zio_compress_data(..) when compressing l2arc buffers. This eliminates L2ARC I/O errors, which resulted in very poor performance on vdev's configured with block size greater than 512b due to compression assuming a smaller min block size than the vdev supports. Approved by: re (glebius)
* MFV r255257: 4082 zfs receive gets EFBIG from dmu_tx_hold_free()avg2013-10-102-1/+11
| | | | | | | | | | | | | | | | illumos change 14172:be36a38bac3d: illumos ZFS issues: 4082 zfs receive gets EFBIG from dmu_tx_hold_free() Please note that this change is slightly different from r255257, because it is merged out of order with other (larger) upstream changes. PR: kern/182570 Reported by: Keith White <kwhite@site.uottawa.ca> Tested by: Keith White <kwhite@site.uottawa.ca> Approved by: re (glebius) MFC after: 1 week X-MFC after: r254753
* Initialize and free the DTrace taskqueue in the dtrace module load/unloadmarkj2013-10-083-9/+4
| | | | | | | | | | | | handlers rather than in the dtrace device open/close methods. The current approach can cause a panic if the device is closed which the taskqueue thread is active, or if a kernel module containing a provider is unloaded while retained enablings are present and the dtrace device isn't opened. Submitted by: gibbs (original version) Reviewed by: gibbs Approved by: re (glebius) MFC after: 2 weeks
* Improve lzjb decompress performance by reorganizing the codedelphij2013-10-081-1/+3
| | | | | | | | to tighten the copy loop. Submitted by: Denis Ahrens <denis h3q com> MFC after: 2 weeks Approved by: re (gjb)
* Optimize the block size used on ZFS cache devices as is already donegibbs2013-09-211-0/+2
| | | | | | | | | | for data and log devices. Reported by: Dmitryy Makarov Submitted by: smh Reviewed by: gibbs Approved by: re (delphij) MFC after: 2 weeks
* MFV r254750:delphij2013-09-2112-45/+388
| | | | | | | | | | | | | Add support of Illumos dumps on zvol over RAID-Z. Note that this only adds the features. FreeBSD would still need more work to support dumping on zvols. Illumos ZFS issues: 2932 support crash dumps to raidz, etc. pools MFC after: 1 month Approved by: re (ZFS blanket)
* Fixup cross-device rename checks in ZFS. Add a check for the casedavide2013-09-201-4/+7
| | | | | | | | | where 'fdvp' is a directory, 'tvp' is an already existing directory and they have different mount points. Reported by: avg, pjd Reviewed by: pjd Approved by: re (rodrigc)
* MFV r247844 (illumos-gate 13975:ef6409bc370f)delphij2013-09-109-34/+61
| | | | | | | | | | | Illumos ZFS issues: 3582 zfs_delay() should support a variable resolution 3584 DTrace sdt probes for ZFS txg states Provide a compatibility shim for Solaris's cv_timedwait_hires to help aid future porting. Approved by: re (ZFS blanket)
* - Use make_dev_credf(MAKEDEV_REF) instead of the race-prone make_dev()+davide2013-09-071-5/+1
| | | | | | | | dev_ref() in the clone handlers that still use it. - Don't set SI_CHEAPCLONE flag, it's not used anywhere neither in devfs (for anything real) Reviewed by: kib
* Handle cases where capability rights are not provided.pjd2013-09-051-1/+1
| | | | Reported by: kib
* Add sysctl/tunables for various metaslab variables.pjd2013-09-051-4/+33
|
* Change the cap_rights_t type from uint64_t to a structure that we can extendpjd2013-09-053-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the future in a backward compatible (API and ABI) way. The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough. The structure definition looks like this: struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; }; The initial CAP_RIGHTS_VERSION is 0. The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements. The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future. To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg. #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) We still support aliases that combine few rights, but the rights have to belong to the same array element, eg: #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) There is new API to manage the new cap_rights_t structure: cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg: cap_rights_t rights; cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT); There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg: #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...); Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1: cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL); Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition. This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x. Sponsored by: The FreeBSD Foundation
* Whitespace cleanup.jhibbits2013-09-021-48/+48
|
* Fixes for DTrace on PowerPC:jhibbits2013-08-313-112/+261
| | | | | | - Implement dtrace_getarg() - Sync fbt with x86, and fix a typo. - Pull in the time synchronization code from amd64.
* Previously, both zfs_rename and zfs_link does a check on whetherdelphij2013-08-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | the passed vnode belongs to the same mount point (v_vfsp or also known as v_mount in FreeBSD). This check prevents the code from proceeding further on vnodes that do not belong to ZFS, for instance, on UFS or NULLFS. The recent change (merged as r254585) on upstream changes the check of v_vfsp to instead check the znode's z_zfsvfs. On Illumos this would work because when the vnode comes from lofs, the VOP_REALVP() would give the right vnode, this is not true on FreeBSD where our VOP_REALVP is a no-op, and as such tdvp is not guaranteed to be a ZFS vnode, and will later trigger a failed assertion when verifying the vnode. This changeset modifies our local shims (zfs_freebsd_rename and zfs_freebsd_link) to check if v_mount matches before proceeding further. Reported by: many Diagnostic work by: avg
* Rename the kld_unload event handler to kld_unload_try, and add a newmarkj2013-08-244-11/+11
| | | | | | | | | | | | | | kld_unload event handler which gets invoked after a linker file has been successfully unloaded. The kld_unload and kld_load event handlers are now invoked with the shared linker lock held, while kld_unload_try is invoked with the lock exclusively held. Convert hwpmc(4) to use these event handlers instead of having kern_kldload() and kern_kldunload() invoke hwpmc(4) hooks whenever files are loaded or unloaded. This has no functional effect, but simplifes the linker code somewhat. Reviewed by: jhb
* MFV r254749:delphij2013-08-242-38/+14
| | | | | | | | | | | Don't hold dd_lock for long by breaking it when not doing dsl_dir accounting. It is not necessary to hold the lock while manipulating the parent's accounting, because there is no interface for userland to see a consistent picture of both parent and child at the same time anyway. Illumos ZFS issues: 4046 dsl_dataset_t ds_dir->dd_lock is highly contended
* MFV r254747:delphij2013-08-248-89/+97
| | | | | | | | | Fix a panic from dbuf_free_range() from dmu_free_object() while doing zfs receive. This is a regression from FreeBSD r253821. Illumos ZFS issues: 4047 panic from dbuf_free_range() from dmu_free_object() while doing zfs receive
* MFV r254422:delphij2013-08-231-2/+5
| | | | | | | | Illumos DTrace issues: 3089 want ::typedef 3094 libctf should support removing a dynamic type 3095 libctf does not validate arrays correctly 3096 libctf does not validate function types correctly
* zfs: do not reject any operations on a pool just because it's a boot poolavg2013-08-231-0/+2
| | | | | | | | Unlike the upstream FreeBSD supports booting to all kinds of pools. Requested by: many Tested by: sbruno MFC after: 12 days
* fbt: drop a local write-only variableavg2013-08-231-6/+0
| | | | | Discovered with: gcc46 MFC after: 4 days
* zfs: inline and remove zfs_vnode_lockavg2013-08-233-15/+5
| | | | | | | | It didn't serve any useful purpose, but obscured file and line information useful for debugging. MFC after: 5 days X-MFC with: r254445
* Remove the deprecated VM_ALLOC_RETRY flag for the vm_page_grab(9).kib2013-08-221-1/+1
| | | | | | | | The flag was mandatory since r209792, where vm_page_grab(9) was changed to only support the alloc retry semantic. Suggested and reviewed by: alc Sponsored by: The FreeBSD Foundation
* Make dtrace_copy() actually work on PowerPC. Although unused currently,jhibbits2013-08-221-4/+4
| | | | it may be used in the future by dtrace.
* Expand the use of stat(2) flags to allow storing some Windows/DOSken2013-08-211-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and CIFS file attributes as BSD stat(2) flags. This work is intended to be compatible with ZFS, the Solaris CIFS server's interaction with ZFS, somewhat compatible with MacOS X, and of course compatible with Windows. The Windows attributes that are implemented were chosen based on the attributes that ZFS already supports. The summary of the flags is as follows: UF_SYSTEM: Command line name: "system" or "usystem" ZFS name: XAT_SYSTEM, ZFS_SYSTEM Windows: FILE_ATTRIBUTE_SYSTEM This flag means that the file is used by the operating system. FreeBSD does not enforce any special handling when this flag is set. UF_SPARSE: Command line name: "sparse" or "usparse" ZFS name: XAT_SPARSE, ZFS_SPARSE Windows: FILE_ATTRIBUTE_SPARSE_FILE This flag means that the file is sparse. Although ZFS may modify this in some situations, there is not generally any special handling for this flag. UF_OFFLINE: Command line name: "offline" or "uoffline" ZFS name: XAT_OFFLINE, ZFS_OFFLINE Windows: FILE_ATTRIBUTE_OFFLINE This flag means that the file has been moved to offline storage. FreeBSD does not have any special handling for this flag. UF_REPARSE: Command line name: "reparse" or "ureparse" ZFS name: XAT_REPARSE, ZFS_REPARSE Windows: FILE_ATTRIBUTE_REPARSE_POINT This flag means that the file is a Windows reparse point. ZFS has special handling code for reparse points, but we don't currently have the other supporting infrastructure for them. UF_HIDDEN: Command line name: "hidden" or "uhidden" ZFS name: XAT_HIDDEN, ZFS_HIDDEN Windows: FILE_ATTRIBUTE_HIDDEN This flag means that the file may be excluded from a directory listing if the application honors it. FreeBSD has no special handling for this flag. The name and bit definition for UF_HIDDEN are identical to the definition in MacOS X. UF_READONLY: Command line name: "urdonly", "rdonly", "readonly" ZFS name: XAT_READONLY, ZFS_READONLY Windows: FILE_ATTRIBUTE_READONLY This flag means that the file may not written or appended, but its attributes may be changed. ZFS currently enforces this flag, but Illumos developers have discussed disabling enforcement. The behavior of this flag is different than MacOS X. MacOS X uses UF_IMMUTABLE to represent the DOS readonly permission, but that flag has a stronger meaning than the semantics of DOS readonly permissions. UF_ARCHIVE: Command line name: "uarch", "uarchive" ZFS_NAME: XAT_ARCHIVE, ZFS_ARCHIVE Windows name: FILE_ATTRIBUTE_ARCHIVE The UF_ARCHIVED flag means that the file has changed and needs to be archived. The meaning is same as the Windows FILE_ATTRIBUTE_ARCHIVE attribute, and the ZFS XAT_ARCHIVE and ZFS_ARCHIVE attribute. msdosfs and ZFS have special handling for this flag. i.e. they will set it when the file changes. sys/param.h: Bump __FreeBSD_version to 1000047 for the addition of new stat(2) flags. chflags.1: Document the new command line flag names (e.g. "system", "hidden") available to the user. ls.1: Reference chflags(1) for a list of file flags and their meanings. strtofflags.c: Implement the mapping between the new command line flag names and new stat(2) flags. chflags.2: Document all of the new stat(2) flags, and explain the intended behavior in a little more detail. Explain how they map to Windows file attributes. Different filesystems behave differently with respect to flags, so warn the application developer to take care when using them. zfs_vnops.c: Add support for getting and setting the UF_ARCHIVE, UF_READONLY, UF_SYSTEM, UF_HIDDEN, UF_REPARSE, UF_OFFLINE, and UF_SPARSE flags. All of these flags are implemented using attributes that ZFS already supports, so the on-disk format has not changed. ZFS currently doesn't allow setting the UF_REPARSE flag, and we don't really have the other infrastructure to support reparse points. msdosfs_denode.c, msdosfs_vnops.c: Add support for getting and setting UF_HIDDEN, UF_SYSTEM and UF_READONLY in MSDOSFS. It supported SF_ARCHIVED, but this has been changed to be UF_ARCHIVE, which has the same semantics as the DOS archive attribute instead of inverse semantics like SF_ARCHIVED. After discussion with Bruce Evans, change several things in the msdosfs behavior: Use UF_READONLY to indicate whether a file is writeable instead of file permissions, but don't actually enforce it. Refuse to change attributes on the root directory, because it is special in FAT filesystems, but allow most other attribute changes on directories. Don't set the archive attribute on a directory when its modification time is updated. Windows and DOS don't set the archive attribute in that scenario, so we are now bug-for-bug compatible. smbfs_node.c, smbfs_vnops.c: Add support for UF_HIDDEN, UF_SYSTEM, UF_READONLY and UF_ARCHIVE in SMBFS. This is similar to changes that Apple has made in their version of SMBFS (as of smb-583.8, posted on opensource.apple.com), but not quite the same. We map SMB_FA_READONLY to UF_READONLY, because UF_READONLY is intended to match the semantics of the DOS readonly flag. The MacOS X code maps both UF_IMMUTABLE and SF_IMMUTABLE to SMB_FA_READONLY, but the immutable flags have stronger meaning than the DOS readonly bit. stat.h: Add definitions for UF_SYSTEM, UF_SPARSE, UF_OFFLINE, UF_REPARSE, UF_ARCHIVE, UF_READONLY and UF_HIDDEN. The definition of UF_HIDDEN is the same as the MacOS X definition. Add commented-out definitions of UF_COMPRESSED and UF_TRACKED. They are defined in MacOS X (as of 10.8.2), but we do not implement them (yet). ufs_vnops.c: Add support for getting and setting UF_ARCHIVE, UF_HIDDEN, UF_OFFLINE, UF_READONLY, UF_REPARSE, UF_SPARSE, and UF_SYSTEM in UFS. Alphabetize the flags that are supported. These new flags are only stored, UFS does not take any action if the flag is set. Sponsored by: Spectra Logic Reviewed by: bde (earlier version)
OpenPOWER on IntegriCloud