An error occurred fetching the project authors.
- 27 Apr, 2003 1 commit
-
-
Alexander Viro authored
New helper - bdget_disk(gendisk, partition) invalidate_device() replaced with invalidate_partition(disk, part)
-
- 23 Apr, 2003 1 commit
-
-
Art Haas authored
-
- 20 Apr, 2003 2 commits
-
-
Andrew Morton authored
From: Rick Lindsley <ricklind@us.ibm.com> To access all the system's disk statitics we currently need to access one sysfs file per disk. This clearly will not be acceptable with thousands of disks. The patch aggregates the system-wide statistics in real time and exposes them via /proc/diskstats
-
Andrew Morton authored
From: Badari Pulavarty <pbadari@us.ibm.com> Here is the patch to allocate hd_struct dynamically as we find partitions. There are 3 things I didn't like in the patch. 1) The patch allocates 15 pointers instead of 15 hd_structs. (incase of s= csi). I was really hoping to get rid of "15" and make it really dynamic. (In ca= se if we ever want to support more than 15 partitions per disk etc..).=20 I was thought about making it a linked list, but blk_partition_remap() needs to get to hd_struct for a given partition everytime we do IO. So linked list would be bad, we really need direct access to partition in= fo. 2) I had to add "partno" to hd_struct, since part_dev_read() used to calc= ulate partition number from the address before. 3) kmalloc() failure in add_partition() will be silently ignored. It saves 2048 bytes per disk.
-
- 04 Apr, 2003 1 commit
-
-
Greg Kroah-Hartman authored
-
- 22 Mar, 2003 3 commits
-
-
Andrew Morton authored
bdevname returns a pointer to a static string. Change it so that the caller passes in the buffer.
-
Andrew Morton authored
- It was racy, if two threads try to register a blockdev with major=0 they could both choose the same major for different devices. Fix that by extending the coverage of the rwsem. - kmalloced local variable `p' was leaking on an error path.
-
Andrew Morton authored
This function was recently converted to use rwsem locking. But it is called from interrupts in (at least) buffer_io_error(). And we do want a function like this to be robust and atomic. So convert it to use spinlocking.
-
- 18 Mar, 2003 1 commit
-
-
Andrew Morton authored
Patch from Bob Miller <rem@osdl.org> The get_disk() function should check the return value from kobject_get() before passing it to to_disk(). This patch fixes this error. (Acked by Pat)
-
- 10 Mar, 2003 1 commit
-
-
Christoph Hellwig authored
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.
-
- 08 Mar, 2003 2 commits
-
-
Andrew Morton authored
Patch from Ravikiran G Thirumalai <kiran@in.ibm.com> Makes the disk stats on struct gendisk per-cpu.
-
Andrew Morton authored
Patch from Andries.Brouwer@cwi.nl The following patch does the following: - static const char *blkdevs[MAX_BLKDEV]; disappears - get_blkdev_list, (un)register_blkdev, __bdevname are moved from block_dev.c to genhd.c - the third "fops" parameter of register_blkdev was unused; now removed everywhere - zillions of places had printk("cannot get major") upon error return from register_blkdev; removed all of these and inserted a single printk in register_blkdev. Of course the reason for the patch is that one fixed size array is eliminated.
-
- 25 Feb, 2003 1 commit
-
-
Andrew Morton authored
Patch from Andries.Brouwer@cwi.nl A patch for genhd.c: - removed outdated comments - removed MAX_BLKDEV In genhd.c the variable MAX_BLKDEV was only the size of a hash table, so I made it MAX_PROBE_HASH. It can be 1, or 23, or 256, or whatever one wants. Note that the current setup requires that every device number in a given range is mapped by dev_to_index() to the same index in the hash table, so this routine will have to be adapted in case one wants to register multimajor ranges. Discussion is possible about whether struct blk_probe needs a dev_t or a kdev_t, but I left things this time. If a range can end at precisely the end of [k]dev_t space, the old code was wrong since (p->dev + p->range) would be 0. That is why "p->dev + p->range <= dev" was replaced by "p->dev + p->range - 1 < dev".
-
- 12 Feb, 2003 1 commit
-
-
Andrew Morton authored
I have a whole bunch of silly compile warning fixes here, arising from building the kernel for a 64-bit target. Some are trivial, some are genuine printk bugs. assuming dev_t is unsigned generates a warning on ppc64. Cast it.
-
- 11 Feb, 2003 1 commit
-
-
Andries E. Brouwer authored
-
- 13 Jan, 2003 1 commit
-
-
Jens Axboe authored
This patch has a bunch of io scheduler goodies that are, by now, well tested in -mm and by self and Nick Piggin. In order of interest: - Use rbtree data structure for sorting of requests. Even with the default queue lengths that are fairly short, this cuts a lot of run time for io scheduler intensive work loads. If we go to longer queue lengths, it very quickly becomes a necessity. - Add sysfs interface for the tunables. At the same time, finally kill the BLKELVGET/BLKELVSET completely. I made these return -ENOTTY in 2.5.1, but there are left-overs around the kernel. This old interface was never any good, it was centered around just one io scheduler. The io scheduler core itself has received count less hours of tuning by myself and Nick, should be in pretty good shape. Please apply. Andrew, I made some sysfs changes to the version from 2.5.56-mm1. It didn't even compile without warnings (or work, for that matter), as the sysfs store/show procedures needed updating. Hmm?
-
- 09 Jan, 2003 1 commit
-
-
Patrick Mochel authored
Remove @count and @off parameters from all show() and store() methods for sysfs attribute files.
-
- 06 Jan, 2003 2 commits
-
-
Patrick Mochel authored
Since block_subsys already contains a list and a lock, use those, instead of defining our own static ones. This allows struct gendisk::full_list to be removed. struct gendisk::list is also apparently unused, so it is removed also.
-
Patrick Mochel authored
The kobject core no longer references a subsystem directly through a kobject, instead using the kobject's dominant kset to reference the subsystem. The registrants of kobjects have been fixed up. To aid in this process, a few helpers were introdcuced: - kobj_set_kset_s(obj,subsys) - kset_set_kset_s(obj,subsys) - subsys_set_kset(obj,subsys) that set the kset ptr of embedded kobjects for objects that have different embedded types. See include/linux/kobject.h for more description and usage. struct subsystem::kobj is also removed, relying solely on a subsystem's embedded kset for hierarchy information. Since this requires modification of the subsystem declarations, a helper macro has been defined: decl_subsys(name,type) which initializes the name and ktype fields of the subsystem's embedded kset. All the subsystem declarations have been fixed up.
-
- 04 Jan, 2003 1 commit
-
-
Patrick Mochel authored
This is the first step in morphing struct subsystem into something meaningful. A subsystem is defined simply as a list of kobjects of a certain type, which is far too generic. A subsystem should be representative of a large entity of code (i.e. a subsystem of the kernel), not just a simple list. This changeset: - Creates struct kobj_type, a descriptor of the type a kobject is embedded in. - Extracts the fields that are specific to a particular object type from struct subsystem and puts them in struct kobj_type, which are - the object's release method. - the sysfs operations for the object type. - the default attributes of the object type. - Adds ptr to struct kobject to point to its type descriptor. - Converts the existing subsystem definitions to define struct kobj_type. struct kobj_type's are not registered, as they do not have any explicit representation in the object hierarchy, nor do they have any fields that need runtime initialization. A kobject's ktype should be set when it is registered, like its subsystem. Note this obviates the need for defining a struct subsystem when an object type does not need to be kept in a global list.
-
- 30 Dec, 2002 1 commit
-
-
Christoph Hellwig authored
completly remove the old try_inc_mod_count()
-
- 29 Dec, 2002 1 commit
-
-
Christoph Hellwig authored
A second start at removing them from kernel/*.c and fs/*.c. Note that module_put is fine for a NULL argument.
-
- 04 Dec, 2002 1 commit
-
-
David S. Miller authored
-
- 25 Nov, 2002 1 commit
-
-
Patrick Mochel authored
alloc_disk() should set the kobject's subsystem before calling kobject_init(), which would increment the subsystem's refcount (to be decremented in kobject_cleanup()). Since it was being set after the call, the subsystem's refcount was being pushed to 0 if the floppy driver was enabled, but there were no floppy drives found (the driver would alloc_disk(), then put_disk() if no drives were found). Partitions use kobject_register(), so they don't have to do kobject_init() (it's done for them). add_disk() should use kobject_add() instead of kobject_register(), since it's already done kobject_init() in alloc_disk(). Also, del_gendisk() doesn't have to do extra refcount and call kobject_unregister(); it should just call kobject_del(). The block device will be freed up later when put_disk() pushes the refcount to 0.
-
- 10 Nov, 2002 1 commit
-
-
Andrew Morton authored
Patch from Lev Makhlis <mlev@despammed.com> The disk accounting will overflow after 4,000,000 seconds. Extend that by a factor of 1000.
-
- 04 Nov, 2002 1 commit
-
-
Rusty Russell authored
The old form of designated initializers are obsolete: we need to replace them with the ISO C forms before 2.6. Gcc has always supported both forms anyway.
-
- 31 Oct, 2002 2 commits
-
-
Patrick Mochel authored
-
Patrick Mochel authored
-
- 29 Oct, 2002 1 commit
-
-
Alexander Viro authored
- fixes an idiocy with floppy_find() et.al. - they forgot to set *part to 0. As the result, open() on anything other than fd0 had lead to interesting effects... - fixes off-by-1 in set_disk_ro().
-
- 28 Oct, 2002 3 commits
-
-
Alexander Viro authored
* 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
-
Alexander Viro authored
-
Alexander Viro authored
* per-major array eliminated, every disk is a separate source of randomness
-
- 18 Oct, 2002 1 commit
-
-
Alexander Viro authored
introduced blk_register_region() and blk_unregister_region() removed blk_set_probe() switched to almost final variant of get_gendisk()
-
- 15 Oct, 2002 5 commits
-
-
Alexander Viro authored
There we go - now we can put a reference to gendisk into block_device. Which we do in do_open(). Most of the callers of get_gendisk() are simply using bdev->bd_disk now (and most of the put_disk() calls introduced on previous step disappear). We also put that pointer into struct request - ->rq_disk. That allows to get rid of disk_index() kludges in md.c (we simply count relevant IO in the struct gendisk fields) and kill the export of get_gendisk(). Notice that by now we can move _all_ IO counters into gendisk. That will kill a bunch of per-major arrays and more importantly, allow to merge sard in clean way. FWIW, we probably could show them as disk/partitions attributes in driverfs...
-
Alexander Viro authored
Finally. We use disk->dev.refcount as a gendisk refcount. New helper - get_disk(): atomic_inc on refcount. get_gendisk() does it on return, callers of get_gendisk() do put_disk() when they are done.
-
Alexander Viro authored
* disk->disk_dev is initialized in alloc_disk(), device_add()'d in add_disk(), device_del()'d in unregister_disk() and device_put() in put_disk(). * devices of partitions are made its children. * attributes of disk one: dev (dev_t of the thing), range (number of minors) and size (in sectors). * attributes of partition ones: dev (ditto), start (in sectors) and size (in sectors). * disk devices are put on a new bus - "block" * if caller of add_disk() had set disk->driverfs_dev, we set symlinks: "device" from disk to underlying device and "block" from underlying device to disk. * ->release() of disk_dev frees disk and disk->part. At that point we have sane driverfs subtree for each gendisk and refcount of its root (disk->disk_dev) can act as gendisk refcount.
-
Alexander Viro authored
new field - disk->minors (1 << disk->minor_shift). Almost all uses of ->minor_shift had that form and thus had been replaced.
-
Alexander Viro authored
allocation of ->part[] moved to alloc_disk(); alloc_disk() got an argument (number of minors expected). Freeing is in put_disk().
-
- 09 Oct, 2002 2 commits
-
-
Christoph Hellwig authored
Switch over ATM code to initcalls and reorder the makefile so that link order inside atm is the same. I've also cleaned up the makefile a bit while at it. I didn't fix the existing compilation problems in the drivers (cli & friends) and the broken le/be firmware selection for the fore200e cards (kbuild breakage) though.
-
Andrew Morton authored
From Peter Chubb printk changes: A sector_t can be either 64 or 32 bits, so cast it to a printable type that is at least as large as 64-bits on all platforms (i.e., cast to unsigned long long and use a %llu format) Transition to 64-bit sector_t: fix isofs_get_blocks by converting the (possibly 64-bit) arg to a long. SCSI 64-bit sector_t cleanup: capacity now stored as sector_t; make sure that the READ_CAPACITY command doesn't sign-extend its returned value; avoid 64-bit division when printing size in MB. Still to do: - 16-byte SCSI commands - Individual scsi drivers.
-