summaryrefslogtreecommitdiffstats
path: root/sys/msdosfs
Commit message (Collapse)AuthorAgeFilesLines
* Divorce "dev_t" from the "major|minor" bitmap, which is now calledphk1999-05-112-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | udev_t in the kernel but still called dev_t in userland. Provide functions to manipulate both types: major() umajor() minor() uminor() makedev() umakedev() dev2udev() udev2dev() For now they're functions, they will become in-line functions after one of the next two steps in this process. Return major/minor/makedev to macro-hood for userland. Register a name in cdevsw[] for the "filedescriptor" driver. In the kernel the udev_t appears in places where we have the major/minor number combination, (ie: a potential device: we may not have the driver nor the device), like in inodes, vattr, cdevsw registration and so on, whereas the dev_t appears where we carry around a reference to a actual device. In the future the cdevsw and the aliased-from vnode will be hung directly from the dev_t, along with up to two softc pointers for the device driver and a few houskeeping bits. This will essentially replace the current "alias" check code (same buck, bigger bang). A little stunt has been provided to try to catch places where the wrong type is being used (dev_t vs udev_t), if you see something not working, #undef DEVT_FASCIST in kern/kern_conf.c and see if it makes a difference. If it does, please try to track it down (many hands make light work) or at least try to reproduce it as simply as possible, and describe how to do that. Without DEVT_FASCIST I belive this patch is a no-op. Stylistic/posixoid comments about the userland view of the <sys/*.h> files welcome now, from userland they now contain the end result. Next planned step: make all dev_t's refer to the same devsw[] which means convert BLK's to CHR's at the perimeter of the vnodes and other places where they enter the game (bootdev, mknod, sysctl).
* I got tired of seeing all the cdevsw[major(foo)] all over the place.phk1999-05-081-2/+2
| | | | | | | | Made a new (inline) function devsw(dev_t dev) and substituted it. Changed to the BDEV variant to this format as well: bdevsw(dev_t dev) DEVFS will eventually benefit from this change too.
* Continue where Julian left off in July 1998:phk1999-05-071-2/+2
| | | | | | | | | | | | | | Virtualize bdevsw[] from cdevsw. bdevsw() is now an (inline) function. Join CDEV_MODULE and BDEV_MODULE to DEV_MODULE (please pay attention to the order of the cmaj/bmaj arguments!) Join CDEV_DRIVER_MODULE and BDEV_DRIVER_MODULE to DEV_DRIVER_MODULE (ditto!) (Next step will be to convert all bdev dev_t's to cdev dev_t's before they get to do any damage^H^H^H^H^H^Hwork in the kernel.)
* Add sufficient braces to keep egcs happy about potentially ambiguouspeter1999-05-062-5/+6
| | | | if/else nesting.
* This Implements the mumbled about "Jail" feature.phk1999-04-281-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a seriously beefed up chroot kind of thing. The process is jailed along the same lines as a chroot does it, but with additional tough restrictions imposed on what the superuser can do. For all I know, it is safe to hand over the root bit inside a prison to the customer living in that prison, this is what it was developed for in fact: "real virtual servers". Each prison has an ip number associated with it, which all IP communications will be coerced to use and each prison has its own hostname. Needless to say, you need more RAM this way, but the advantage is that each customer can run their own particular version of apache and not stomp on the toes of their neighbors. It generally does what one would expect, but setting up a jail still takes a little knowledge. A few notes: I have no scripts for setting up a jail, don't ask me for them. The IP number should be an alias on one of the interfaces. mount a /proc in each jail, it will make ps more useable. /proc/<pid>/status tells the hostname of the prison for jailed processes. Quotas are only sensible if you have a mountpoint per prison. There are no privisions for stopping resource-hogging. Some "#ifdef INET" and similar may be missing (send patches!) If somebody wants to take it from here and develop it into more of a "virtual machine" they should be most welcome! Tools, comments, patches & documentation most welcome. Have fun... Sponsored by: http://www.rndassociates.com/ Run for almost a year by: http://www.servetheweb.com/
* Suser() simplification:phk1999-04-271-5/+5
| | | | | | | | | | | | | | | | | | | 1: s/suser/suser_xxx/ 2: Add new function: suser(struct proc *), prototyped in <sys/proc.h>. 3: s/suser_xxx(\([a-zA-Z0-9_]*\)->p_ucred, \&\1->p_acflag)/suser(\1)/ The remaining suser_xxx() calls will be scrutinized and dealt with later. There may be some unneeded #include <sys/cred.h>, but they are left as an exercise for Bruce. More changes to the suser() API will come along with the "jail" code.
* Back out half of 1.32: don't print a message on every failed mount attempt.dt1999-03-281-3/+1
| | | | | It is too chatty and hardly useful. 2 mesages in somewhat usual cases are left for now.
* Fix warnings in preparation for adding -Wall -Wcast-qual to thedillon1999-01-272-4/+9
| | | | kernel compile
* Now empty DOS filesystems default to long file names. Non-empty filesystemsdt1999-01-021-5/+7
| | | | without traces of Win95 default to short file names, as before.
* Ensure that deHighClust in direntry always initialized.dt1999-01-021-19/+29
| | | | | | | | | Noticed by: Carl Mascott <cmascott@world.std.com> Don't write access time of a file more than once per day. (Its precision is 1 day anyway). Don't try to write access and creation time in nonwin95 case. Suggested by: bde (long time ago).
* Ifdefed conditionally used simplock variables.bde1999-01-021-1/+3
|
* The "easy" fixes for compiling the kernel -Wunused: remove unreferenced staticarchie1998-12-074-14/+5
| | | | and local variables, goto labels, and functions declared but not defined.
* Honor MNT_NOATIME.dt1998-11-291-3/+3
| | | | | PR: 8383 Submitted by: Carl Mascott <cmascott@world.std.com>
* Support NT VFAT lower case flags.dt1998-11-215-11/+20
| | | | | PR: 8383 (Mostly) Submitted by: Carl Mascott <cmascott@world.std.com>
* add #include <sys/kernel.h> where it's needed by MALLOC_DEFINE()peter1998-11-101-1/+2
|
* Use TAILQ macros for clean/dirty block list processing. Set b_xflagspeter1998-10-312-9/+8
| | | | rather than abusing the list next pointer with a magic number.
* Use vtruncbuf() rather than vinvalbuf() when shortening files.peter1998-10-291-6/+9
|
* Don't follow null bdevsw pointers. The `major(dev) < nblkdev' test rottedbde1998-10-251-2/+4
| | | | | when bdevsw[] became sparse. We still depend on magic to avoid having to check that (v_rdev) device numbers in vnodes are not NODEV.
* Remove unused variable.dt1998-09-131-3/+1
| | | | Pointed out by: bde
* Fix a bug related to renaming in root directory. This bug reported bydt1998-09-131-2/+4
| | | | | | | Cejka Rudolf <cejkar@dcse.fee.vutbr.cz> on freebsd-current in Messaage-Id <199807141023.MAA09803@kazi.dcse.fee.vutbr.cz>. Reviewed by: bde
* Removed statically configured mount type numbers (MOUNT_*) and allbde1998-09-071-2/+2
| | | | | | | | | references to them. The change a couple of days ago to ignore these numbers in statically configured vfsconf structs was slightly premature because the cd9660, cfs, devfs, ext2fs, nfs vfs's still used MOUNT_* instead of the number in their vfsconf struct.
* Removed unused includes.bde1998-08-171-2/+1
|
* Fixed printf format errors.bde1998-07-111-2/+2
|
* VOP_STRATEGY grows an (struct vnode *) argumentjulian1998-07-041-2/+3
| | | | | | as the value in b_vp is often not really what you want. (and needs to be frobbed). more cleanups will follow this. Reviewed by: Bruce Evans <bde@freebsd.org>
* Back out previous change. This behavior is at least completelydt1998-06-101-1/+1
| | | | "susv2"-compliant.
* Also return EOPNOTSUPP rather than EINVAL for not supported owner and groupdt1998-06-101-2/+2
| | | | changes.
* Return EOPNOTSUPP rather than EINVAL for flags that are not supported.peter1998-06-101-2/+2
|
* Fix typo in a comment.dt1998-06-091-2/+2
|
* Fix priority bug in previous commit.dt1998-05-181-2/+2
| | | | Submitted by: bde
* Fix support for pre-Win95 filesystems: Make it possible to lookup justdt1998-05-172-3/+14
| | | | created short file name. Don't insert "generation numbers".
* Remove bogus LK_RETRY.dt1998-05-171-2/+2
| | | | Submitted by: bde
* Don't forget to clean up after an error reading the directory entrybde1998-05-171-3/+13
| | | | in deget().
* Removed vestiges of pre-Lite2 locking.bde1998-05-172-4/+2
|
* s/nanoruntime/nanouptime/gphk1998-05-171-2/+2
| | | | | | s/microruntime/microuptime/g Reviewed by: bde
* Fix off by ane error in previous commit.dt1998-05-091-2/+2
| | | | | | | | | | | This caused following commands: mkdir z cd z touch A B mv B A corrupt the '..' entry in 'z'. Reported by: bde
* In the words of the submitter:msmith1998-05-071-27/+13
| | | | | | | | | | | | | | | | | | | --------- Make callers of namei() responsible for releasing references or locks instead of having the underlying filesystems do it. This eliminates redundancy in all terminal filesystems and makes it possible for stacked transport layers such as umapfs or nullfs to operate correctly. Quality testing was done with testvn, and lat_fs from the lmbench suite. Some NFS client testing courtesy of Patrik Kudo. vop_mknod and vop_symlink still release the returned vpp. vop_rename still releases 4 vnode arguments before it returns. These remaining cases will be corrected in the next set of patches. --------- Submitted by: Michael Hancock <michaelh@cet.co.jp>
* As described by the submitter:msmith1998-05-061-2/+1
| | | | | | | | | | | | | Reverse the VFS_VRELE patch. Reference counting of vnodes does not need to be done per-fs. I noticed this while fixing vfs layering violations. Doing reference counting in generic code is also the preference cited by John Heidemann in recent discussions with him. The implementation of alternative vnode management per-fs is still a valid requirement for some filesystems but will be revisited sometime later, most likely using a different framework. Submitted by: Michael Hancock <michaelh@cet.co.jp>
* Use DFLTBSIZE instead of MAXBSIZE for pm_fatblksize.dt1998-04-291-16/+19
| | | | | | | | | | In msdosfs_sync: spelling fix, formatting changes; fix MNT_LAZY (sync modified denodes, don't sync device) Mostly submitted by (and with hints from): bde Increase limit for maximum disk size: as far as I can see previous limit was gratuitously too low.
* Support compiling with `gcc -ansi'.bde1998-04-152-8/+10
|
* Add a missing LK_RETRY.dt1998-04-151-5/+3
| | | | | | Noticed by: Bruce (almost 2 monts ago) Remove a debugging printf.
* Use random() rather then than homegrown stuff.phk1998-04-061-11/+3
|
* Print explanation diagnostics when mount is impossibleache1998-04-051-1/+5
| | | | Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
* Time changes mark 2:phk1998-04-041-3/+5
| | | | | | | | | | | | | | | | | * Figure out UTC relative to boottime. Four new functions provide time relative to boottime. * move "runtime" into struct proc. This helps fix the calcru() problem in SMP. * kill mono_time. * add timespec{add|sub|cmp} macros to time.h. (XXX: These may change!) * nanosleep, select & poll takes long sleeps one day at a time Reviewed by: bde Tested by: ache and others
* Fix dead hang writing to FATache1998-03-281-2/+2
| | | | Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
* Add two new functions, get{micro|nano}time.phk1998-03-262-7/+7
| | | | | | | | | | | | They are atomic, but return in essence what is in the "time" variable. gettime() is now a macro front for getmicrotime(). Various patches to use the two new functions instead of the various hacks used in their absence. Some puntuation and grammer patches from Bruce. A couple of XXX comments.
* Deleted 1024bytes/sector floppy code for PC-98 arch. Thekato1998-03-203-64/+3
| | | | | 1024bytes/sector code has not worked for long time and it should be re-implemented.
* Reviewed by: dyson@freebsd.org (john Dyson), dg@root.com (david greenman)julian1998-03-081-8/+11
| | | | | Submitted by: Kirk McKusick (mcKusick@mckusick.com) Obtained from: WHistle development tree
* Trivial filesystem getpages/putpages implementations, set the second.msmith1998-03-061-1/+34
| | | | | These should be considered the first steps in a work-in-progress. Submitted by: Terry Lambert <terry@freebsd.org>
* Patch to the last commit; attempt to unspam stuff from NetBSD.msmith1998-03-031-13/+11
| | | | Submitted by: Dmitrij Tejblum <dima@tejblum.dnttm.rssi.ru>
* The intent is to get rid of WILLRELE in vnode_if.src by makingmsmith1998-03-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a complement to all ops that return a vpp, VFS_VRELE. This is initially only for file systems that implement the following ops that do a WILLRELE: vop_create, vop_whiteout, vop_mknod, vop_remove, vop_link, vop_rename, vop_mkdir, vop_rmdir, vop_symlink This is initial DNA that doesn't do anything yet. VFS_VRELE is implemented but not called. A default vfs_vrele was created for fs implementations that use the standard vnode management routines. VFS_VRELE implementations were made for the following file systems: Standard (vfs_vrele) ffs mfs nfs msdosfs devfs ext2fs Custom union umapfs Just EOPNOTSUPP fdesc procfs kernfs portal cd9660 These implementations may change as VOP changes are implemented. In the next phase, in the vop implementations calls to vrele and the vrele part of vput will be moved to the top layer vfs_vnops and made visible to all layers. vput will be replaced by unlock in these cases. Unlocking will still be done in the per fs layer but the refcount decrement will be triggered at the top because it doesn't hurt to hold a vnode reference a little longer. This will have minimal impact on the structure of the existing code. This will only be done for vnode arguments that are released by the various fs vop implementations. Wider use of VFS_VRELE will likely require restructuring of the code. Reviewed by: phk, dyson, terry et. al. Submitted by: Michael Hancock <michaelh@cet.co.jp>
OpenPOWER on IntegriCloud