summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* Regrab dvp only when ISDOTDOT.tanimura2005-07-091-1/+2
| | | | Approved by: re (scottl)
* - Since we don't hold a usecount in pfs_exit we have to get a holdcntjeff2005-07-071-0/+4
| | | | | | | prior to calling vgone() to prevent any races. Sponsored by: Isilon Systems, Inc. Approved by: re (vfs blanket)
* Jumbo-commit to enhance 32 bit application support on 64 bit kernels.peter2005-06-305-10/+199
| | | | | | | | | | | | | | | | | | | | | | | | This is good enough to be able to run a RELENG_4 gdb binary against a RELENG_4 application, along with various other tools (eg: 4.x gcore). We use this at work. ia32_reg.[ch]: handle the 32 bit register file format, used by ptrace, procfs and core dumps. procfs_*regs.c: vary the format of proc/XXX/*regs depending on the client and target application. procfs_map.c: Don't print a 64 bit value to 32 bit consumers, or their sscanf fails. They expect an unsigned long. imgact_elf.c: produce a valid 32 bit coredump for 32 bit apps. sys_process.c: handle 32 bit consumers debugging 32 bit targets. Note that 64 bit consumers can still debug 32 bit targets. IA64 has got stubs for ia32_reg.c. Known limitations: a 5.x/6.x gdb uses get/setcontext(), which isn't implemented in the 32/64 wrapper yet. We also make a tiny patch to gdb pacify it over conflicting formats of ld-elf.so.1. Approved by: re
* Conditionally weaken sys_generic.c rev 1.136 to allow certain dubiouspeter2005-06-301-0/+14
| | | | | | | | | | | | | ioctl numbers in backwards compatability mode. eg: an IOC_IN ioctl with a size of zero. Traditionally this was what you did before IOC_VOID existed, and we had some established users of this in the tree, namely procfs. Certain 3rd party drivers with binary userland components also have this too. This is necessary to have 4.x and 5.x binaries use these ioctl's. We found this at work when trying to run 4.x binaries. Approved by: re
* Avoid casting from (int *) to (size_t *) in order to fix udf_iconv on amd64.imura2005-06-051-4/+5
| | | | | Reviewed by: scottl MFC after: 2 weeks
* Do not declare a struct as extern, and then implementrodrigc2005-05-311-59/+57
| | | | | | | | it as static in the same file. This is not legal C, and GCC 4.0 will issue an error. Reviewed by: phk Approved by: das (mentor)
* Fix three typos in comments. Two of them obtained from OpenBSD.brueffer2005-05-111-3/+3
| | | | MFC after: 3 days
* Do not dereference dvp pointer before doing a NULL check.kan2005-05-111-1/+2
| | | | Noticed by: Coverity Prevent analysis tool.
* Staticize a symbol used only in this file.anholt2005-05-061-1/+1
| | | | | PR: kern/43613 Submitted by: Matt Emmerton, matt at gsicomp dot on dot ca
* The printf(9) `%p' conversion specifier puts an "0x" inrobert2005-05-061-2/+2
| | | | | front of the pointer value. Therefore, remove the "0x" from the format string.
* Fix our NTFS readdir function.robert2005-05-061-3/+3
| | | | | | | | | | | | | | | | | | | | | To check a directory's in-use bitmap bit by bit, we use a pointer to an 8 bit wide unsigned value. The index used to dereference this pointer is calculated by shifting the bit index right 3 bits. Then we do a logical AND with the bit# represented by the lower 3 bits of the bit index. This is an idiomatic way of iterating through a bit map with simple bitwise operations. This commit fixes the bug that we only checked bits 3:0 of each 8 bit chunk, because we only used bits 1:0 of the bit index for the bit# in the current 8 bit value. This resulted in files not being returned by getdirentries(2). Change the type of the bit map pointer from `char *' to `u_int8_t *'.
* Fix breakage on alpha.takawata2005-05-051-2/+2
| | | | Pointed out by: hrs via IRC
* Make smbfs capable to use 16bit char set in filenames.takawata2005-05-043-11/+31
| | | | PR:78110
* - Set the v_object pointer after a successful VOP_OPEN(). This isn't ajeff2005-05-031-1/+2
| | | | | | | perfect solution as the lower vm object can change at unpredictable times if our lower vp happens to be on another unionfs, etc. Submitted by: Oleg Sharoiko <os@rsu.ru>
* - In devfs_open() and devfs_close() grab Giant if the driver sets NEEDGIANT.jeff2005-05-011-5/+12
| | | | | We still have to DROP_GIANT and PICKUP_GIANT when NEEDGIANT is not set because vfs is still sometime entered with Giant held.
* Fix an old pasto.des2005-04-301-1/+1
|
* - Mark devfs as MNTK_MPSAFE as I belive it does not require Giant.jeff2005-04-301-0/+1
| | | | | Sponsored by: Isilon Systems, Inc. Agreed in principle by: phk
* - Fix several locking problems in unionfs_mount so that it will comejeff2005-04-271-23/+7
| | | | closer to passing DEBUG_VFS_LOCKS.
* - Pass the ISOPEN flag down to our lower filesystems.jeff2005-04-271-2/+1
| | | | - Remove an erroneous VOP lock assert.
* - As this is presently the one and only place where duplicate acquires ofjeff2005-04-221-1/+1
| | | | | | | the vnode interlock are allowed mark it by passing MTX_DUPOK to this lock operation only. Sponsored by: Isilon Systems, Inc.
* Disable negative name caching for msdosfs to work around a bug.das2005-04-161-0/+7
| | | | | | | | | | | | Since the name cache is case-sensitive and msdosfs isn't, creating a file 'foo' won't invalidate a negative entry for 'FOO'. There are similar problems related to 8.3 filenames. A better solution is to override VOP_LOOKUP with a method that canonicalizes the name, then calls vfs_cache_lookup(). Unfortunately, it's not quite that simple because vfs_cache_lookup() will call msdosfs_lookup() on a cache miss, and msdosfs_lookup() needs a way to get at the original component name.
* Fix mbnambuf support for multi-byte characters. If a substring is largernjl2005-04-161-19/+29
| | | | | | | | | | | than WIN_CHARS bytes, we shift the suffix (previous substrings) upwards by the amount this substring exceeds its WIN_CHARS slot. Profiling shows this change is indistinguishable from the previous code at 95% confidence. This bug would result in attempts to access or create files or directories with multi-byte characters returning an error but no data loss. Reported and tested by: avatar MFC after: 3 days
* Correct typo.brueffer2005-04-141-1/+1
| | | | Obtained from: OpenBSD
* - Change all filesystems and vfs_cache to relock the dvp once the child isjeff2005-04-1310-39/+17
| | | | | | locked in the ISDOTDOT case. Se vfs_lookup.c r1.79 for details. Sponsored by: Isilon Systems, Inc.
* - Clear VI_OWEINACT before calling vget() with no lock type. We knowjeff2005-04-111-0/+7
| | | | | the node is actually already locked, and VOP_INACTIVE is not desirable in this case.
* - Honor the flags argument passed to null_root(). The filesystem belowjeff2005-04-111-1/+1
| | | | us will decide whether or not to grab a real shared lock.
* Initialize vp before using it. Failing to do this can cause instantdelphij2005-04-101-0/+1
| | | | | | panic when trying to access a file on mounted smbfs. Submitted by: takawata at jp freebsd org
* Give msdosfs a unique inode number which is really the byteoffset ofphk2005-04-072-9/+26
| | | | | | | | the directory entry. This solves the corruption problem I belive. Regression test script by: silby
* - Fix union's assumptions about when the dvp is unlocked. It is onlyjeff2005-04-041-3/+3
| | | | unlocked in the ISDOTDOT case now, not for all !ISLASTCN lookups.
* Explicitly hold a reference to the cdev we have just cloned. Thisphk2005-03-312-0/+2
| | | | | closes the race where the cdev was reclaimed before it ever made it back to devfs lookup.
* cdev (still) needs per instance uid/gid/modephk2005-03-311-3/+3
| | | | | | Add unlocked version of dev_ref() Clean up various stuff in sys/conf.h
* Rename dev_ref() to dev_refl()phk2005-03-311-1/+1
|
* - LK_NOPAUSE is a nop now.jeff2005-03-311-1/+1
| | | | Sponsored by: Isilon Systems, Inc.
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cjeff2005-03-292-8/+6
| | | | | prevents any callers from doing a modifying op without LOCKPARENT or WANTPARENT.
* - Remove wantparent, it is no longer necessary. An assert in vfs_lookup.cjeff2005-03-291-7/+1
| | | | | prevents any callers from doing a DELETE or RENAME without locking the parent.
* - cache_lookup() now locks the new vnode for us to prevent some races.jeff2005-03-291-57/+37
| | | | | | Remove redundant code. Sponsored by: Isilon Systems, Inc.
* - Correct the dprintf format int the _lookup routine.jeff2005-03-282-2/+2
| | | | Spotted by: pjd
* - Garbage collect an unused variable.jeff2005-03-282-9/+2
|
* - Don't panic if we can't lock a child in lookup, return an error instead.jeff2005-03-281-5/+4
| | | | | | | | - Only unlock the directory if this is a DOTDOT lookup. Previously this code could have deadlocked if there was a DOTDOT lookup with LOCKPARENT set and another thread was locking the other way up the tree. Sponsored by: Isilon Systems, Inc.
* - Remove unnecessary LOCKPARENT manipulation.jeff2005-03-281-20/+0
| | | | Sponsored by: Isilon Systems, Inc.
* - nwfs_lookup() is no longer responsible for unlocking the dvp, this isjeff2005-03-281-26/+10
| | | | | | | handled in vfs_lookup.c. This code was missing PDIRUNLOCK use prior to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c. Sponsored by: Isilon Systems, Inc.
* - hpfs_lookup() is no longer responsible for unlocking the dvp, this isjeff2005-03-281-11/+6
| | | | | | | handled in vfs_lookup.c. This code was missing PDIRUNLOCK use prior to the removal of PDIRUNLOCK in rev 1.73 of vfs_lookup.c. Sponsored by: Isilon Systems, Inc.
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-286-113/+16
| | | | Sponsored by: Isilon Systems, Inc.
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-281-7/+5
| | | | | | | | - In the ISDOTDOT case we have to unlock the dvp before locking the child, if this fails we must relock dvp before returning an error. This was missing before. Sponsored by: Isilon Systems, Inc.
* - We no longer have to bother with PDIRUNLOCK, lookup() handles it for us.jeff2005-03-281-54/+21
| | | | | | | | | | | - Network filesystems are written with a special idiom that checks the cache first, and may even unlock dvp before discovering that a network round-trip is required to resolve the name. I believe dvp is prevented from being recycled even in the forced unmount case by the shared lock on the mount point. If not, this code should grow checks for VI_DOOMED after it relocks dvp or it will access NULL v_data fields. Sponsored by: Isilon Systems, Inc.
* - Pass LK_EXCLUSIVE as the lock type to vget in vfs_hash_insert().jeff2005-03-251-1/+2
|
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-242-2/+4
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* - Update vfs_root implementations to match the new prototype. None ofjeff2005-03-2415-19/+29
| | | | | | | | these filesystems will support shared locks until they are explicitly modified to do so. Careful review must be done to ensure that this is safe for each individual filesystem. Sponsored by: Isilon Systems, Inc.
* Use subr_unitphk2005-03-194-146/+10
|
* Also remember to set the fsid here.phk2005-03-171-0/+1
|
OpenPOWER on IntegriCloud