summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Add back securelevel check for disks.phk2004-11-041-0/+12
| | | | | | XXX: This should live in geom_dev.c but we don't have access to the cred there. XXX: XXX: This may not matter anymore since filesystems use geom_vfs.
* s/ffs/ntfs/phk2004-11-041-2/+6
| | | | | | Fix error handling to not use VOP_CLOSE() on the disk. Spotted by: tegge
* Make a more whole-hearted attempt at GEOM'ifying NTFS.phk2004-11-033-9/+21
| | | | | | I must have been sleepy when I did the first pass. Spotted by: tegge
* Don't give disks special treatment, they don't come this way anymore.phk2004-10-291-37/+0
|
* Remove VOP_SPECSTRATEGY() from the system.phk2004-10-291-57/+0
|
* Move NTFS to GEOM backing instead of DEVFS.phk2004-10-291-30/+1
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Move HPFS to GEOM backing instead of DEVFS.phk2004-10-293-33/+26
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Move CD9660 to GEOM backing instead of DEVFS.phk2004-10-296-36/+37
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Move UDF to GEOM backing instead of DEVFS.phk2004-10-293-25/+28
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Move MSDOSFS to GEOM backing instead of DEVFS.phk2004-10-294-52/+47
| | | | For details, please see src/sys/ufs/ffs/ffs_vfsops.c 1.250.
* Give dev_strategy() an explict cdev argument in preparation for removingphk2004-10-291-1/+1
| | | | | | | | | | | buf->b-dev. Put a bio between the buf passed to dev_strategy() and the device driver strategy routine in order to not clobber fields in the buf. Assert copyright on vfs_bio.c and update copyright message to canonical text. There is no legal difference between John Dysons two-clause abbreviated BSD license and the canonical text.
* Reduce the locking activity by epsilon by checking VNON condition beforephk2004-10-281-4/+3
| | | | releasing the mountlock.
* What can I say: don't allow people to mount DEVFS with option "nodev".phk2004-10-282-8/+2
|
* Eliminate unnecessary KASSERTs.phk2004-10-276-18/+6
| | | | Don't use bp->b_vp in VOP_STRATEGY: the vnode is passed in as an argument.
* Put the I/O block size in bufobj->bo_bsize.phk2004-10-261-1/+1
| | | | | | | We keep si_bsize_phys around for now as that is the simplest way to pull the number out of disk device drivers in devfs_open(). The correct solution would be to do an ioctl(DIOCGSECTORSIZE), but the point is probably mooth when filesystems sit on GEOM, so don't bother for now.
* Loose the v_dirty* and v_clean* alias macros.phk2004-10-251-4/+5
| | | | | Check the count field where we just want to know the full/empty state, rather than using TAILQ_EMPTY() or TAILQ_FIRST().
* Alas, poor SPECFS! -- I knew him, Horatio; A filesystem of infinitephk2004-10-222-624/+551
| | | | | | | | | | | jest, of most excellent fancy: he hath taught me lessons a thousand times; and now, how abhorred in my imagination it is! my gorge rises at it. Here were those hacks that I have curs'd I know not how oft. Where be your kludges now? your workarounds? your layering violations, that were wont to set the table on a roar? Move the skeleton of specfs into devfs where it now belongs and bury the rest.
* Rework how we store process times in the kernel such that we always storejhb2004-10-051-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the raw values including for child process statistics and only compute the system and user timevals on demand. - Fix the various kern_wait() syscall wrappers to only pass in a rusage pointer if they are going to use the result. - Add a kern_getrusage() function for the ABI syscalls to use so that they don't have to play stackgap games to call getrusage(). - Fix the svr4_sys_times() syscall to just call calcru() to calculate the times it needs rather than calling getrusage() twice with associated stackgap, etc. - Add a new rusage_ext structure to store raw time stats such as tick counts for user, system, and interrupt time as well as a bintime of the total runtime. A new p_rux field in struct proc replaces the same inline fields from struct proc (i.e. p_[isu]ticks, p_[isu]u, and p_runtime). A new p_crux field in struct proc contains the "raw" child time usage statistics. ruadd() has been changed to handle adding the associated rusage_ext structures as well as the values in rusage. Effectively, the values in rusage_ext replace the ru_utime and ru_stime values in struct rusage. These two fields in struct rusage are no longer used in the kernel. - calcru() has been split into a static worker function calcru1() that calculates appropriate timevals for user and system time as well as updating the rux_[isu]u fields of a passed in rusage_ext structure. calcru() uses a copy of the process' p_rux structure to compute the timevals after updating the runtime appropriately if any of the threads in that process are currently executing. It also now only locks sched_lock internally while doing the rux_runtime fixup. calcru() now only requires the caller to hold the proc lock and calcru1() only requires the proc lock internally. calcru() also no longer allows callers to ask for an interrupt timeval since none of them actually did. - calcru() now correctly handles threads executing on other CPUs. - A new calccru() function computes the child system and user timevals by calling calcru1() on p_crux. Note that this means that any code that wants child times must now call this function rather than reading from p_cru directly. This function also requires the proc lock. - This finishes the locking for rusage and friends so some of the Giant locks in exit1() and kern_wait() are now gone. - The locking in ttyinfo() has been tweaked so that a shared lock of the proctree lock is used to protect the process group rather than the process group lock. By holding this lock until the end of the function we now ensure that the process/thread that we pick to dump info about will no longer vanish while we are trying to output its info to the console. Submitted by: bde (mostly) MFC after: 1 month
* Minor Bug fix. Some file was not translated.takawata2004-10-051-2/+2
|
* Fix unionfs problems when a directory is mounted on other directorytakawata2004-10-053-1/+11
| | | | | | | | with different file systems. This may cause ill things with my previous fix. Now it translate fsid of direct child of mount point directory only. Pointed out by: Uwe Doering
* Fix a problem when you try to mount a directory on another directorytakawata2004-10-021-0/+2
| | | | | | | | belongs to the same filesystem. In this problem, getcwd(3) will fail. I found the problem two years ago and I have forgotten to merge. http://docs.FreeBSD.org/cgi/mid.cgi?200202251435.XAA91094
* Don't PHOLD() the target process in procfs, since this is already donedas2004-10-013-6/+3
| | | | | in pseudofs. Moreover, PHOLD() may block between the p_candebug() access check and the actual operation.
* XXX mark two places where we do not hold a threadcount on the dev whenphk2004-09-241-0/+2
| | | | | | | | frobbing the cdevsw. In both cases we examine only the cdevsw and it is a good question if we weren't better off copying those properties into the cdev in the first place. This question will be revisited.
* Hold proper thread count while frobbing drivers ioctl.phk2004-09-241-6/+13
|
* Remove devsw() call missed in last commit.phk2004-09-241-1/+0
|
* Use def_re[fl]thread().phk2004-09-241-95/+46
| | | | Retire various old compatibility helpers.
* Eliminate DEV_STRATEGY() macro: call dev_strategy() directly.phk2004-09-231-18/+2
| | | | Make dev_strategy() handle errors and departing devices properly.
* Do not use devsw() but si_devsw direction. This is still bogus but aphk2004-09-231-1/+1
| | | | fair bit less so.
* Do not refcount the cdevsw, but rather maintain a cdev->si_threadcountphk2004-09-231-18/+42
| | | | | | | | | | of the number of threads which are inside whatever is behind the cdevsw for this particular cdev. Make the device mutex visible through dev_lock() and dev_unlock(). We may want finer granularity later. Replace spechash_mtx use with dev_lock()/dev_unlock().
* Pointy hat please!phk2004-09-221-3/+3
| | | | Refuse VCHR not VREG.
* De support opening device nodes on CD9660 filesystems. They arephk2004-09-212-21/+9
| | | | | still visible, they can still be seen, but they cannot be opened. Use DEVFS for that.
* The getpages VOP was a good stab at getting scatter/gather I/O withoutphk2004-09-191-181/+0
| | | | | | | | | | | | | | | too much kernel copying, but it is not the right way to do it, and it is in the way for straightening out the buffer cache. The right way is to pass the VM page array down through the struct bio to the disk device driver and DMA directly in to/out off the physical memory. Once the VM/buf thing is sorted out it is next on the list. Retire most of vnode method. ffs_getpages(). It is not clear if what is left shouldn't be in the default implementation which we now fall back to. Retire specfs_getpages() as well, as it has no users now.
* Remove unused B_WRITEINPROG flagphk2004-09-152-4/+0
|
* Remove the buffercache/vnode side of BIO_DELETE processing inphk2004-09-131-33/+2
| | | | | | | preparation for integration of p4::phk_bufwork. In the future, local filesystems will talk to GEOM directly and they will consequently be able to issue BIO_DELETE directly. Since the removal of the fla driver, BIO_DELETE has effectively been a no-op anyway.
* Reduce the size of struct defid's defid_dirclust, defid_dirofs andtjr2004-09-081-3/+3
| | | | | | | | | (disabled) defid_gen members from u_long to u_int32_t so that alignment requirements don't cause the structure to become larger than struct fid on LP64 platforms. This fixes NFS exports of msdos filesystems on at least amd64. PR: 71173
* Merge from NetBSD:tjr2004-09-081-3/+18
| | | | | | | | | | | | | | Fix a problem in previous: we can't blindly assume that we have wincnt entries available at the offset the file has been found. If the dos directory entry is not preceded by appropriate number of long name entries (happens e.g. when the filesystem is corrupted, or when the filename complies to DOS rules and doesn't use any long name entry), we would overwrite random directory entries. There are still some problems, the whole thing has to be revisited and solved right. Submitted by: Xin LI
* Merge from NetBSD:tjr2004-09-081-0/+5
| | | | | | | | | | Fix a panic that occurred when trying to traverse a corrupt msdosfs filesystem. With this particular corruption, the code in pcbmap() would compute an offset into an array that was way out of bounds, so check the bounds before trying to access and return an error if the offset would be out of bounds. Submitted by: Xin LI
* Create simple function init_va_filerev() for initializing a va_filerevphk2004-09-071-21/+2
| | | | | | | | | field. Replace three instances of longhaired initialization va_filerev fields. Added XXX comment wondering why we don't use random bits instead of uptime of the system for this purpose.
* Explicitly pass vnode to smbfs_doio() function.phk2004-09-073-6/+3
|
* Explicitly pass the vnode to the nw_doio() function.phk2004-09-073-7/+4
|
* Temporarily back out revision 1.77. This changed cd9660_getattr() andtjr2004-09-051-14/+6
| | | | | | | | | | | | | | | cd9660_readdir() to return the address of the file's first data block as the inode number instead of the address of the directory entry, but neglected to update cd9660_vget_internal() for the new inode numbering scheme. Since the NFS server calls VFS_VGET (cd9660_vget()) with inode numbers returned through VOP_READDIR (cd9660_readdir()) when servicing a READDIRPLUS request, these two interfaces must agree on the numbering scheme; failure to do so caused panics and/or bogus information about the entries to be returned to clients using READDIRPLUS (Solaris, FreeBSD w/ mount -o rdirplus). PR: 63446
* Back out pseudo_vnops.c:1.45, which was a workaround for pfind()rwatson2004-09-021-11/+0
| | | | | | returning incompletely initialized processes. This problem was eliminated by kern_proc.c:1.215, which causes pfind() not to return processes in the PRS_NEW state.
* General modernization of coda:brooks2004-09-014-93/+54
| | | | | | | | - Ditch NVCODA - Don't use a static major - Don't declare functions extern Reviewed by: peter
* Kill count device support from config. I've changed the last fewpeter2004-08-303-3/+3
| | | | | | | | | | | | | | | | | remaining consumers to have the count passed as an option. This is i4b, pc98/wdc, and coda. Bump configvers.h from 500013 to 600000. Remove heuristics that tried to parse "device ed5" as 5 units of the ed device. This broke things like the snd_emu10k1 device, which required quotes to make it parse right. The no-longer-needed quotes have been removed from NOTES, GENERIC etc. eg, I've removed the quotes from: device snd_maestro device "snd_maestro3" device snd_mss I believe everything will still compile and work after this.
* Remove bogus vrele() call added in previous.tjr2004-08-271-2/+0
|
* Improve the robustness of MSDOSFSMNT_KICONV handling:tjr2004-08-261-12/+39
| | | | | | | | | - Use copyinstr() to read cs_win, cs_dos, cs_local strings from the mount argument structure instead of reading through user-space pointers(!). - When mounting a filesystem, or updating an existing mount, only try to update the iconv handles from the information in the mount argument structure if the structure itself has the MSDOSFSMNT_KICONV flag set. - Attempt to handle failure of update_mp() in the MNT_UPDATE case.
* Release the vnode cache mutex when calling vgone(), since vgone() maydes2004-08-151-26/+39
| | | | | sleep. This makes pfs_exit() even less efficient than before, but on the bright side, the vnode cache mutex no longer needs to be recursive.
* Add locking to the kqueue subsystem. This also makes the kqueue subsystemjmg2004-08-151-5/+5
| | | | | | | | | | | | | a more complete subsystem, and removes the knowlege of how things are implemented from the drivers. Include locking around filter ops, so a module like aio will know when not to be unloaded if there are outstanding knotes using it's filter ops. Currently, it uses the MTX_DUPOK even though it is not always safe to aquire duplicate locks. Witness currently doesn't support the ability to discover if a dup lock is ok (in some cases). Reviewed by: green, rwatson (both earlier versions)
* Commit a work-around for a more general bug involving process state:rwatson2004-08-131-0/+11
| | | | | | | | | | | | | check whether p_ucred is NULL or not in pfs_getattr() before dereferencing the credential, and return ENOENT if there wasn't one. This is a symptom of a larger problem, wherein pfind() can return references to incompletely initialized processes, and we instead ought to not return them, or check the process state before acting on the process. Reported by: kris Discussed with: tjr, others
* use bufdone() not biodone().phk2004-08-081-3/+3
|
OpenPOWER on IntegriCloud