An error occurred fetching the project authors.
  1. 27 Apr, 2003 1 commit
    • Alexander Viro's avatar
      [PATCH] bdget_disk() · 07affbb1
      Alexander Viro authored
      	New helper - bdget_disk(gendisk, partition)
      	invalidate_device() replaced with invalidate_partition(disk, part)
      07affbb1
  2. 23 Apr, 2003 1 commit
  3. 20 Apr, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] Aggregated disk statistics · 34221611
      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
      34221611
    • Andrew Morton's avatar
      [PATCH] Allocate hd_structs dynamically · 5fb58500
      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.
      5fb58500
  4. 04 Apr, 2003 1 commit
  5. 22 Mar, 2003 3 commits
    • Andrew Morton's avatar
      [PATCH] make the bdevname() API sane · 500b81a8
      Andrew Morton authored
      bdevname returns a pointer to a static string.  Change it so that the caller
      passes in the buffer.
      500b81a8
    • Andrew Morton's avatar
      [PATCH] register_blkdev() fixes · b548867b
      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.
      b548867b
    • Andrew Morton's avatar
      [PATCH] __bdevname atomicity fix · 17817dc3
      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.
      17817dc3
  6. 18 Mar, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] Add error checking get_disk() · d99c48c6
      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)
      d99c48c6
  7. 10 Mar, 2003 1 commit
    • Christoph Hellwig's avatar
      [PATCH] remove devfs_only() · c8eddecf
      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.
      c8eddecf
  8. 08 Mar, 2003 2 commits
    • Andrew Morton's avatar
      [PATCH] Make diskstats per-cpu using kmalloc_percpu · 83bfc5dd
      Andrew Morton authored
      Patch from Ravikiran G Thirumalai <kiran@in.ibm.com>
      
      Makes the disk stats on struct gendisk per-cpu.
      83bfc5dd
    • Andrew Morton's avatar
      [PATCH] register_blkdev cleanups · 9a64905a
      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.
      9a64905a
  9. 25 Feb, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] remove MAX_BLKDEV from genhd.c · 7bc4777d
      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".
      7bc4777d
  10. 12 Feb, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] genhd warnings fix · d89ff79e
      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.
      d89ff79e
  11. 11 Feb, 2003 1 commit
  12. 13 Jan, 2003 1 commit
    • Jens Axboe's avatar
      [PATCH] rbtree core for io scheduler · 68fc0a78
      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?
      68fc0a78
  13. 09 Jan, 2003 1 commit
  14. 06 Jan, 2003 2 commits
    • Patrick Mochel's avatar
      block devices: use list and lock in block_subsys, instead of those defined in genhd.c. · 426f67eb
      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.
      426f67eb
    • Patrick Mochel's avatar
      kobjects: Remove kobject::subsys and subsystem::kobj. · 85e865ec
      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.
      85e865ec
  15. 04 Jan, 2003 1 commit
    • Patrick Mochel's avatar
      kobject: Introduce struct kobj_type. · 23066070
      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. 
      23066070
  16. 30 Dec, 2002 1 commit
  17. 29 Dec, 2002 1 commit
  18. 04 Dec, 2002 1 commit
  19. 25 Nov, 2002 1 commit
    • Patrick Mochel's avatar
      fix up block device usage of kobjects. · b26ca10f
      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. 
      b26ca10f
  20. 10 Nov, 2002 1 commit
  21. 04 Nov, 2002 1 commit
  22. 31 Oct, 2002 2 commits
  23. 29 Oct, 2002 1 commit
    • Alexander Viro's avatar
      [PATCH] gendisk fixes · 22dda8bf
      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().
      22dda8bf
  24. 28 Oct, 2002 3 commits
  25. 18 Oct, 2002 1 commit
    • Alexander Viro's avatar
      [PATCH] probes · 48149ec3
      Alexander Viro authored
      	introduced blk_register_region() and blk_unregister_region()
      	removed blk_set_probe()
      	switched to almost final variant of get_gendisk()
      48149ec3
  26. 15 Oct, 2002 5 commits
    • Alexander Viro's avatar
      [PATCH] bdev->bd_disk introduced · 5682bcc6
      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...
      5682bcc6
    • Alexander Viro's avatar
      [PATCH] refcounts for gendisks · 68c16870
      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.
      68c16870
    • Alexander Viro's avatar
      [PATCH] preparation to use of driverfs refcounts, part 2 - disk · b288f6ad
      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.
      b288f6ad
    • Alexander Viro's avatar
      [PATCH] disk->minor_shift cleanup · 847c633a
      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.
      847c633a
    • Alexander Viro's avatar
      [PATCH] early allocation of ->part · b8ed1788
      Alexander Viro authored
      allocation of ->part[] moved to alloc_disk(); alloc_disk() got an
      argument (number of minors expected).  Freeing is in put_disk().
      b8ed1788
  27. 09 Oct, 2002 2 commits
    • Christoph Hellwig's avatar
      [PATCH] initcalls for ATM · f1556f64
      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.
      f1556f64
    • Andrew Morton's avatar
      [PATCH] 64-bit sector_t - printk changes and sector_t cleanup · be48ef9e
      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.
      be48ef9e