- 10 Aug, 2002 9 commits
-
-
Alexander Viro authored
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; ;-)
-
Alexander Viro authored
ps2esdi.c switched to per-disk gendisks
-
Alexander Viro authored
cpqarray.c switched to per-disk gendisks
-
Alexander Viro authored
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).
-
Alexander Viro authored
->attach() for ide subdrivers explicitly calls register_disk() instead of ata_revalidate() now; revalidate_drives() is gone - it's not needed anymore (we _know_ that we'll read partition table as soon as driver claims the drive; no need to mess with bogus rereading).
-
Alexander Viro authored
->major_name for per-disk gendisks set to full name - i.e. IDE gendisks have "hda", "hdb", etc. instead of "hd". As the result, we kill a lot of crap in check.c::disk_name(). In particular, now we can afford ->minor_shift set to 0 for ide-cd (disk_name() was the only obstacle)
-
Alexander Viro authored
check_disk_change() converted to passing struct block_device. Old variant is still needed for a couple of places; wrapper is provided (__check_disk_change(kdev)). do_open() logics with setting ->bd_op sanitized - now we do that before calling ->open().
-
Alexander Viro authored
fix for embarrassing braino in /proc/partitions - size in kilobytes is _half_ the size in secotrs, not twice that size...
-
Alexander Viro authored
Present both in 2.4 and 2.5 ;-/
-
- 01 Aug, 2002 31 commits
-
-
Linus Torvalds authored
-
Linus Torvalds authored
-
bk://ldm.bkbits.net/linux-2.5-driverfs-apiLinus Torvalds authored
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
-
Linus Torvalds authored
Cset exclude: torvalds@home.transmeta.com|ChangeSet|20020801011106|51286
-
Alexander Viro authored
we are starting to split gendisks - now we can do that. Done for ide, sd, pd, hd and mfm It's in transit - what we are aiming at is getting ->nr_real to 1 for all gendisks. Once that will be done we will be able to simplify a lot stuff and remove ad-hackery. First thing that will happen after that is death of ->nr_real, obviouslye. Then we (a) will merge ->major and ->first_minor into ->dev (b) strip one level of indirection from ->driverfs_dev_arr, ->de_arr and ->flags - they turn into single-element arrays and we will simply pull the (only) element into struct gendisk. Kills a lot of ad-hackery in splitup code (fewer things to allocate). (c) replace ->major_name with ->disk_name; kills most of the crap in disk_name(9) - it only has to care about adding partition number to the name.
-
Alexander Viro authored
now that gendisks don't have shared stuff (we used to set blk_size[] from ->sizes) we can start splitting them into per-disk ones. Step 1: we introduce a new field - ->first_minor (to be merged with ->major into dev_t of entire disk once all gendisks are split). All arrays are assumed to start at that minor (i.e. gd->part[minor] got replaced with gd->part[minor - gd->first_minor], etc.). get_gendisk() is taught to pick the right gendisk if there are several with the same major.
-
Alexander Viro authored
kills use of blk_size[] for partitioned devices, removes ->sizes from struct gendisk.
-
Linus Torvalds authored
-
bk://linux-input.bkbits.net/linux-inputLinus Torvalds authored
into penguin.transmeta.com:/home/penguin/torvalds/repositories/kernel/linux
-
Felipe Damasio authored
This patch corrects a comment on the 8139cp ethernet driver.
-
Ingo Molnar authored
This removes the TLS clear operation. I've left the flags mask and the writable flag just so that we have the option to introduce extensions without breaking the ABI.
-
Linus Torvalds authored
-
William Stinson authored
this is a small patch for boardergo.c linux driver for isdn HYSDN cards to 1) remove call to check_region using request_region instead 2) check the status of call to request_region 3) release allocated region resource in case of error. I don't have this hardware so compilation checked only.
-
Christoph Hellwig authored
from Debian's kernel package [ Typo fix, makes sense, please apply ]
-
James Mayer authored
-
Greg Banks authored
Symbols CONFIG_HISAX_ENTERNOW_PCI and CONFIG_HISAX_AMD7930 depend on CONFIG_EXPERIMENTAL but do not say so in their banners.
-
Greg Banks authored
Symbol CONFIG_PPPOATM doesn't depend on CONFIG_EXPERIMENTAL but claims to in its banner.
-
Marcus Alanen authored
Somebody noticed on #kernelnewbies. In the error path, so this is silly cleanup work...
-
Greg Banks authored
Some CML1 rule contributors seem to think that the "bool" statement takes a third argument which is the default value. It doesn't.
-
Patrick Mochel authored
into osdl.org:/home/mochel/src/kernel/devel/linux-2.5-driverfs-api
-
rfjak@eircom.net authored
I am not sure if you are the actual maintainer for this, but your name adorns the source : 2.5.28 introduced video mode 1400x1050 twice into drivers/video/modedb.c Both instances use indentical timings, so I guess it's a mistake.
-
Greg Banks authored
Symbol CONFIG_EXT3_FS doesn't depend on CONFIG_EXPERIMENTAL but claims to in its banner.
-
Anton Blanchard authored
Quick fix for: smbiod.c:272: warning: deprecated use of label at end of compound statement
-
William Stinson authored
this is a small patch for baycom_ser_hdx.c -- baycom ser12 halfduplex radio modem driver to 1) remove call to check_region using request_region instead 2) check the status of call to request_region 3) release allocated region resource in case of error. I don't have this hardware so compilation checked only.
-
Christoph Hellwig authored
They are harmless mostly and can happen in normal use. (from -rh)
-
Mikael Pettersson authored
Silence bitop on non-long argument warnings.
-
James Mayer authored
-
Christoph Hellwig authored
To make spinlock debugging work with -funsigned-char the i386 version of spin_is_locked() needs to cast to signed char explicitly instead of just char. XFS needed -funsigned-char (and currently still has it), but it doesn't evert hurt.
-
Art Haas authored
Here are patches for designated initializers in kernel/*.
-
Christoph Hellwig authored
(Included in 2.4)
-
Mikael Pettersson authored
Silence bitop on non-long argument warnings. [ Not just silence warnings, but fix portability bug ]
-