| Age | Commit message (Collapse) | Author |
|
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.
|
|
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.
|
|
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..
|
|
The recent (untested?) "cleanup" removed a null-pointer test.
|
|
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.
|
|
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
|
|
This fixes several trivial bounds/limits errors that were pointed out by
the Stanford Checker.
|
|
One of the goals of the whole new modversions implementation:
export-objs is gone for good!
|
|
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 :))
|
|
completly remove the old try_inc_mod_count()
|
|
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.
|
|
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.
|
|
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.
|
|
|
|
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);
|
|
into home.transmeta.com:/home/torvalds/v2.5/linux
|
|
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.
|
|
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
|
|
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
|
|
* 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
|
|
Documentation fix
base.c:
Switched lingering structure field initialiser to ISO C
Added locking when updating FCB flags
|
|
|
|
This last patch removes the union, replacing it with s_fs_info.
|
|
This removes an unused label in fs/devfs/base.c
|
|
Updated README from master HTML file
Fixed module unload race in devfs_open()
|
|
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
|
|
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; ;-)
|
|
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).
|
|
Exported devfs_only()
|
|
into atnf.csiro.au:/workaholix1/kernel/v2.5/rgooch-2.5
|
|
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.
|
|
Exported <devfs_find_and_unregister> to modules
|
|
|
|
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>.
|
|
|
|
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.
|
|
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.
|
|
|
|
|