summaryrefslogtreecommitdiffstats
path: root/sys/fs
Commit message (Collapse)AuthorAgeFilesLines
* NULL-terminate the . and .. directory entries. Apparently some tools ignorescottl2005-01-141-0/+2
| | | | | | d_namlen and assume that d_name is null-terminated. Submitted by: Andriy Gapon
* Replace the min() macro with a test that doesn't truncate the 64-bit valuesscottl2005-01-141-1/+4
| | | | that are used. Thanks to Bruce Evans for pointing this out.
* Eliminate unused and constant arguments to smbfs_vinvalbuf()phk2005-01-144-26/+13
|
* Eliminate constant and unused arguments to nwfs_vinvalbuf()phk2005-01-144-25/+14
|
* Eliminate unused and unnecessary "cred" argument from vinvalbuf()phk2005-01-144-6/+6
|
* Whitespace in vop_vector{} initializations.phk2005-01-1314-54/+63
|
* Ditch vfs_object_create() and make the callers call VOP_CREATEVOBJECT()phk2005-01-134-15/+14
| | | | directly.
* Change the generated VOP_ macro implementations to improve type checkingphk2005-01-134-25/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and KASSERT coverage. After this check there is only one "nasty" cast in this code but there is a KASSERT to protect against the wrong argument structure behind that cast. Un-inlining the meat of VOP_FOO() saves 35kB of text segment on a typical kernel with no change in performance. We also now run the checking and tracing on VOP's which have been layered by nullfs, umapfs, deadfs or unionfs. Add new (non-inline) VOP_FOO_AP() functions which take a "struct foo_args" argument and does everything the VOP_FOO() macros used to do with checks and debugging code. Add KASSERT to VOP_FOO_AP() check for argument type being correct. Slim down VOP_FOO() inline functions to just stuff arguments into the struct foo_args and call VOP_FOO_AP(). Put function pointer to VOP_FOO_AP() into vop_foo_desc structure and make VCALL() use it instead of the current offsetoff() hack. Retire vcall() which implemented the offsetoff() Make deadfs and unionfs use VOP_FOO_AP() calls instead of VCALL(), we know which specific call we want already. Remove unneeded arguments to VCALL() in nullfs and umapfs bypass functions. Remove unused vdesc_offset and VOFFSET(). Generally improve style/readability of the generated code.
* Use off_t when passing and calculating file offsets. While a singlescottl2005-01-121-6/+11
| | | | | | | extent in UDF is only 32 bits, multiple extents can exist in a file. Also clean up some minor whitespace problems. Submitted by: John Wehle
* Don't allow reads past the end of a file.scottl2005-01-121-1/+1
| | | | | Submitted by: John Wehle, Andriy Gapon MFC After: 3 days
* Silently ignore forced argument to unmount.phk2005-01-111-2/+0
|
* Wrap the bufobj operations in macros: BO_STRATEGY() and BO_WRITE()phk2005-01-114-4/+4
|
* Remove the unused credential argument from VOP_FSYNC() and VFS_SYNC().phk2005-01-117-18/+12
| | | | | | | | | | | | | | | | | | I'm not sure why a credential was added to these in the first place, it is not used anywhere and it doesn't make much sense: The credentials for syncing a file (ability to write to the file) should be checked at the system call level. Credentials for syncing one or more filesystems ("none") should be checked at the system call level as well. If the filesystem implementation needs a particular credential to carry out the syncing it would logically have to the cached mount credential, or a credential cached along with any delayed write data. Discussed with: rwatson
* whitespacephk2005-01-101-1/+1
|
* Annotate that pfs_exit() always acquires and releases two mutexes forrwatson2005-01-081-0/+4
| | | | | every process exist, even if procfs isn't mounted. And one of those mutexes is Giant. No immediate thoughts on fixing this.
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-061-1/+1
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-0667-68/+70
|
* Start each of the license/copyright comments with /*-imp2005-01-0519-27/+27
|
* Unsupport forceful unmounts of DEVFS.phk2005-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After disscussing things I have decided to take the easy and consistent 90% solution instead of aiming for the very involved 99% solution. If we allow forceful unmounts of DEVFS we need to decide how to handle the devices which are in use through this filesystem at the time. We cannot just readopt the open devices in the main /dev instance since that would open us to security issues. For the majority of the devices, this is relatively straightforward as we can just pretend they got revoke(2)'ed. Some devices get tricky: /dev/console and /dev/tty for instance does a sort of recursive open of the real console device. Other devices may be mmap'ed (kill the processes ?). And then there are disk devices which are mounted. The correct thing here would be to recursively unmount the filesystems mounte from devices from our DEVFS instance (forcefully) and if this succeeds, complete the forcefully unmount of DEVFS. But if one of the forceful unmounts fail we cannot complete the forceful unmount of DEVFS, but we are likely to already have severed a lot of stuff in the process of trying. Event attempting this would be a lot of code for a very far out corner-case which most people would never see or get in touch with. It's just not worth it.
* Be consistent about flag values passed to device drivers read/writephk2004-12-221-11/+4
| | | | | | | | | | | methods: Read can see O_NONBLOCK and O_DIRECT. Write can see O_NONBLOCK, O_DIRECT and O_FSYNC. In addition O_DIRECT is shadowed as IO_DIRECT for now for backwards compatibility.
* Shuffle numeric values of the IO_* flags to match the O_* flags fromphk2004-12-221-0/+13
| | | | | | | | | | fcntl.h. This is in preparation for making the flags passed to device drivers be consistently from fcntl.h for all entrypoints. Today open, close and ioctl uses fcntl.h flags, while read and write uses vnode.h flags.
* We can only ever get to vgonechrl() from a devfs vnode, so we do notphk2004-12-201-1/+2
| | | | | | | need to reassign the vp->v_op to devfs_specops, we know that is the value already. Make devfs_specops private to devfs.
* Add a couple of KASSERTS to try to diagnose a problem reported.phk2004-12-201-1/+5
|
* Be a bit more assertive about vnode bypass.phk2004-12-141-16/+17
|
* Exporting of NTFS filesystem broke in rev 1.70. Fix it.ssouhlal2004-12-131-7/+4
| | | | Approved by: phk, grehan (mentor)
* Don't forget to bypass vnodes in corner cases.phk2004-12-131-8/+6
| | | | | Found by: kkenn and ports/shell/zsh Thanks to: jeffr
* Another FNONBLOCK -> O_NONBLOCK.phk2004-12-131-2/+2
| | | | | Don't unconditionally set IO_UNIT to device drivers in write: nobody checks it, and since it was always set it did not carry information anyway.
* Use O_NONBLOCK instead of FNONBLOCK alias.phk2004-12-131-1/+1
|
* Explicit panic in vop_read/vop_write for devicesphk2004-12-131-0/+2
|
* Explicitly panic vop_read/vop_write on fifos.phk2004-12-131-0/+2
|
* Don't deref NULL if no charset-conversion is specified.phk2004-12-122-2/+10
| | | | Return correct vnode in vop_bmap()
* Handle MNT_UPDATE export requests first and return so we do notphk2004-12-111-14/+14
| | | | | | interpret the rest of the msdosfs_args structure. Detected by: marcel
* typophk2004-12-111-1/+1
|
* First save from editor, *then* commit.phk2004-12-071-2/+1
|
* Fix exports.phk2004-12-071-6/+4
|
* The remaining part of nmount/omount/rootfs mount changes. I cannot sensiblyphk2004-12-072-128/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | split the conversion of the remaining three filesystems out from the root mounting changes, so in one go: cd9660: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() nfs(client): Convert to nmount (the simple way, mount_nfs(8) is still necessary). Add omount compat shims. Drop COMPAT_PRELITE2 mount arg compatibility. ffs: Convert to nmount. Add omount compat shims. Remove dedicated rootfs mounting code. Use vfs_mountedfrom() Rely on vfs_mount.c calling VFS_STATFS() Remove vfs_omount() method, all filesystems are now converted. Remove MNTK_WANTRDWR, handling RO/RW conversions is a filesystem task, and they all do it now. Change rootmounting to use DEVFS trampoline: vfs_mount.c: Mount devfs on /. Devfs needs no 'from' so this is clean. symlink /dev to /. This makes it possible to lookup /dev/foo. Mount "real" root filesystem on /. Surgically move the devfs mountpoint from under the real root filesystem onto /dev in the real root filesystem. Remove now unnecessary getdiskbyname(). kern_init.c: Don't do devfs mounting and rootvnode assignment here, it was already handled by vfs_mount.c. Remove now unused bdevvp(), addaliasu() and addalias(). Put the few necessary lines in devfs where they belong. This eliminates the second-last source of bogo vnodes, leaving only the lemming-syncer. Remove rootdev variable, it doesn't give meaning in a global context and was not trustworth anyway. Correct information is provided by statfs(/).
* Use vfs_mountedfrom().phk2004-12-061-2/+2
| | | | | Since VFS_STATFS() always calls the filesystem with mp->mnt_stat now, the vfs_statfs method is now a no-op. Explain this in a comment.
* Trust vfs_mount to call VFS_STATFS() on all mounts.phk2004-12-061-2/+0
|
* Convert to nmount. Add omount compat.phk2004-12-065-39/+100
| | | | Unpropagate the sm_args function into the runtime part.
* Convert to nmount. Add omount compat.phk2004-12-061-27/+37
| | | | Use vfs_mountedon(). Rely on vfs_mount.c calling VFS_STATFS().
* Convert to nmount. Add omount compat.phk2004-12-062-61/+80
| | | | | | Same comment about charset conversions apply. Use vfs_mountedfrom(). Rely on vfs_mount.c calling VFS_STATFS().
* Convert to nmount. Add backwards compat cmount method.phk2004-12-063-47/+81
| | | | | | | Same comment as msdosfs applies: It would be nice if we had generic option names for charset conversions. Use vfs_mountefrom(). Rely on vfs_mount.c calling VFS_STATFS().
* Convert nwfs to nmount, but take the low road: There is no way this isphk2004-12-061-9/+29
| | | | | ever going to work without a dedicated mount_nwfs(8) program so simply stick struct nwfs_args into a nmount argument and leave it at that.
* Fix a typo in PFS_TRACE.kan2004-12-061-1/+1
| | | | | PR: kern/74461 Submitted by: Craig Rodrigues <rodrigc at crodrigues.org>
* ufs vfs_mountedon(), rely on vfs_mount.c calling VFS_STATFS()phk2004-12-061-4/+1
|
* Use vfs_mountedfrom(), rely on vfs_mount.c calling VFS_STATFS().phk2004-12-062-8/+3
|
* Use vfs_mountedfrom() and rely on vfs_mount.c to call VFS_STATFS()phk2004-12-061-3/+2
|
* Convert coda to nmount.phk2004-12-061-19/+13
|
* Convert msdosfs to nmount.phk2004-12-061-75/+121
| | | | | | | | | | | | | Add a vfs_cmount() function which converts omount argument stucture to nmount arguments. Convert vfs_omount() to vfs_mount() and parse nmount arguments. This is 100% compatible with existing userland. Later on, but before userland gets converted to nmount we may want to revisit the names of the mountoptions, for instance it may make sense to use consistent options for charset conversion etc.
* Fix warningphk2004-12-061-1/+1
|
OpenPOWER on IntegriCloud