1. 28 8月, 2006 1 次提交
    • N
      [PATCH] md: avoid backward event updates in md superblock when degraded. · 84692195
      NeilBrown 提交于
      If we
        - shut down a clean array,
        - restart with one (or more) drive(s) missing
        - make some changes
        - pause, so that they array gets marked 'clean',
      the event count on the superblock of included drives
      will be the same as that of the removed drives.
      So adding the removed drive back in will cause it
      to be included with no resync.
      
      To avoid this, we only update the eventcount backwards when the array
      is not degraded.  In this case there can (should) be no non-connected
      drives that we can get confused with, and this is the particular case
      where updating-backwards is valuable.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      84692195
  2. 11 7月, 2006 6 次提交
  3. 04 7月, 2006 1 次提交
    • I
      [PATCH] lockdep: annotate blkdev nesting · 663d440e
      Ingo Molnar 提交于
      Teach special (recursive) locking code to the lock validator.
      
      Effects on non-lockdep kernels:
      
      - the introduction of the following function variants:
      
        extern struct block_device *open_partition_by_devnum(dev_t, unsigned);
      
        extern int blkdev_put_partition(struct block_device *);
      
        static int
        blkdev_get_whole(struct block_device *bdev, mode_t mode, unsigned flags);
      
       which on non-lockdep are the same as open_by_devnum(), blkdev_put()
       and blkdev_get().
      
      - a subclass parameter to do_open(). [unused on non-lockdep]
      
      - a subclass parameter to __blkdev_put(), which is a new internal
        function for the main blkdev_put*() functions. [parameter unused
        on non-lockdep kernels, except for two sanity check WARN_ON()s]
      
      these functions carry no semantical difference - they only express
      object dependencies towards the lockdep subsystem.
      Signed-off-by: NIngo Molnar <mingo@elte.hu>
      Signed-off-by: NArjan van de Ven <arjan@linux.intel.com>
      Cc: Neil Brown <neilb@cse.unsw.edu.au>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      663d440e
  4. 01 7月, 2006 1 次提交
  5. 27 6月, 2006 21 次提交
  6. 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
  7. 27 5月, 2006 1 次提交
  8. 22 5月, 2006 1 次提交
  9. 20 4月, 2006 1 次提交
  10. 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
  11. 01 4月, 2006 1 次提交
  12. 28 3月, 2006 4 次提交