summaryrefslogtreecommitdiff
path: root/fs/devfs
AgeCommit message (Collapse)Author
2003-03-22[PATCH] dev_t [1/3]: kill cdevAndrew Morton
Patch from Andries.Brouwer@cwi.nl Now that 2.5.65 is out, the next dev_t patch. It was a bit large and unreadable, so I split it into three clean pieces. Afterwards, since many people ask for this, a fourth patch that actually changes the type of dev_t (not to be applied yet, that is just for playing). The first patch is the cdev-kill patch that I sent out earlier. It is no use having two forms of chardev registration in the source, and my version of the path of small modifications does not pass through this version, although the final result will not be that different. So, kill cdev_cachep, cdev_cache_init, cdfind, cdget, cdput, inode->i_cdev, struct char_device. All of this is dead code today. The second patch removes MAX_CHRDEV. The third patch polishes linux/major.h.
2003-03-21[PATCH] remove DEVFS_FL_REMOVABLEChristoph Hellwig
Devfs tries to be super smart and rereads partition tables at all kinds of wierd points. This breaks a bunch of stuff were you can't get the right disk changed information (i.e. CompactFlash). If people actually need this kind of stuff they should just call partx from devfsd instead of relying on the kernel doing something like this. Cleans up the devfs code significatnly (aka removes tons of junk)
2003-03-21[PATCH] make devfs_put() static to fs/devfs/base.cChristoph Hellwig
Not use anywhere else nor should it.
2003-03-21[PATCH] fix waitqueue leak in devfs_d_revalidate_waitChristoph Hellwig
devfs_d_revalidate_wait adds to a waitqueue but never removes from it again so we there's one entry full of reused stack space added on each call (I wonder how this ever worked). The function has a few more bugs (it effectivly does a sleep_on instead of checking for the actual even and can't deal with negative dentries at all), but I just had breakfast and don't want to poke into devfs internals deeper - I still hope Adam's smalldevfs will get merged anyway..
2003-03-16[PATCH] fix devfs oopsAndrew Morton
The recent (untested?) "cleanup" removed a null-pointer test.
2003-03-10[PATCH] remove regular file support from devfsChristoph Hellwig
It's the _device_ filesystem, so regular files are grossly misplaced here. Fortauntely only one driver actually tries to use it (microcode) and it's works fine with a regular miscdevice as well.
2003-03-10[PATCH] remove devfs_only()Christoph Hellwig
Rationale: devfs_only does nothing but disabling {un,}register_blkdev and {un,}register_chrdev. {un,}register_blkdev already do nothing but adding it's name argument to a lookup table for the __bdevname and /proc/device output so this use is already bogus. The disabling of the character device per-major arrays can work in practice but is useless as any driver relying on it can't be used on non-devfs systems.
2003-02-25[PATCH] replace it's with its where appropriate.Steven Cole
This patch replaces it's (it is) with its (possessive of it) in the following cases where the possessive of it is meant. to it's -> to its into it's -> into its from it's -> from its of it's -> of its with it's -> with its under it's -> under its about it's -> about its
2003-02-10[PATCH] bounds/limits fixes (Stanford Checker)Randy Dunlap
This fixes several trivial bounds/limits errors that were pointed out by the Stanford Checker.
2003-02-03kbuild: Remove export-objs := ... statementsKai Germaschewski
One of the goals of the whole new modversions implementation: export-objs is gone for good!
2003-01-14[PATCH] umode_t changes from Adam's mini-devfsChristoph Hellwig
The use of umode_t instead of devfs-specific char vs block #defines in Adam's mini-devfs patch makes sense independant of whether his patch should get merged. While reviewing his changes I also notices that most of the number allocation functionality in devfs has no business beeing exported. In addition I cleaned up devfs_alloc_devnum/ devfs_dealloc_devnum a bit.
2003-01-14[PATCH] remove some junk from fs/devfs/MakefileChristoph Hellwig
2002-12-31[PATCH] devfs creptomancyChristoph Hellwig
As already state in the thread about Adam's devfs reimplementation there is much devfs functionality that is unused or only used by the arch/ia64/sn/ code that currently doesn't even compile in 2.5 and that will get it's own filesystem that fits the needs better when SGI moves to 2.6. (the first hunk is the only exception to the above rule, but it's just a debug printk :))
2002-12-29[PATCH] more obsolete module API fixesChristoph Hellwig
completly remove the old try_inc_mod_count()
2002-12-14[PATCH] Remove Rules.make from Makefiles (3/3)Brian Gerst
Makefiles no longer need to include Rules.make, which is currently an empty file. This patch removes it from the remaining Makefiles, and removes the empty Rules.make file.
2002-12-03[PATCH] removal of devfs_register_seriesAlexander Viro
not used anymore
2002-12-03[PATCH] devfs major/minor removalAlexander Viro
major/minor replaced with a single field (dev_t) in devfs_entry
2002-12-03[PATCH] removal of fcb horrorAlexander Viro
"fcb" killed; stuff that used to be handled by it (block/char/regular) moved into the same union where the rest of cases are handled.
2002-12-03[PATCH] devfs flags cleanupAlexander Viro
* DEVFS_FL_AOPEN_NOTIFY removed (b0rken, used only by vt on the kernel side, unus{ed,able} on the userland side * DEVFS_FL_HIDE removed (unused) * ->lock, ->open and ->aopen_notify removed (not used anymore) * code slightly cleaned up
2002-12-03[PATCH] removal of dead codeAlexander Viro
* devfs_get_handle() lost 3rd, 4th and 5th arguments (3rd and 4th are always 0, 5th is ignored in that case) * _devfs_find_by_dev() removed * _devfs_find_entry() lost 3rd, 4th and 5th arguments * devfs_find_and_unregister() removed * devfs_get_maj_min() removed * IS_DEVFS_INODE() removed * DEVFS_MINOR() removed
2002-12-03[PATCH] removal of slave devfs entriesAlexander Viro
devfs_auto_unregister() is not used anymore. devfs_get_unregister_slave() never had been used. devfs_entry->slave is always NULL now. all of the above removed.
2002-11-19[PATCH] *_mknod prototypeAndries E. Brouwer
The dev_t argument of sys_mknod is passed to vfs_mknod, and is then cast to int when foo_mknod is called, and is subsequently very often cast back to dev_t. (For example, minix_mknod() calls minix_set_inode() that takes a dev_t.) This is a cleanup that avoids this back-and-forth casting by giving foo_mknod a prototype with dev_t. In most cases now the dev_t is transmitted untouched until init_special_inode. It also makes the two routines hugetlbfs_get_inode() and shmem_get_inode() static.
2002-11-17Devfs was broken by the nanosecond inode times. Fix properly.Linus Torvalds
2002-11-17[PATCH] devfs_remove() helperAlexander Viro
All callers of devfs_find_and_unregister() pass 0 in 6th argument. All uses of that function either pass 0 in 3rd and 4th argument (in which case the 5th is ignored) or pass the existing pathname in the 2nd (in which case 3rd, 4th and 5th are ignored). In all cases the first argument can be trivially made NULL. devfs_find_and_unregister() is left as-is. All existing callers converted to new helper - devfs_remove(pathname). Said beast does equivalent of devfs_find_and_unregister(NULL, pathname, 0, 0, 0, 0);
2002-11-17Merge home.transmeta.com:/home/torvalds/v2.5/nsec-statLinus Torvalds
into home.transmeta.com:/home/torvalds/v2.5/linux
2002-11-17[PATCH] nanosecond stat timefieldsAndi Kleen
stat64 has been changed to return jiffies granuality as nsec in previously unused fields. This allows make to make better decisions on when to recompile a file. Follows losely the Solaris API. CURRENT_TIME has been redefined to return struct timespec. The users who don't use it in a inode/attr context have been changed to use a new get_seconds() function. CURRENT_TIME is implemented by an out-of-line function. There is a small performance penalty in this patch. The previous filemap code had an optimization to flush atime only once a second. This is currently gone, which will increase flushes a bit. I believe the correct solution if it should be a problem is to have per super block fields that give an arbitary atime flush granuality - so that you can set it to be only flushed once a hour if you prefer that. I will work on that later in separate patches if the need should arise. struct inode and the attr struct has been changed to store struct timespec instead of time_t for [cma]time. Not all file systems support this granuality, but some like XFS,NFSv3,CIFS,JFS do. The others will currently truncate the nsec part on flushing to disk. There was some discussion on this rounding on l-k previously. I went for simple truncation because there is not much evidence IMHO that the more complicated roundings have any advantages. In practice application will be rather unlikely to notice the rounding anyways - they can only see a difference when an inode is flush from memory and reloaded in less than a second, which is rather unlikely.
2002-11-14[PATCH] devfs_register_tape() cleanupAlexander Viro
devfs_register_tape() returns the number it had assigned to tape. new helper: devfs_unregister_tape(number) - removes symlink created by devfs_register_tape() devfs_register_tape() doesn't use devfs_auto_unregister() anymore. devfs_register_tape() gets devfs entry of directory, instead of that of a random file in that directory. users updated
2002-10-30Merge atnf.csiro.au:/workaholix1/kernel/v2.5/linusRichard Gooch
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
2002-10-28[PATCH] block_device_operations always picked from gendiskAlexander Viro
* do_open() cleaned up * we always pick block_device_operations from gendisk->fops now * register_blkdev() just stores the name of driver, nothing more * ->bd_op and ->bd_queue removed - we have that in gendisk * get_blkfops() is gone
2002-10-16util.c:Richard Gooch
Documentation fix base.c: Switched lingering structure field initialiser to ISO C Added locking when updating FCB flags
2002-10-14Removed DEVFS_FL_AUTO_OWNER flagRichard Gooch
2002-10-08[PATCH] struct super_block cleanup - finalBrian Gerst
This last patch removes the union, replacing it with s_fs_info.
2002-09-30[PATCH] Squash warning in fs/devfs/base.cDavid Gibson
This removes an unused label in fs/devfs/base.c
2002-08-21Exported devfs_find_and_unregister() and devfs_only() to modulesRichard Gooch
Updated README from master HTML file Fixed module unload race in devfs_open()
2002-08-21Merge atnf.csiro.au:/workaholix1/kernel/v2.5/linusRichard Gooch
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
2002-08-10[PATCH] fix check_disk_change() deadlocksAlexander Viro
Small, but tricky: fix for check_disk_change() deadlocks. What we do is a) opening block device shifted from check_partition() to grok_partitions(); check_partitions() takes opened struct block_device. b) all callers of check_disk_change() fall in two groups - ones that are called only from some ->open() and ones that are _never_ called from ->open(). There is no middle ground. We split the thing in two functions - check_disk_change() for the first class and full_check_.... for the second. The former (ones inside ->open()) doesn't touch partition tables but marks the bdev as "had been invalidated". In the end of do_open() we check if bdev is marked and call wipe_partitions()/check_partition() if it is - at that point bdev is fully set up and ready. c) ->bd_part_sem kludge is gone - we use ->bd_sem instead. That is, do_open() on a partition grabs ->bd_sem on entire disk and picks partition data while under it; do_open() on entire disk rereads partition if needed before dropping ->bd_sem (right before dropping it); BLKRRPART does trylock on ->bd_sem and then checks ->bd_part_count - same logics as before, except that we use ->bd_sem instead of ->bd_part_sem. That kills recursive open(), gives us the same exclusion rules as we had and makes sure that actual IO (including rereading partition tables) is done only when we are ready to do it. It actually sounds a lot nastier than it is. do_open() is a one sick puppy right now, but we have everything in one place and _out_ of drivers (and 20-odd equally sick puppies are gone from them, along with about the same number of races). Now we are almost ready to clean it up for good - all that remains to do before that is to get the rest of drivers (cciss, DAC960, i2o and a couple of ancients - xd and acsi) using per-disk gendisks. Then most of that crap will disappear. BTW, the only generic ioctl remaining in the drivers is HDIO_GETGEO - a lot of foo_ioctl() starts with if (cmd != HDIO_GETGEO) return -EINVAL; ;-)
2002-08-10[PATCH] partition table flush/read cleanupAlexander Viro
Big One. Flushing/rereading partition tables is taken from ->revalidate() for partitioned devices; now it's done in the caller (check_disk_change()). BLKRRPART handling also moved out of drivers - they are still allowed to override it (DAC960 and i2o are the only remaining ones), but common case is handled in fs/block_dev.c. Note: we are still only shifting stuff - bd_sem deadlocks in check_disk_change() are still there. However, now we have all relevant code outside of drivers and that will allow to fix the thing (see next patches).
2002-08-06base.c:Richard Gooch
Exported devfs_only()
2002-08-05Merge atnf.csiro.au:/workaholix1/kernel/v2.5/linusRichard Gooch
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
2002-07-30Remove the devfs_should* functions I added, and replace them with one ↵Greg Kroah-Hartman
devfs_only() call This now explains what is really going on much better than before.
2002-07-30Removed devfs_register_blkdev and devfs_unregister_blkdev.Greg Kroah-Hartman
Use register_blkdev and unregister_blkdev as before, and everything will work just fine.
2002-07-30Removed devfs_register_chrdev and devfs_unregister_chrdev.Greg Kroah-Hartman
Use register_chrdev and unregister_chrdev as before, and everything will work.
2002-07-30base.c:Richard Gooch
Exported <devfs_find_and_unregister> to modules
2002-07-28Removed deprecated devfs_find_handle()Richard Gooch
2002-07-25do_mounts.c, block_dev.c, hiddev.c, md.c:Richard Gooch
Switched from devfs_find_handle() to devfs_get_handle() Many files: Switched from devfs_find_handle() to devfs_find_and_unregister() base.c: Created <devfs_find_and_unregister>.
2002-07-24(no commit message)Richard Gooch
2002-07-24Switched to ISO C structure field initialisers.Richard Gooch
Switch to set_current_state() and move before add_wait_queue(). Updated README from master HTML file. Fixed devfs entry leak in <devfs_readdir> when *readdir fails.
2002-06-02Split up "iput()" and make it more readable.Linus Torvalds
Add "drop_inode" VFS interface to make FS operations cleaner and race-free. Remove old force_delete interface, and update filesystems that used it to use the new infrastructure.
2002-05-24kbuild: Use standard multi-part object declaration in fs/*Kai Germaschewski
2002-05-14Minor cleanup of fs/devfs/base.c:scan_dir_for_removable().Richard Gooch