1. 28 7月, 2010 1 次提交
  2. 02 5月, 2010 1 次提交
  3. 11 4月, 2010 1 次提交
  4. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  5. 27 2月, 2010 1 次提交
    • R
      PM: Allow SCSI devices to suspend/resume asynchronously · 4cb077d9
      Rafael J. Wysocki 提交于
      Set power.async_suspend for all SCSI devices, targets and hosts, so
      that they can be suspended and resumed in parallel with the main
      suspend/resume thread and possibly with other devices they don't
      depend on in a known way (i.e. devices which are not their parents or
      children).
      
      The power.async_suspend flag is also set for devices that don't have
      suspend or resume callbacks, because otherwise they would make the
      main suspend/resume thread wait for their "asynchronous" children
      (during suspend) or parents (during resume), effectively negating the
      possible gains from executing these devices' suspend and resume
      callbacks asynchronously.
      Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
      4cb077d9
  6. 19 2月, 2010 1 次提交
  7. 05 12月, 2009 2 次提交
    • V
      [SCSI] add queue_depth ramp up code · 4a84067d
      Vasu Dev 提交于
      Current FC HBA queue_depth ramp up code depends on last queue
      full time. The sdev already  has last_queue_full_time field to
      track last queue full time but stored value is truncated by
      last four bits.
      
      So this patch updates last_queue_full_time without truncating
      last 4 bits to store full value and then updates its only
      current usages in scsi_track_queue_full to ignore last four bits
      to keep current usages same while also use this field
      in added ramp up code.
      
      Adds scsi_handle_queue_ramp_up to ramp up queue_depth on
      successful completion of IO. The scsi_handle_queue_ramp_up will
      do ramp up on all luns of a target, just same as ramp down done
      on all luns on a target.
      
      The ramp up is skipped in case the change_queue_depth is not
      supported by LLD or already reached to added max_queue_depth.
      
      Updates added max_queue_depth on every new update to default
      queue_depth value.
      
      The ramp up is also skipped if lapsed time since either last
      queue ramp up or down is less than LLD specified
      queue_ramp_up_period.
      
      Adds queue_ramp_up_period to sysfs but only if change_queue_depth
      is supported since ramp up and queue_ramp_up_period is needed only
      in case change_queue_depth is supported first.
      
      Initializes queue_ramp_up_period to 120HZ jiffies as initial
      default value, it is same as used in existing lpfc and qla2xxx.
      
      -v2
       Combined all ramp code into this single patch.
      
      -v3
       Moves max_queue_depth initialization after slave_configure is
      called from after slave_alloc calling done. Also adjusted
      max_queue_depth check to skip ramp up if current queue_depth
      is >= max_queue_depth.
      
      -v4
       Changes sdev->queue_ramp_up_period unit to ms when using sysfs i/f
      to store or show its value.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Tested-by: NChristof Schmitt <christof.schmitt@de.ibm.com>
      Tested-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      4a84067d
    • M
      [SCSI] modify change_queue_depth to take in reason why it is being called · e881a172
      Mike Christie 提交于
      This patch modifies scsi_host_template->change_queue_depth so that
      it takes an argument indicating why it is being called. This will be
      used so that if a LLD needs to do some extra processing when
      handling queue fulls or later ramp ups, it can do so.
      
      This is a simple port of the drivers setting a change_queue_depth
      callback. In the patch I just have these LLDs adjust the queue depth
      if the user was requesting it.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      
      [Vasu.Dev: v2
      	Also converted pmcraid_change_queue_depth and then verified
      all modules compile  using "make allmodconfig" for any new build
      warnings on X86_64.
      
      	Updated original description after combing two original
      patches from Mike to make this patch git bisectable.]
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      [jejb: fixed up 53c700]
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e881a172
  8. 26 11月, 2009 1 次提交
    • J
      [SCSI] fix async scan add/remove race resulting in an oops · 860dc736
      James Bottomley 提交于
      Async scanning introduced a very wide window where the SCSI device is
      up and running but has not yet been added to sysfs.  We delay the
      adding until all scans have completed to retain the same ordering as
      sync scanning.
      
      This delay in visibility causes an oops if a device is removed before
      we make it visible because the SCSI removal routines have an inbuilt
      assumption that if a device is in SDEV_RUNNING state, it must be
      visible (which is not necessarily true in the async scanning case).
      
      Fix this by introducing an additional is_visible flag which we can use
      to condition the tear down so we do the right thing for running but
      not yet made visible.
      Reported-by: NAlexey Kuznetsov <kuznet@ms2.inr.ac.ru>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      860dc736
  9. 14 10月, 2009 1 次提交
    • J
      [SCSI] fix memory leak in initialization · 37e6ba00
      James Bottomley 提交于
      The root cause of the problem is the fact that dev_set_name() now
      allocates storage instead of using the original array within the kobj.
      That means that the SCSI assumption that if you haven't made the
      containing object or any sub objects visible, you can just destroy it
      (and its component devices) lock stock and barrel becomes false.
      
      Fix this by doing the get of sdev_dev at parent time and thus do an
      extra put of it in scsi_destroy_sdev() (and all other destruction
      without add paths).
      Reported-by: NTetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      37e6ba00
  10. 16 9月, 2009 1 次提交
  11. 22 6月, 2009 1 次提交
  12. 13 3月, 2009 1 次提交
  13. 03 1月, 2009 1 次提交
  14. 09 10月, 2008 1 次提交
  15. 04 10月, 2008 1 次提交
  16. 27 7月, 2008 1 次提交
  17. 05 6月, 2008 1 次提交
  18. 24 5月, 2008 1 次提交
    • J
      [SCSI] fix intermittent oops in scsi_bus_uevent · 1f42ea7b
      James Bottomley 提交于
      Reported-by: NSitsofe Wheeler <sitsofe@yahoo.com>
      > BUG: unable to handle kernel paging request at e6f17fac
      > IP: [<c02604d6>] scsi_bus_uevent+0x1/0x17
      > *pde = 2714b163 *pte = 26f17160
      > Oops: 0000 [#1] DEBUG_PAGEALLOC
      > last sysfs file:
      >
      > Pid:  1, comm: swapper Not tainted (2.6.26-rc2-next-20080516skw #30)
      > EIP: 0060:[<c02604d6>] EFLAGS: 00010282 CPU: 0
      > EIP is at scsi_bus_uevent+0x1/0x17
      > EAX: e6f18014 EBX: e6f18014 ECX: c02604d5 EDX: e7173000
      > ESI: e7173000 EDI: e7173000 EBP: e7851ca0 ESP: e7851c90
      >  DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      
      The problem is caused by:
      
      commit b0ed4336
      Author: Hannes Reinecke <hare@suse.de>
      Date:   Tue Mar 18 14:32:28 2008 +0100
      
          [SCSI] add scsi_host and scsi_target to scsi_bus
      
      which added scsi_bus_type to the struct scsi_target device.  This
      causes both the scsi_device and scsi_target to fire scsi_bus_uevents.
      However, the actualy scsi_bus_uevent() call assumes blindly that it's
      a struct scsi_device.  Check for this and return immediately if it
      isn't.
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      1f42ea7b
  19. 23 4月, 2008 4 次提交
  20. 20 4月, 2008 1 次提交
  21. 27 3月, 2008 1 次提交
  22. 14 3月, 2008 1 次提交
  23. 24 1月, 2008 1 次提交
  24. 03 1月, 2008 1 次提交
  25. 04 11月, 2007 1 次提交
  26. 18 10月, 2007 1 次提交
  27. 13 10月, 2007 4 次提交
  28. 21 7月, 2007 1 次提交
    • J
      [SCSI] bsg: make class backlinks · 39dca558
      James Bottomley 提交于
      Currently, bsg doesn't make class backlinks (a process whereby you'd get
      a link to bsg in the device directory in the same way you get one for
      sg).  This is because the bsg device is uninitialised, so the class
      device has nothing it can attach to.  The fix is to make the bsg device
      point to the cdevice of the entity creating the bsg, necessitating
      changing the bsg_register_queue() prototype into a form that takes the
      generic device.
      Acked-by: NFUJITA Tomonori <tomof@acm.org>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      39dca558
  29. 20 7月, 2007 1 次提交
  30. 19 7月, 2007 1 次提交
  31. 22 5月, 2007 1 次提交
  32. 18 4月, 2007 1 次提交
    • M
      [SCSI] modalias for scsi devices · d7b8bcb0
      Michael Tokarev 提交于
      The following patch adds support for sysfs/uevent modalias
      attribute for scsi devices (like disks, tapes, cdroms etc),
      based on whatever current sd.c, sr.c, st.c and osst.c drivers
      supports.
      
      The modalias format is like this:
      
       scsi:type-0x04
      
      (for TYPE_WORM, handled by sr.c now).
      
      Several comments.
      
      o This hexadecimal type value is because all TYPE_XXX constants
        in include/scsi/scsi.h are given in hex, but __stringify() will
        not convert them to decimal (so it will NOT be scsi:type-4).
        Since it does not really matter in which format it is, while
        both modalias in module and modalias attribute match each other,
        I descided to go for that 0x%02x format (and added a comment in
        include/scsi/scsi.h to keep them that way), instead of changing
        them all to decimal.
      
      o There was no .uevent routine for SCSI bus.  It might be a good
        idea to add some more ueven environment variables in there.
      
      o osst.c driver handles tapes too, like st.c, but only SOME tapes.
        With this setup, hotplug scripts (or whatever is used by the
        user) will try to load both st and osst modules for all SCSI
        tapes found, because both modules have scsi:type-0x01 alias).
        It is not harmful, but one extra module is no good either.
        It is possible to solve this, by exporting more info in
        modalias attribute, including vendor and device identification
        strings, so that modalias becomes something like
          scsi:type-0x12:vendor-Adaptec LTD:device-OnStream Tape Drive
        and having that, match for all 3 attributes, not only device
        type.  But oh well, vendor and device strings may be large,
        and they do contain spaces and whatnot.
        So I left them for now, awaiting for comments first.
      Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      d7b8bcb0
  33. 21 3月, 2007 1 次提交
    • T
      [SCSI] sd: implement START/STOP management · c3c94c5a
      Tejun Heo 提交于
      Implement SBC START/STOP management.  sdev->mange_start_stop is added.
      When it's set to one, sd STOPs the device on suspend and shutdown and
      STARTs it on resume.  sdev->manage_start_stop defaults is in sdev
      instead of scsi_disk cdev to allow ->slave_config() override the
      default configuration but is exported under scsi_disk sysfs node as
      sdev->allow_restart is.
      
      When manage_start_stop is zero (the default value), this patch doesn't
      introduce any behavior change.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      
      Rejections fixed and
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      c3c94c5a