1. 27 6月, 2006 8 次提交
  2. 01 6月, 2006 1 次提交
    • N
      [PATCH] md: Fix badness in sysfs_notify caused by md_new_event · c331eb04
      NeilBrown 提交于
      From: NeilBrown <neilb@suse.de>
      
      If an error is reported by a drive in a RAID array (which is done via
      bi_end_io - in interrupt context), we call md_error and md_new_event which
      calls sysfs_notify.  However sysfs_notify grabs a mutex and so cannot be
      called in interrupt context.
      
      This patch just creates a variant of md_new_event which avoids the sysfs
      call, and uses that.  A better fix for later is to arrange for the event to
      be called from user-context.
      
      Note: avoiding the sysfs call isn't a problem as an error will not, by
      itself, modify the sync_action attribute.  (We do still need to
      wake_up(&md_event_waiters) as an error by itself will modify /proc/mdstat).
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      c331eb04
  3. 27 5月, 2006 1 次提交
  4. 22 5月, 2006 1 次提交
  5. 20 4月, 2006 1 次提交
  6. 15 4月, 2006 1 次提交
    • N
      [PATCH] sysfs: Allow sysfs attribute files to be pollable · 4508a7a7
      NeilBrown 提交于
      It works like this:
        Open the file
        Read all the contents.
        Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
        When poll returns,
           close the file and go to top of loop.
         or lseek to start of file and go back to the 'read'.
      
      Events are signaled by an object manager calling
         sysfs_notify(kobj, dir, attr);
      
      If the dir is non-NULL, it is used to find a subdirectory which
      contains the attribute (presumably created by sysfs_create_group).
      
      This has a cost of one int  per attribute, one wait_queuehead per kobject,
      one int per open file.
      
      The name "sysfs_notify" may be confused with the inotify
      functionality.  Maybe it would be nice to support inotify for sysfs
      attributes as well?
      
      This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
      to be pollable
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4508a7a7
  7. 01 4月, 2006 1 次提交
  8. 28 3月, 2006 15 次提交
  9. 19 3月, 2006 1 次提交
  10. 04 2月, 2006 3 次提交
  11. 03 2月, 2006 3 次提交
  12. 17 1月, 2006 1 次提交
  13. 13 1月, 2006 1 次提交
  14. 10 1月, 2006 1 次提交
  15. 09 1月, 2006 1 次提交
    • C
      [PATCH] Add block_device_operations.getgeo block device method · a885c8c4
      Christoph Hellwig 提交于
      HDIO_GETGEO is implemented in most block drivers, and all of them have to
      duplicate the code to copy the structure to userspace, as well as getting
      the start sector.  This patch moves that to common code [1] and adds a
      ->getgeo method to fill out the raw kernel hd_geometry structure.  For many
      drivers this means ->ioctl can go away now.
      
      [1] the s390 block drivers are odd in this respect.  xpram sets ->start
          to 4 always which seems more than odd, and the dasd driver shifts
          the start offset around, probably because of it's non-standard
          sector size.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Cc: Jens Axboe <axboe@suse.de>
      Cc: <mike.miller@hp.com>
      Cc: Jeff Dike <jdike@addtoit.com>
      Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
      Cc: Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Russell King <rmk@arm.linux.org.uk>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: James Bottomley <James.Bottomley@steeleye.com>
      Signed-off-by: NAdrian Bunk <bunk@stusta.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      a885c8c4