summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Remove redundant check for vp == dvp (done in VFS before calling).phk1997-05-171-10/+1
|
* 1. Added cast and parenthesis in block size calculaion inkato1997-05-072-78/+78
| | | | | | | union_statfs(). 2. staticized union vops. Submitted by: Doug Rabson <dfr@nlsystems.com>
* Hide the kernel-only stuff inside #ifdef KERNEL.joerg1997-05-071-5/+14
| | | | | | XXX should be #ifdef _KERNEL XXX^2 the !KERNEL part should probably be moved out into a publically visible header file anyway.
* Oops. The function cd9660_mountroot() is gone, but i've committed anjoerg1997-05-041-3/+1
| | | | even more bogus prototype for it in my previous commit.
* This mega-commit brings the following:joerg1997-05-042-19/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | . It makes cd9660 root f/s working again. . It makes CD9660 a new-style option. . It adds support to mount an ISO9660 multi-session CD-ROM as the root filesystem (the last session actually, but that's what is expected behaviour). Sigh. The CDIOREADTOCENTRYS did a copyout() of its own, and thus has been unusable for me for this work. Too bad it didn't simply stuff the max 100 entries into the struct ioc_read_toc_entry, but relied on a user supplied data buffer instead. :-( I now had to reinvent the wheel, and created a CDIOREADTOCENTRY ioctl command that can be used in a kernel context. While doing this, i noticed the following bogosities in existing CD-ROM drivers: wcd: This driver is likely to be totally bogus when someone tries two succeeding CDIOREADTOCENTRYS (or now CDIOREADTOCENTRY) commands with requesting MSF format, since it apparently operates on an internal table. scd: This driver apparently returns just a single TOC entry only for the CDIOREADTOCENTRYS command. I have only been able to test the CDIOREADTOCENTRY command with the cd(4) driver. I hereby request the respective maintainers of the other CD-ROM drivers to verify my code for their driver. When it comes to merging this CD-ROM multisession stuff into RELENG_2_2 i will only consider drivers where i've got a confirmation that it actually works.
* Fixed panic message in union_lock(): union_link --> union_lock.kato1997-05-031-2/+2
|
* Access correct union mount point in union_access. Old vnode is savedkato1997-05-021-2/+4
| | | | | | in savedvp variable and it is used for the argument of MOUNTTOUNIONMOUNT(). I didn't realize ap->a_vp is modified before MOUNTTOUNIONMOUNT(), so the change by revision 1.22 is incorrect.
* Remove the dependancy on DEV_BSIZE, now specfs works on != 512bytesos1997-05-011-3/+10
| | | | | sector devices given that the fs uses a blocksize of at least a physical sector size.
* For multi-session CD-ROMs, we have to account for previous sessions asjoerg1997-04-291-1/+10
| | | | well in volume_space_size. Otherwise, NFS exports won't work.
* Add support for ISO9660 multi-session CD-ROMs. This is just nothingjoerg1997-04-292-2/+5
| | | | | | | | | | but searching the directory on something else than the default location. NB: this comprises an interface change to the mount_cd9660(8) utility (commit will follow). You need to rebuild both. I've got similar patches for RELENG_2_2, should i commit them too?
* Revised fix for locking violation when unionfs calls vput withkato1997-04-291-32/+36
| | | | | | | | | | | | | | | | | UN_KLOCK flag. When UN_KLOCK is set, VOP_UNLOCK should keep uppervp locked and clear UN_ULOCK flag. To do this, when UN_KLOCK is set, (1) union_unlock clears UN_ULOCK and does not clear UN_KLOCK, (2) union_lock() does not access uppervp and does not clear UN_KLOCK, and (3) callers of vput/VOP_UNLOCK should clear UN_KLOCK. For example, vput becomes: SETKLOCK(union_node); vput(vnode); CLEARKLOCK(union_node); where SETKLOCK macro sets UN_KLOCK and CLEARKLOCK macro clears UN_KLOCK.
* Removed bogon from previous commit: doubly included sys/systm.h.alex1997-04-271-2/+1
|
* Prevent debugger attachment to init when securelevel > 0.alex1997-04-271-1/+6
| | | | Noticed by: Brian Buchanan <brian@wasteland.calbbs.com>
* Undo 1.29.kato1997-04-271-2/+2
|
* Do nothing instead of adjusting un_flags when (uppervp is locked) &&kato1997-04-261-11/+3
| | | | | (UN_ULOCK is not set) in union_lock. This condition may indicate race. DIAGNOSTIC kernel still panic here.
* Do not clear UN_ULOCK in certain case.kato1997-04-261-2/+12
| | | | | | | | | Our vput calls vm_object_deallocate() --> vm_object_terminate(). The vm_object_terminate() calls vn_lock(), since UN_LOCKED has been already cleared in union_unlock(). Then, union_lock locks upper vnode when UN_ULOCK is not set. The upper vnode is not unlocked when UN_KLOCK is set in union_unlock(), thus, union_lock tries to lock locked vnode and we get panic.
* Dirty change in union_lock(). Sometimes upper vnode is locked withoutkato1997-04-211-5/+23
| | | | | | | | UN_ULOCK flag. This shows a locking violation but I couldn't find the reason UN_ULOCK is not set or upper vnode is not unlocked. I added the code that detect this case and adjust un_flags. DIAGNOSTIC kernel doesn't adjust un_flags, but just panic here to help debug by kernel hackers.
* Replace VOP_LOCK with vn_lock.kato1997-04-211-2/+2
|
* Fix both a problem with accessing backing objects, and also releasedyson1997-04-201-1/+14
| | | | | | the process map on nonexistant pages. PR: kern/3327 Submitted by: Tor Egge <Tor.Egge@idi.ntnu.no>
* Avoid `lock against myself' panic by following operation:kato1997-04-192-6/+33
| | | | | | | | | | # mount -t union (or null) dir1 dir2 # mount -t union (or null) dir2 dir1 The function namei in union_mount calls union_root. The upper vnode has been already locked and vn_lock in union_root causes above panic. Add printf's included in `#ifdef DIAGNOSTIC' for EDEADLK cases.
* Fix `locking against myself' panic by multi nullfs mount of samekato1997-04-171-1/+25
| | | | directory pair.
* Use NULLVP instead of NULL.kato1997-04-173-11/+11
|
* Do not set the uppervp to NULLVP in union_removed_upper. If lowervpkato1997-04-161-1/+16
| | | | | | | | | | | | is NULLVP, union node will have neither uppervp nor lowervp. This causes page fault trap. The union_removed_upper just remove union node from cache and it doesn't set uppervp to NULLVP. Since union node is removed from cache, it will not be referenced. The code that remove union node from cache was copied from union_inactive.
* Undo previous commit to avoid panic, and fix order of argument ofkato1997-04-161-15/+2
| | | | | | | | | | | | | | | VOP_LINK(). The reason of strange behavior was wrong order of the argument, that is, the operation # ln foo bar in a union fs tried to do # ln bar foo in ufs layer. Now we can make a link in a union fs.
* Quick-hack to avoid `lock against myself' panic. It is not the realkato1997-04-151-2/+15
| | | | | | | | | | | | | | | | | | | | | | fix! The ufs_link() assumes that vnode is not unlocked and tries to lock it in certain case. Because union_link calls VOP_LINK after locking vnode, vn_lock in ufs_link causes above panic. Currently, I don't know the real fix for a locking violation in union_link, but I think it is important to avoid panic. A vnode is unlocked before calling VOP_LINK and is locked after it if the vnode is not union fs. Even though panic went away, the process that access the union fs in which link was made will hang-up. Hang-up can be easily reproduced by following operation: mount -t union a b cd b ln foo bar ls
* Removed more traces of ISODEVMAP.bde1997-04-151-20/+1
|
* Remove all traces of undocumented feature ISODEVMAP.phk1997-04-144-128/+4
|
* Fix `lockmgr: locking against myself' panic by multi union mount ofkato1997-04-141-1/+25
| | | | | | | | | | | | | same directory pair. If we do: mount -t union a b mount -t union a b then, (1) namei tries to lock fs which has been already locked by first union mount and (2) union_root() tries to lock locked fs. To avoid first deadlock condition, unlock vnode if lowerrootvp is union node, and to avoid second case, union_mount returns EDEADLK when multi union mount is detected.
* Fix locking violation when accessing `..'.kato1997-04-141-1/+39
| | | | Obtained from: NetBSD
* Access correct union mount point in union_access.kato1997-04-131-2/+2
|
* The function union_fsync tries to lock overlaying vnode object whenphk1997-04-131-3/+14
| | | | | | | | | | dolock is not set (that is, targetvp == overlaying vnode object). Current code use FIXUP macro to do this, and never unlocks overlaying vnode object in union_fsync. So, the vnode object will be locked twice and never unlocked. PR: 3271 Submitted by: kato
* The path name buffer, cn->cn_pnbuf, is FREEed by VOP_MKDIR whenphk1997-04-131-1/+5
| | | | | | | | | | relookup() in union_relookup() is succeeded. However, if relookup() returns non-zero value, that is relookup fails, VOP_MKDIR is never called (c.f. union_mkshadow). Thus, pathname buffer is never FREEed. Reviewed by: phk Submitted by: kato PR: 3262
* Though malloc allocates only cn.cn_namelen bytes for cn.cn_pnbuf inphk1997-04-131-2/+2
| | | | | | | | | union_vn_create(), following bcopy copies cn.cn_namlen + 1 bytes to cn.cn_pnbuf PR: 3255 Reviewed by: phk Submitted by: kato
* Get the declaration of `struct dirent' from <sys/dirent.h>, not frombde1997-04-101-8/+4
| | | | | | <sys/dir.h>, and use the new macro GENERIC_DIRSIZ() instead of DIRSIZ(). Removed unused #includes.
* Get the declaration of `struct dirent' from <sys/dirent.h>, not frombde1997-04-101-5/+4
| | | | | | | | | <sys/dir.h>. Removed unused #include. Fixed type and order of struct members in pseudo-declaration of `struct vop_readdir_args'.
* Removed unused or apparently-unused #includes, especially of thebde1997-04-101-14/+1
| | | | deprecated header <sys/dir.h>.
* Fix the gdb executable modify problem. Thanks to the detective workdyson1997-04-061-80/+47
| | | | | | | | | | | | by Alan Cox <alc@cs.rice.edu>, and his description of the problem. The bug was primarily in procfs_mem, but the mistake likely happened due to the lack of vm system support for the operation. I added better support for selective marking of page dirty flags so that vm_map_pageable(wiring) will not cause this problem again. The code in procfs_mem is now less bogus (but maybe still a little so.)
* Don't include <sys/ioctl.h> in the kernel. Stage 3: includebde1997-03-241-2/+2
| | | | <sys/filio.h> instead of <sys/ioctl.h> in non-network non-tty files.
* Don't include <sys/ioctl.h> in the kernel. Stage 1: don't includebde1997-03-246-12/+6
| | | | | it when it is not used. In most cases, the reasons for including it went away when the special ioctl headers became self-sufficient.
* Don't #include <sys/fcntl.h> in <sys/file.h> if KERNEL is defined.bde1997-03-236-10/+12
| | | | | Fixed everything that depended on getting fcntl.h stuff from the wrong place. Most things don't depend on file.h stuff at all.
* Restore the lost MNT_LOCAL flag twiddle. Lite2 has a different mechanismpeter1997-03-181-1/+3
| | | | | | | | | | | of setting it (compiled into vfs_conf.c), but we have a dynamic system in place. This could probably be better done via a runtime configure flag in the VFS_SET() VFS declaration, perhaps VFCF_LOCAL, and have the VFS code propagate this down into MNT_LOCAL at mount time. The other FS's would need to be updated, havinf UFS and MSDOSFS filesystems without MNT_LOCAL breaks a few things.. the man page rebuild scans for local filesystems and currently fails, I suspect that other tools like find and tar with their "local filesystem only" modes might be affected.
* Use the common nchstats struct instead of a private one for ncs_2passesbde1997-03-081-5/+3
| | | | | and ncs_pass2. The public one is already used for other cd9660 statistics and the private one was effectively invisible.
* Fixed missing initialisation of vp->v_type for types Pfile and Pmembde1997-03-081-1/+2
| | | | | | | in procfs_allocvp(). This fixes at least stat() of /proc/*/mem. stat() of /proc/*/file already worked. I think procfs_allocvp() isn't actually called for type Pfile.
* Don't export kernel interfaces to applications. msdosfs_mount probablybde1997-03-031-1/+9
| | | | | | didn't compile before this change. Added idempotency ifdef.
* Updated msdosfs to use Lite2 vfs configuration and Lite2 locking. Itbde1997-02-265-130/+129
| | | | should now work as (un)well as before the Lite2 merge.
* Fixed procfs's locking vops. They were missed in the Lite2 merge,bde1997-02-241-5/+5
| | | | | | | | | partly because the #define's for them were moved to a different file. At least the null VOP_LOCK() no longer works, since vclean() expects VOP_LOCK( ..., LK_DRAIN | LK_INTERLOCK, ...) to clear the interlock. This probably only matters when simple_lock() is not null, i.e., when there are multiple CPUs or SIMPLELOCK_DEBUG is defined.
* Back out part 1 of the MCFH that changed $Id$ to $FreeBSD$. We are notpeter1997-02-2258-59/+59
| | | | ready for it yet.
* Killed more FIFO ifdefs. All gone now.bde1997-02-132-7/+0
|
* Removed bogus B_AGE policy again (see rev 1.4).bde1997-02-131-5/+0
| | | | | Removed FIFO ifdef again (see rev.1.8). This also fixes vfs initialization since the VNODEOP_SET() was inside the ifdef.
* Eliminate the last of the compile warnings in this module bympp1997-02-121-7/+7
| | | | correctly casting the arguments to all of the null_bypass() calls.
OpenPOWER on IntegriCloud