13 Oct, 2007
1 commit
-
This changes the uevent buffer functions to use a struct instead of a
long list of parameters. It does no longer require the caller to do the
proper buffer termination and size accounting, which is currently wrong
in some places. It fixes a known bug where parts of the uevent
environment are overwritten because of wrong index calculations.Many thanks to Mathieu Desnoyers for finding bugs and improving the
error handling.Signed-off-by: Kay Sievers
Cc: Mathieu Desnoyers
Cc: Cornelia Huck
Signed-off-by: Greg Kroah-Hartman
18 Jul, 2007
3 commits
-
Put WARN_ON and fixed all callers of unregister_blkdev(). Now we can make
unregister_blkdev return void.Cc: Jens Axboe
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
When unregister_blkdev() has failed, something wrong happened. This patch
adds WARN_ON to notify of such badness.Cc: Jens Axboe
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
kmalloc_node() and kmem_cache_alloc_node() were not available in a zeroing
variant in the past. But with __GFP_ZERO it is possible now to do zeroing
while allocating.Use __GFP_ZERO to remove the explicit clearing of memory via memset whereever
we can.Signed-off-by: Christoph Lameter
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
24 May, 2007
2 commits
-
Send an uevent to user space to indicate that a media change event has
occurred.Signed-off-by: Kristen Carlson Accardi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Allow user space to determine if a disk supports Asynchronous Notification of
media changes. This is done by adding a new sysfs file "capability_flags",
which is documented in (insert file name). This sysfs file will export all
disk capabilities flags to user space. We also define a new flag to define
the media change notification capability.Signed-off-by: Kristen Carlson Accardi
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 May, 2007
1 commit
-
Display all possible partitions when the root filesystem is not mounted.
This helps to track spell'o's and missing drivers.Updated to work with newer kernels.
Example output:
VFS: Cannot open root device "foobar" or unknown-block(0,0)
Please append a correct "root=" boot option; here are the available partitions:
0800 8388608 sda driver: sd
0801 192748 sda1
0802 8193150 sda2
0810 4194304 sdb driver: sd
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)[akpm@linux-foundation.org: cleanups, fix printk warnings]
Signed-off-by: Jan Engelhardt
Cc: Dave Gilbert
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 May, 2007
1 commit
-
We need to work on cleaning up the relationship between kobjects, ksets and
ktypes. The removal of 'struct subsystem' is the first step of this,
especially as it is not really needed at all.Thanks to Kay for fixing the bugs in this patch.
Signed-off-by: Greg Kroah-Hartman
05 Apr, 2007
1 commit
-
Revert all this. It can cause device-mapper to receive a different major from
earlier kernels and it turns out that the Amanda backup program (via GNU tar,
apparently) checks major numbers on files when performing incremental backups.Which is a bit broken of Amanda (or tar), but this feature isn't important
enough to justify the churn.Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
21 Feb, 2007
1 commit
-
Several people have reported failures in dynamic major device number handling
due to the recent changes in there to avoid handing out the local/experimental
majors.Rolf reports that this is due to a gcc-4.1.0 bug.
The patch refactors that code a lot in an attempt to provoke the compiler into
behaving.Cc: Rolf Eike Beer
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Feb, 2007
1 commit
-
As pointed out in http://bugzilla.kernel.org/show_bug.cgi?id=7922, dynamic
blockdev major allocation can hand out majors which LANANA has defined as
being for local/experimental use.Cc: Torben Mathiasen
Cc: Greg KH
Cc: Al Viro
Cc: Tomas Klas
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 Dec, 2006
1 commit
-
This patch provides fault-injection capability for disk IO.
Boot option:
fail_make_request=,,,
-- specifies the interval of failures.
-- specifies how often it should fail in percent.
-- specifies the size of free space where disk IO can be issued
safely in bytes.-- specifies how many times failures may happen at most.
Debugfs:
/debug/fail_make_request/interval
/debug/fail_make_request/probability
/debug/fail_make_request/specifies
/debug/fail_make_request/timesExample:
fail_make_request=10,100,0,-1
echo 1 > /sys/blocks/hda/hda1/make-it-failgeneric_make_request() on /dev/hda1 fails once per 10 times.
Cc: Jens Axboe
Signed-off-by: Akinobu Mita
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Sep, 2006
1 commit
-
Check and handle init errors.
Signed-off-by: Randy Dunlap
Cc: Greg KH
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
01 Jul, 2006
1 commit
-
Signed-off-by: Jörn Engel
Signed-off-by: Adrian Bunk
22 Jun, 2006
1 commit
-
Like the SUBSYTEM= key we find in the environment of the uevent, this
creates a generic "subsystem" link in sysfs for every device. Userspace
usually doesn't care at all if its a "class" or a "bus" device. This
provides an unified way to determine the subsytem of a device, regardless
of the way the driver core has created it.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
13 May, 2006
1 commit
-
This reverts commit 56cf6504fc1c0c221b82cebc16a444b684140fb7.
Both Erik Mouw and Andrew Vasquez independently pinpointed this commit
as causing problems, where the slab cache for a driver is never released
(most obviously causing problems when immediately re-loading that
driver, resulting in a "kmem_cache_create: duplicate cache "
message, but it can also cause other trouble).James Bottomley dug into it, and reports:
"OK, here's the scoop. The problem patch adds a get of driverfs_dev in
add_disk(), but doesn't put it again until disk_release() (which occurs
on final put_disk() of the gendisk).However, in SCSI, the driverfs_dev is the sdev_gendev. That means
there's a reference held on sdev_gendev until final disk put.
Unfortunately, we use the driver model driver_remove to trigger
del_gendisk (which removes the gendisk from visibility and decrements
the refcount), so we've introduced an unbreakable deadlock in the
reference counting with this.I suggest simply reversing this patch at the moment. If Russell and
Jens can tell me what they're trying to do I'll see if there's another
way to do it."so hereby the patch gets reverted, waiting for a better fix.
Cc: Jens Axboe
Cc: Russell King
Cc: James Bottomley
Cc: Erik Mouw
Cc: Andrew Vasquez
Signed-off-by: Linus Torvalds
06 May, 2006
1 commit
-
The block layer keeps a reference (driverfs_dev) to the struct
device associated with the block device, and uses it internally
for generating uevents in block_uevent.Block device uevents include umounting the partition, which can
occur after the backing device has been removed.Unfortunately, this reference is not counted. This means that
if the struct device is removed from the device tree, the block
layers reference will become stale.Guard against this by holding a reference to the struct device
in add_disk(), and only drop the reference when we're releasing
the gendisk kobject - in other words when we can be sure that no
further uevents will be generated for this block device.Signed-off-by: Russell King
Acked-by: Jens Axboe
01 Apr, 2006
1 commit
-
Make baby-simple the code for /proc/devices. Based on the proven design
for /proc/interrupts.This also fixes the early-termination regression 2.6.16 introduced, as
demonstrated by:# dd if=/proc/devices bs=1
Character devices:
1 mem
27+0 records in
27+0 records outThis should also work (but is untested) when /proc/devices >4096 bytes,
which I believe is what the original 2.6.16 rewrite fixed.[akpm@osdl.org: cleanups, simplifications]
Signed-off-by: Joe Korty
Cc: Neil Horman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
27 Mar, 2006
1 commit
-
The kernel's representation of the disk statistics uses the type unsigned
which is 32b on both 32b and 64b platforms. Unfortunately, most system
tools that work with these numbers that are exported in /proc/diskstats
including iostat read these numbers into unsigned longs. This works fine
on 32b platforms and when the number of IO transactions are small on 64b
platforms. However, when the numbers wrap on 64b platforms & you read the
numbers into unsigned longs, and compare the numbers to previous readings,
then you get an unsigned representation of a negative number. This looks
like a very large 64b number & gives you bizarre readouts in iostat:ilc4: Device: rrqm/s wrqm/s r/s w/s rsec/s wsec/s rkB/s wkB/s avgrq-sz avgqu-sz await svctm %util
ilc4: sda 5.50 0.00 143.96 0.00 307496983987862656.00 0.00 153748491993931328.00 0.00 2136028725038430.00 7.94 55.12 5.59 80.42Though fixing iostat in user space is possible, and a quick survey
indicates that several other similar tools also use unsigned longs when
processing /proc/diskstats. Therefore, it seems like a better approach
would be to extend the length of the disk_stats structure on 64b
architectures to 64b. The following patch does that. It should not affect
the operation on 32b platforms.Signed-off-by: Ben Woodard
Cc: Rick Lindsley
Signed-off-by: Andrew Morton
Signed-off-by: Jens Axboe
21 Mar, 2006
1 commit
-
Convert the kobj_map code to use a mutex instead of a semaphore. It
converts the single two users as well, genhd.c and char_dev.c.Signed-off-by: Jes Sorensen
Signed-off-by: Andrew Morton
Signed-off-by: Greg Kroah-Hartman
15 Jan, 2006
1 commit
-
A Christoph suggested that the /proc/devices file be converted to use the
seq_file interface. This patch does that.I've obxerved one or two installation that had sufficiently large sans that
they overran the 4k limit on /proc/devices.Signed-off-by: Neil Horman
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Jan, 2006
1 commit
-
Leave the overloaded "hotplug" word to susbsystems which are handling
real devices. The driver core does not "plug" anything, it just exports
the state to userspace and generates events.Signed-off-by: Kay Sievers
Signed-off-by: Greg Kroah-Hartman
12 Nov, 2005
1 commit
-
Use the symbolic name where appropriate and add a comment to the
disk_stats structure.Signed-off-by: Jens Axboe
04 Nov, 2005
1 commit
-
drivers/block/ is right now a mix of core and driver parts. Lets move
the core parts to a new top level directory. Al will move the fs/
related block parts to block/ next.Signed-off-by: Jens Axboe