summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused variable in unionfs_root().rodrigc2006-12-091-2/+0
| | | | Submitted by: daichi, Masanori OZAWA
* Use vfs_mount_error() in a few places to give more descriptive mount errorrodrigc2006-12-091-2/+6
| | | | messages.
* Add locking around calls to unionfs_get_node_status()rodrigc2006-12-091-0/+4
| | | | | | | in unionfs_ioctl() and unionfs_poll(). Submitted by: daichi, Masanori OZAWA <ozawa@ongs.co.jp> Prompted by: kris
* In unionfs_readdir(), prevent a possible NULL dereference.rodrigc2006-12-091-0/+4
| | | | | CID: 1667 Found by: Coverity Prevent (tm)
* In unionfs_hashrem(), use LIST_FOREACH_SAFE when iterating overrodrigc2006-12-091-2/+3
| | | | | | | the list of nodes to free them. CID: 1668 Found by: Coverity Prevent (tm)
* Minor cleanup. If we are doing a mount update, and we pass inrodrigc2006-12-091-4/+8
| | | | | | | | | | | an "export" flag indicating that we are trying to NFS export the filesystem, and the MSDOSFS_LARGEFS flag is set on the filesystem, then deny the mount update and export request. Otherwise, let the full mount update proceed normally. MSDOSFS_LARGES and NFS don't mix because of the way inodes are calculated for MSDOSFS_LARGEFS. MFC after: 3 days
* The ISO9660 spec does allow files up to 4G. Change the i_sizekientzle2006-12-081-1/+1
| | | | | | | | | | field to "unsigned long" so that it actually works. Thanks to Robert Sciuk for sending me a DVD that demonstrated ISO9660-formatted media with a file >2G. I've now fixed this both in libarchive and in the cd9660 filesystem. MFC after: 14 days
* Threading cleanup.. part 2 of several.julian2006-12-061-10/+3
| | | | | | | | | | | | | | | | | | | | | | Make part of John Birrell's KSE patch permanent.. Specifically, remove: Any reference of the ksegrp structure. This feature was never fully utilised and made things overly complicated. All code in the scheduler that tried to make threaded programs fair to unthreaded programs. Libpthread processes will already do this to some extent and libthr processes already disable it. Also: Since this makes such a big change to the scheduler(s), take the opportunity to rename some structures and elements that had to be moved anyhow. This makes the code a lot more readable. The ULE scheduler compiles again but I have no idea if it works. The 4bsd scheduler still reqires a little cleaning and some functions that now do ALMOST nothing will go away, but I thought I'd do that as a separate commit. Tested by David Xu, and Dan Eischen using libthr and libpthread.
* o Do not leave uninitialized birthtime: in MSDOSFSMNT_LONGNAMEmaxim2006-12-031-2/+4
| | | | | | | | | | | | set birthtime to FAT CTime (creation time) and in the other cases set birthtime to -1. o Set ctime to mtime instead of FAT CTime which has completely different meaning. PR: kern/106018 Submitted by: Oliver Fromme MFC after: 1 month
* Add missing includes for <sys/buf.h> and <sys/bio.h>.rodrigc2006-12-021-0/+2
|
* Many, many thanks to Masanori OZAWA <ozawa@ongs.co.jp>rodrigc2006-12-024-3040/+3216
| | | | | | | | | | | | | and Daichi GOTO <daichi@FreeBSD.org> for submitting this major rewrite of unionfs. This rewrite was done to try to solve many of the longstanding crashing and locking issues in the existing unionfs implementation. This implementation also adds a 'MASQUERADE mode', which allows the user to set different user, group, and file permission modes in the upper layer. Submitted by: daichi, Masanori OZAWA Reviewed by: rodrigc (modified for minor style issues)
* o From the submitter: dos2unixchr will convert to lower case ifmaxim2006-11-261-2/+4
| | | | | | | | | | | | | | | LCASE_BASE or LCASE_EXT or both are set. But dos2unixfn uses dos2unixchr separately for the basename and the extension. So if either LCASE_BASE or LCASE_EXT is set, dos2unixfn will convert both the basename and extension to lowercase because it is blindly passing in the state of both flags to dos2unixchr. The bit masks I used ensure that only the state of LCASE_BASE gets passed to dos2unixchr when the basename is converted, and only the state of LCASE_EXT is passed in when the extension is converted. PR: kern/86655 Submitted by: Micah Lieske MFC after: 3 weeks
* Fix an integer overflow and allow access to files larger than 4GB onle2006-11-203-19/+19
| | | | NTFS.
* Wake up PIOCWAIT handler on the process exit in addition to the stopkib2006-11-171-2/+2
| | | | | | | | | | | events. &p->p_stype is explicitely woken up on process exit for us. Now, truss /nonexistent exits with error instead of waiting until killed by signal. Reported by: Nikos Vassiliadis nvass at teledomenet gr Reviewed by: jhb MFC after: 1 week
* change vop_lock handling to allowing tracking of callers' file and line forkmacy2006-11-133-5/+5
| | | | | | acquisition of lockmgr locks Approved by: scottl (standing in for mentor rwatson)
* Sweep kernel replacing suser(9) calls with priv(9) calls, assigningrwatson2006-11-0610-63/+107
| | | | | | | | | | | | | specific privilege names to a broad range of privileges. These may require some future tweaking. Sponsored by: nCircle Network Security, Inc. Obtained from: TrustedBSD Project Discussed on: arch@ Reviewed (at least in part) by: mlaier, jmg, pjd, bde, ceri, Alex Lyashkov <umka at sevcity dot net>, Skip Ford <skip dot ford at verizon dot net>, Antoine Brodin <antoine dot brodin at laposte dot net>
* Create a bidirectional mapping of the DOS 'read only' attributebp2006-11-053-2/+20
| | | | | | | | to the 'w' flag. PR: kern/77958 Submitted by: ghozzy gmail com MFC after: 1 month
* Make KSE a kernel option, turned on by default in all GENERICjb2006-10-261-0/+10
| | | | | | | kernel configs except sun4v (which doesn't process signals properly with KSE). Reviewed by: davidxu@
* Ditch crummy fattime <--> timespec conversion functionsphk2006-10-241-149/+8
|
* Drop crummy fattime to timespec conversion routines.phk2006-10-241-163/+12
| | | | Leave a XXX here for anybody able to test.
* Replace slightly crummy fattime<->timespec conversion functions.phk2006-10-245-180/+16
|
* Complete break-out of sys/sys/mac.h into sys/security/mac/mac_framework.hrwatson2006-10-222-2/+4
| | | | | | | | | | | | | begun with a repo-copy of mac.h to mac_framework.h. sys/mac.h now contains the userspace and user<->kernel API and definitions, with all in-kernel interfaces moved to mac_framework.h, which is now included across most of the kernel instead. This change is the first step in a larger cleanup and sweep of MAC Framework interfaces in the kernel, and will not be MFC'd. Obtained from: TrustedBSD Project Sponsored by: SPARTA
* Fake the link count until we have no choice but to load data from thetrhodes2006-10-211-1/+1
| | | | | | | MFT. PR: 86965 Submitted by: Lowell Gilbert <lgfbsd@be-well.ilk.org>
* Update the access and modification times for dev while still holdingkib2006-10-201-2/+2
| | | | | | | thread reference on it. Reviewed by: tegge Approved by: pjd (mentor)
* Fix the race between devfs_fp_check and devfs_reclaim. Derefence thekib2006-10-201-5/+9
| | | | | | | | vnode' v_rdev and increment the dev threadcount , as well as clear it (in devfs_reclaim) under the dev_lock(). Reviewed by: tegge Approved by: pjd (mentor)
* Properly lock the vnode around vgone() calls.kib2006-10-184-25/+113
| | | | | | | | | | | Unlock the vnode in devfs_close() while calling into the driver d_close() routine. devfs_revoke() changes by: ups Reviewed and bugfixes by: tegge Tested by: mbr, Peter Holm Approved by: pjd (mentor) MFC after: 1 week
* Use utc_offset() where applicable, and hide the internals of itphk2006-10-022-10/+6
| | | | as static variables.
* First part of a little cleanup in the calendar/timezone/RTC handling.phk2006-10-022-1/+2
| | | | | | Move relevant variables to <sys/clock.h> and fix #includes as necessary. Use libkern's much more time- & spamce-efficient BCD routines.
* Fix our ioctl(2) implementation when the argument is "int". Newru2006-09-271-4/+27
| | | | | | | | | | | | | ioctls passing integer arguments should use the _IOWINT() macro. This fixes a lot of ioctl's not working on sparc64, most notable being keyboard/syscons ioctls. Full ABI compatibility is provided, with the bonus of fixing the handling of old ioctls on sparc64. Reviewed by: bde (with contributions) Tested by: emax, marius MFC after: 1 week
* Use mount interlock to protect all changes to mnt_flag and mnt_kern_flag.tegge2006-09-2612-3/+50
| | | | | This eliminates a race where MNT_UPDATE flag could be lost when nmount() raced against sync(), sync_fsync() or quotactl().
* Fix the bug in rev. 1.134. In devfs_allocv_drop_refs(), when not_found == 2kib2006-09-191-1/+1
| | | | | | | | | and drop_dm_lock is true, no unlocking shall be attempted. The lock is already dropped and memory is freed. Found with: Coverity Prevent(tm) CID: 1536 Approved by: pjd (mentor)
* Resolve the devfs deadlock caused by LOR between devfs_mount->dm_lock andkib2006-09-184-16/+113
| | | | | | | | | | | | | | | vnode lock in devfs_allocv. Do this by temporary dropping dm_lock around vnode locking. For safe operation, add hold counters for both devfs_mount and devfs_dirent, and DE_DOOMED flag for devfs_dirent. The facilities allow to continue after dropping of the dm_lock, by making sure that referenced memory does not disappear. Reviewed by: tegge Tested by: kris Approved by: kan (mentor) PR: kern/102335
* Put the osta.c license on osta.h. The license is the same.imp2006-09-121-0/+15
| | | | Approved by: scottl@
* while (0); -> while (0) in multi-line macrosimp2006-08-171-1/+1
|
* Introduce a field to struct vm_page for storing flags that arealc2006-08-092-2/+2
| | | | | | | | | | | | | | | | synchronized by the lock on the object containing the page. Transition PG_WANTED and PG_SWAPINPROG to use the new field, eliminating the need for holding the page queues lock when setting or clearing these flags. Rename PG_WANTED and PG_SWAPINPROG to VPO_WANTED and VPO_SWAPINPROG, respectively. Eliminate the assertion that the page queues lock is held in vm_page_io_finish(). Eliminate the acquisition and release of the page queues lock around calls to vm_page_io_finish() in kern_sendfile() and vfs_unbusy_pages().
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-08-041-1/+1
| | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
* When the volume is being downgraded from a read-write mode, markdelphij2006-08-031-0/+4
| | | | | | | | it as clean. PR: kern/85366 Submitted by: Dan Lukes <dan at obluda dot cz> MFC After: 2 weeks
* In udf_find_partmaps(), when we find a type 1 partition map, we have toyar2006-07-252-10/+13
| | | | | | | skip the actual type 1 length (6 bytes). With this change, it is now possible to correctly spot the VAT partition map in certain discs. Submitted by: Pedro Martelletto <pedro@ambientworks.net>
* Update comment.jhb2006-07-181-1/+1
|
* Lock the smb share before doing a 'put' on it in smbfs_unmount().jhb2006-07-171-0/+3
| | | | Tested by: "Jiawei Ye" <leafy7382 at gmail>
* Remove the NDEVFSINO and NDEVFSOVERFLOW options which no longer exists inphk2006-07-174-18/+0
| | | | | | DEVFS. Remove the opt_devfs.h file now that it is empty.
* Add vnode interlocking to devfs.ups2006-07-121-16/+33
| | | | | | | This prevents race conditions that can cause pagefaults or devfs to use arbitrary vnodes. MFC after: 1 week
* Add a kern_close() so that the ABIs can close a file descriptor w/o havingjhb2006-07-081-4/+2
| | | | to populate a close_args struct and change some of the places that do.
* Remove unneeded mac.h include.rwatson2006-07-061-1/+0
| | | | MFC after: 3 days
* Remove now unneeded opt_mac.h and mac.h includes.rwatson2006-07-061-2/+0
| | | | MFC after: 3 days
* Use #include "", not #include <> for opt_foo.h.rwatson2006-07-061-2/+2
| | | | MFC after: 3 days
* Correctly calculate a buffer length. It was off by one so a read() returnednetchild2006-06-271-1/+1
| | | | | | | | | | | | | one byte less than needed. This is a RELENG_x_y candidate, since it fixes a problem with Oracle 10. Noticed by: Dmitry Ganenko <dima@apk-inform.com> Testcase by: Dmitry Ganenko <dima@apk-inform.com> Reviewed by: des Submitted by: rdivacky Sponsored by: Google SoC 2006 MFC after: 1 week
* Fix a memory leak and a nested 'for' loop in the spare table handling.scottl2006-06-261-4/+6
| | | | Submitted by: Pedro Martelletto
* Upon further review, DES prefers this change over that in revision 1.13ghelmer2006-06-051-6/+4
| | | | | | | to resolve the directory access problem for processes with P_SUGID flag set. Suggested by: des
* mount_msdosfs.c:rodrigc2006-06-011-1/+1
| | | | | | | | | | | | | | - remove call to getmntopts(), and just pass -o options to nmount(). This removes some confusion as to what options msdosfs can parse, by pushing the responsibility of option parsing to the VFS and FS specific code in the kernel. msdosfs_vfsops.c: - add "force" and "sync" to msdosfs_opts. They used to be specified in mount_msdosfs.c, so move them here. It's not clear whethere these options should be placed into global_opts in vfs_mount.c or not. Motivated by: marcus
OpenPOWER on IntegriCloud