1. 27 6月, 2006 12 次提交
  2. 23 6月, 2006 1 次提交
  3. 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
  4. 27 5月, 2006 1 次提交
  5. 24 5月, 2006 1 次提交
    • N
      [PATCH] md: fix possible oops when starting a raid0 array · 5c4c3331
      NeilBrown 提交于
      This loop that sets up the hash_table has problems.
      
      Careful examination will show that the last time through, everything but
      the first line is pointless.  This is because all it does is change 'cur'
      and 'size' and neither of these are used after the loop.  This should ring
      warning bells...  That last time through the loop,
      
              size += conf->strip_zone[cur].size
      
      can index off the end of the strip_zone array.  Depending on what it finds
      there, it might exit the loop cleanly, or it might spin going further and
      further beyond the array until it hits an unmapped address.
      
      This patch rearranges the code so that the last, pointless, iteration of
      the loop never happens.  i.e.  the one statement of the last loop that is
      needed is moved the the end of the previous loop - or to before the loop
      starts - and the loop counter starts from 1 instead of 0.
      
      Cc: "Don Dupuis" <dondster@gmail.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      5c4c3331
  6. 22 5月, 2006 1 次提交
  7. 02 5月, 2006 5 次提交
  8. 20 4月, 2006 1 次提交
  9. 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
  10. 11 4月, 2006 1 次提交
    • N
      [PATCH] md: make sure 64bit fields in version-1 metadata are 64-bit aligned · 6f91fe88
      NeilBrown 提交于
      reshape_position is a 64bit field that was not 64bit aligned.  So swap with
      new_level.
      
      NOTE: this is a user-visible change.  However:
        - The bad code has not appeared in a released kernel
        - This code is still marked 'experimental'
        - This only affects version-1 superblock, which are not in wide use
        - These field are only used (rather than simply reported) by user-space
          tools in extemely rare circumstances : after a reshape crashes in the
          first second of the reshape process.
      
      So I believe that, at this stage, the change is safe.  Especially if people
      heed the 'help' message on use mdadm-2.4.1.
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      6f91fe88
  11. 02 4月, 2006 3 次提交
  12. 01 4月, 2006 5 次提交
  13. 28 3月, 2006 7 次提交