| Age | Commit message (Collapse) | Author |
|
Nobody seems to have any outstanding work against devfs, so...
|
|
From: Christoph Hellwig <hch@lst.de>
now that kdev_t is gone very few places needs this still, the only header
of those beeing fs.h
|
|
From: Christoph Hellwig <hch@lst.de>
Whee! devfs_register isn't used anymore in the whole tree and with
it some other devfs crap. Kill it for good.
|
|
From: Christoph Hellwig <hch@lst.de>
Some people may already have noticed that I've been revamping the devfs API
recently. The worst offender still left is devfs_register, it's prototype
is:
devfs_handle_t devfs_register(devfs_handle_t dir,
const char *name, unsigned int flags,
unsigned int major, unsigned int minor,
umode_t mode, void *ops, void *info)
Of these:
- dir and flags are always zero
- the return value is never used
- info is only used in one driver which doesn't even need it for
operation
- umode_t always describes a character device
- name very often comes from a stack buffer we sprintf'ed into
so obviously we really want a much simpler API instead. My first draft for
this was:
int devfs_mk_cdev(dev_t dev, umode_t mode,
struct file_operations *fops, void *info,
const char *fmt, ...)
this removes the unused argumens, switches to a proper dev_t for the device
number and allows to directly use a printf-like expression as name, getting
rid of the temporary buffers.
Now Al has reappeared and put the first steps of his CIDR for charater device
on public ftp and we'll soon have a similar lookup object + fops mechanism in
generic code as we already habe for blockdevices, i.e. the devfs code to
assign fops from an entry will become superflous as generic code already does
it. That means the fops and info arguments are obsolete before they were
introduced, so I'd like to propose the following API instead:
int devfs_mk_cdev(dev_t dev, umode_t mode, const char *fmt, ...)
which is much nicer anyway. The educated reader will notice that this is
exactly the same prototype devfs_mk_bdev has so I'll probably get suggestions
to merge those two into some kind of devfs_mk_node soon. Personally I don't
like that as character and blockdevices are two really separate entinities
and I'll like to keep them as separate as possible.
Example patch that introduces the API and converts drivers/input attached.
Every driver which calls devfs_mk_cdev (about 50) needs conversion. Note
that the transition can happen in pieces - devfs_register continues to work
after this patch, it's just the plan to get rid of it in the end.
|
|
this fixes a harmless but annoying warning when compiling one of the
tape drivers without devfs.
|
|
Return an error code instead of a devfs_handle_t. The handle isn't
useful for anything and the !CONFIG_DEVFS_FS stub in fact returned
NULL which made it entirely useless. Thus only one driver is actually
checking the retval in the current tree..
|
|
Previously gendisk.devfs_name was used only for partitioned devices
or CDroms, and for the latter it was slightly broken. Fix it to
work genericly for all gendisks.
|
|
Replaces devfs_register for block devices. Note that we do NOT pass in
an operaion vector here - it was unused in devfs_register already
and our block device code fundamentally ties the operations to the
gendisk. There will be only very few callers of this one anyway..
|
|
|
|
There's just one caller in fs/devfs/base.c left.
|
|
Always pass around the pathnames for the devfs entries / directories
instead of the devfs_handle_ts. Cleanes up the code massivly.
|
|
Pass in the path directly instead of getting it from a devfs_handle_t.
|
|
Okay, all flags are gone from devfs callers, time to remove the gunk
handling it. devfs_register prototype will change later.
|
|
.. by moving a bunch of devfs-related code from fs/partition/check.c
to fs/devfs/base.c. Also has the nice sideffect of getting rid of
a bunch of ugly ifdefs.
[This is the new and improved, rediffed, applying and compilable
version. In short it's perfect]
|
|
All arguments except the name are unused - remove them and make the
name printf-like to avoid a few snprintf in the surrounding code.
(also fixes compilation to due a superflous endif in dvb core)
|
|
All devfs_mk_symlink arguments except the from and to strings are
unused. Bring the prototype in shape.
|
|
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)
|
|
Not use anywhere else nor should it.
|
|
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.
|
|
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.
|
|
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.
|
|
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 :))
|
|
not used anymore
|
|
major/minor replaced with a single field (dev_t) in devfs_entry
|
|
"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.
|
|
* 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
|
|
* 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
|
|
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.
|
|
|
|
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);
|
|
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
|
|
|
|
Exported devfs_only()
|
|
devfs_only() call
This now explains what is really going on much better than before.
|
|
Use register_blkdev and unregister_blkdev as before, and everything will work just fine.
|
|
Use register_chrdev and unregister_chrdev as before, and everything will work.
|
|
|
|
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>.
|
|
- Documentation updates
- BKL removal (devfs doesn't need the BKL)
- Changed <devfs_rmdir> to allow later additions if not yet empty
- Added calls to <devfs_register_partitions> in drivers/block/blkpc.c
<add_partition> and <del_partition>
- Bug fixes in unique number and devnum allocators.
|
|
- Christoph Hellwig: scsi_register_module cleanup
- Mikael Pettersson: apic.c LVTERR fixes
- Russell King: ARM update (including bio update for icside)
- Jens Axboe: more bio updates
- Al Viro: make ready to switch bread away from kdev_t..
- Davide Libenzi: scheduler cleanups
- Anders Gustafsson: LVM fixes for bio
- Richard Gooch: devfs update
|
|
- Al Viro: task-private namespaces, more cleanups
|
|
- Jeff Garzik: no longer support old cards in tulip driver
(see separate driver for old tulip chips)
- Pat Mochel: driverfs/device model documentation
- Ballabio Dario: update eata driver to new IO locking
- Ingo Molnar: raid resync with new bio structures (much more efficient)
and mempool_resize()
- Jens Axboe: bio queue locking
|
|
- Greg KH: USB update
- Richard Gooch: refcounting for devfs
- Jens Axboe: start of new block IO layer
|
|
- Richard Gooch: devfs update
- Andrea Arcangeli: clean up/fix ramdisk handling now that it's in page cache
- Al Viro: follow up the above with initrd cleanups
- Keith Owens: get rid of drivers/scsi/53c700-mem.c file
- Trond Myklebust: RPC over TCP race fix
- Greg KH: USB update (ohci understands USB_ZERO_PACKET)
- me: clean up reference bit handling, fix silly GFP_ATOMIC allocation bug
|
|
- Andreas Dilger: various ext2 cleanups
- Richard Gooch: devfs update
- Johannes Erdfelt: USB updates
- Alan Cox: merges
- David Miller: fix SMP pktsched bootup deadlock (CONFIG_NET_SCHED)
- Roman Zippel: AFFS update
- Anton Altaparmakov: NTFS update
- me: fix races in vfork() (semaphores are not good completion handlers)
- Jeff Garzik: net driver updates, sysvfs update
|
|
- remember to increment the version number
- Chris Mason: reiserfs mark_journal_new and bh leak fix
- Richard Gooch: devfs update
- Alexander Viro: further FS cleanup (superblock list)
- David Woodhouse: MTD update
- Kai Germaschewski: ISDN update (stanford checker fixes etc)
- Rich Baum: gcc-3.0 warning fixes
- Jeff Garzik: network driver updates
- Geert Uytterhoeven: m68k fbdev logo merge glitch fix
- Andrea Arcangeli: fix signal return path
- David Miller: Sparc updates
- Johannes Erdfelt: USB update
- Carsten Otte, Andries Brouwer: don't clear blk_size unconditionally
on partition check
- Martin Frey: alpha Sable irq fix
- Paul Mackerras: PPC softirq update
- Patrick Mochel: PCI power management infrastructure
- Robert Siemer: miroSOUND driver update
- Neil Brown: knfsd updates, including ability to export ReiserFS filesystems
- Trond Myklebust: NFS readdir fixup, don't update atime on client
- Andrew Morton: truncate_inode_pages speedup
- Paul Menage: make inode quota count all inodes..
|
|
- David Miller: sparc rw semaphores moved over
- Alan Cox: yet more resyncs
- NIIBE Yutaka: Super-H driver update
- David Howells: more rw-sem cleanups, updates
- USB updates
- Al Viro: filesystem init cleanup
|
|
|