1. 02 6月, 2015 2 次提交
    • T
      writeback: move backing_dev_info->state into bdi_writeback · 4452226e
      Tejun Heo 提交于
      Currently, a bdi (backing_dev_info) embeds single wb (bdi_writeback)
      and the role of the separation is unclear.  For cgroup support for
      writeback IOs, a bdi will be updated to host multiple wb's where each
      wb serves writeback IOs of a different cgroup on the bdi.  To achieve
      that, a wb should carry all states necessary for servicing writeback
      IOs for a cgroup independently.
      
      This patch moves bdi->state into wb.
      
      * enum bdi_state is renamed to wb_state and the prefix of all enums is
        changed from BDI_ to WB_.
      
      * Explicit zeroing of bdi->state is removed without adding zeoring of
        wb->state as the whole data structure is zeroed on init anyway.
      
      * As there's still only one bdi_writeback per backing_dev_info, all
        uses of bdi->state are mechanically replaced with bdi->wb.state
        introducing no behavior changes.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Cc: Jens Axboe <axboe@kernel.dk>
      Cc: Wu Fengguang <fengguang.wu@intel.com>
      Cc: drbd-dev@lists.linbit.com
      Cc: Neil Brown <neilb@suse.de>
      Cc: Alasdair Kergon <agk@redhat.com>
      Cc: Mike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      4452226e
    • T
      page_writeback: revive cancel_dirty_page() in a restricted form · 11f81bec
      Tejun Heo 提交于
      cancel_dirty_page() had some issues and b9ea2515 ("page_writeback:
      clean up mess around cancel_dirty_page()") replaced it with
      account_page_cleaned() which makes the caller responsible for clearing
      the dirty bit; unfortunately, the planned changes for cgroup writeback
      support requires synchronization between dirty bit manipulation and
      stat updates.  While we can open-code such synchronization in each
      account_page_cleaned() callsite, that's gonna be unnecessarily awkward
      and verbose.
      
      This patch revives cancel_dirty_page() but in a more restricted form.
      All it does is TestClearPageDirty() followed by account_page_cleaned()
      invocation if the page was dirty.  This helper covers all
      account_page_cleaned() usages except for __delete_from_page_cache()
      which is a special case anyway and left alone.  As this leaves no
      module user for account_page_cleaned(), EXPORT_SYMBOL() is dropped
      from it.
      
      This patch just revives cancel_dirty_page() as a trivial wrapper to
      replace equivalent usages and doesn't introduce any functional
      changes.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      11f81bec
  2. 22 5月, 2015 2 次提交
    • C
      block, dm: don't copy bios for request clones · 5f1b670d
      Christoph Hellwig 提交于
      Currently dm-multipath has to clone the bios for every request sent
      to the lower devices, which wastes cpu cycles and ties down memory.
      
      This patch instead adds a new REQ_CLONE flag that instructs req_bio_endio
      to not complete bios attached to a request, which we set on clone
      requests similar to bios in a flush sequence.  With this change I/O
      errors on a path failure only get propagated to dm-multipath, which
      can then either resubmit the I/O or complete the bios on the original
      request.
      
      I've done some basic testing of this on a Linux target with ALUA support,
      and it survives path failures during I/O nicely.
      Signed-off-by: NChristoph Hellwig <hch@lst.de>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      5f1b670d
    • M
      block: remove management of bi_remaining when restoring original bi_end_io · 326e1dbb
      Mike Snitzer 提交于
      Commit c4cf5261 ("bio: skip atomic inc/dec of ->bi_remaining for
      non-chains") regressed all existing callers that followed this pattern:
       1) saving a bio's original bi_end_io
       2) wiring up an intermediate bi_end_io
       3) restoring the original bi_end_io from intermediate bi_end_io
       4) calling bio_endio() to execute the restored original bi_end_io
      
      The regression was due to BIO_CHAIN only ever getting set if
      bio_inc_remaining() is called.  For the above pattern it isn't set until
      step 3 above (step 2 would've needed to establish BIO_CHAIN).  As such
      the first bio_endio(), in step 2 above, never decremented __bi_remaining
      before calling the intermediate bi_end_io -- leaving __bi_remaining with
      the value 1 instead of 0.  When bio_inc_remaining() occurred during step
      3 it brought it to a value of 2.  When the second bio_endio() was
      called, in step 4 above, it should've called the original bi_end_io but
      it didn't because there was an extra reference that wasn't dropped (due
      to atomic operations being optimized away since BIO_CHAIN wasn't set
      upfront).
      
      Fix this issue by removing the __bi_remaining management complexity for
      all callers that use the above pattern -- bio_chain() is the only
      interface that _needs_ to be concerned with __bi_remaining.  For the
      above pattern callers just expect the bi_end_io they set to get called!
      Remove bio_endio_nodec() and also remove all bio_inc_remaining() calls
      that aren't associated with the bio_chain() interface.
      
      Also, the bio_inc_remaining() interface has been moved local to bio.c.
      
      Fixes: c4cf5261 ("bio: skip atomic inc/dec of ->bi_remaining for non-chains")
      Reviewed-by: NChristoph Hellwig <hch@lst.de>
      Reviewed-by: NJan Kara <jack@suse.cz>
      Signed-off-by: NMike Snitzer <snitzer@redhat.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      326e1dbb
  3. 06 5月, 2015 6 次提交
  4. 04 5月, 2015 1 次提交
  5. 02 5月, 2015 1 次提交
    • I
      rbd: end I/O the entire obj_request on error · 082a75da
      Ilya Dryomov 提交于
      When we end I/O struct request with error, we need to pass
      obj_request->length as @nr_bytes so that the entire obj_request worth
      of bytes is completed.  Otherwise block layer ends up confused and we
      trip on
      
          rbd_assert(more ^ (which == img_request->obj_request_count));
      
      in rbd_img_obj_callback() due to more being true no matter what.  We
      already do it in most cases but we are missing some, in particular
      those where we don't even get a chance to submit any obj_requests, due
      to an early -ENOMEM for example.
      
      A number of obj_request->xferred assignments seem to be redundant but
      I haven't touched any of obj_request->xferred stuff to keep this small
      and isolated.
      
      Cc: Alex Elder <elder@linaro.org>
      Cc: stable@vger.kernel.org # 3.10+
      Reported-by: NShawn Edwards <lesser.evil@gmail.com>
      Reviewed-by: NSage Weil <sage@redhat.com>
      Signed-off-by: NIlya Dryomov <idryomov@gmail.com>
      082a75da
  6. 01 5月, 2015 5 次提交
  7. 30 4月, 2015 16 次提交
  8. 29 4月, 2015 4 次提交
  9. 28 4月, 2015 3 次提交
    • D
      drm/i915/chv: Implement WaDisableShadowRegForCpd · a04f90a3
      Deepak S 提交于
      This WA is avoid problem between shadow vs wake FIFO unload
      problem during CPD/RC6 transactions on CHV.
      
      v2: Define individual bits GTFIFOCTL (Ville)
      
      v3: move WA to uncore_early_sanitize (ville)
      Signed-off-by: NDeepak S <deepak.s@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      [Jani: fixed some whitespace issues while applying]
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      a04f90a3
    • R
      serial: samsung: fix serial console break · 31c6ba97
      Robert Baldyga 提交于
      This patch fixes problems with serial console break. When function
      s3c64xx_serial_startup() was started while serial console has been working,
      it caused lose of characters written to TX FIFO. This effect was particularly
      observable with systemd, which closes serial port every time when it's
      not currently needed, hence function s3c64xx_serial_startup() is called
      quite often there. To fix this problem we avoid resetting TX FIFO if port is
      used as serial console.
      
      Example of broken console log:
      
      [ 1086.7         Expecting device dev-ttySAC1.device...
      [ 1086.[  OK  ] Reached target Paths.
      [ 1086.756416] s[  OK  ] Reached target Swap.
      [ 1086.776413] systemd[1]: Reached target Swap.
      [ 1086.776642] systemd[1]: Starting Root Slice.
      [    5.53403[  OK  ] Created slice Root Slice.
      [    5.548433] systemd[1]: Create[  OK  ] Created slice User and Session Slice.
      [    5.568414] sys[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
      [    5.588388] s[  OK  ] Listening on Delayed Shutdown Socket.
      [    5.608376] sy[  OK  ] Listening on Journal Socket (/dev/log).
      [    5.628361] [  OK  ] Listening on udev Kernel Socket.
      [    5.648357] s[  OK  ] Listening on udev Control Socket.
      [    5.668353] s[  OK  ] Listening on Journal Socket.
      [    5.688366] systemd[1]: Listeni[  OK  ] Created slice System Slice.
      [    5.708393]          Mounting Temporary Directory...
      [ 7139.067436]          Starting prepare device daemon...
      [ 7139.091726] sy         Starting Generate environment from /etc/profile.d...
      [    5.792867] system         Starting Create Static Device Nodes in /dev...
      [ 7848.718         Mounting Debug File System...
      [ 7848.7384         Mounting Configuration File System...
      [    5.852         Starting Apply Kernel Variables...
      [    5.8720         Starting Setup Virtual Console...
      [ 7848.798         Starting udev Coldplug all Devices...
      [ 7848.817         Starting Journal Service...
      [  OK  ] Started Journal Service.
      [ 7848.854222] s[  OK  ] Reached target Slices.
               Starting Remount Root and Kernel File Systems...
      [  OK  ] Mounted Configuration File System.
      Reported-by: NChanwoo Choi <cw00.choi@samsung.com>
      Signed-off-by: NRobert Baldyga <r.baldyga@samsung.com>
      Reviewed-by: NPeter Hurley <peter@hurleysoftware.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      31c6ba97
    • L
      tty/serial: at91: maxburst was missing for dma transfers · a8d4e016
      Ludovic Desroches 提交于
      Maxburst was not set when doing the dma slave configuration. This value
      is checked by the recently introduced xdmac. It causes an error when
      doing the slave configuration and so prevents from using dma.
      Signed-off-by: NLudovic Desroches <ludovic.desroches@atmel.com>
      Cc: <stable@vger.kernel.org> # 3.12 and later
      Acked-by: NNicolas Ferre <nicolas.ferre@atmel.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      a8d4e016