1. 19 May, 2009 10 commits
    • Jens Axboe's avatar
      block: add warning to blk_make_request() · 53674ac5
      Jens Axboe authored
      Add a note about how one needs to be careful when setting up these bio
      chains.
      
      Extracted from Boaz's updated patch.
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      53674ac5
    • Boaz Harrosh's avatar
      block: Un-export blk_rq_append_bio · a411f4bb
      Boaz Harrosh authored
      OSD was the last in-tree user of blk_rq_append_bio(). Now
      that it is fixed blk_rq_append_bio is un-exported and
      is only used internally by block layer.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      a411f4bb
    • Boaz Harrosh's avatar
      libosd: Use of new blk_make_request · c29b70f6
      Boaz Harrosh authored
      Use new blk_make_request() to allocate a request from bio
      and avoid using deprecated blk_rq_append_bio().
      
      This patch is dependent on a block layer patch titled:
          [BLOCK] New blk_make_request() takes bio returns request
      
      This is the last usage of blk_rq_append_bio in osd, it can now
      be un-exported.
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      CC: Jeff Garzik <jeff@garzik.org>
      CC: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      c29b70f6
    • Boaz Harrosh's avatar
      block: Add blk_make_request(), takes bio, returns a request · 79eb63e9
      Boaz Harrosh authored
      New block API:
      given a struct bio allocates a new request. This is the parallel of
      generic_make_request for BLOCK_PC commands users.
      
      The passed bio may be a chained-bio. The bio is bounced if needed
      inside the call to this member.
      
      This is in the effort of un-exporting blk_rq_append_bio().
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      CC: Jeff Garzik <jeff@garzik.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      79eb63e9
    • Boaz Harrosh's avatar
      libosd: Use new blk_rq_map_kern · bc38bf10
      Boaz Harrosh authored
      Now that blk_rq_map_kern will append the buffer onto the
      request we can use it easily for adding extra segments
      (eg. attributes)
      
      This patch is dependent on a block layer patch titled:
         [BLOCK] allow blk_rq_map_kern to append to requests
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      bc38bf10
    • James Bottomley's avatar
      block: allow blk_rq_map_kern to append to requests · 3a5a3927
      James Bottomley authored
      Use blk_rq_append_bio() internally instead of blk_rq_bio_prep()
      so blk_rq_map_kern can be called multiple times, to map multiple
      buffers.
      
      This is in the effort to un-export blk_rq_append_bio()
      Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      3a5a3927
    • Miklos Szeredi's avatar
      splice: fix kmaps in default_file_splice_write() · b2858d7d
      Miklos Szeredi authored
      Unfortunately multiple kmap() within a single thread are deadlockable,
      so writing out multiple buffers with writev() isn't possible.
      
      Change the implementation so that it does a separate write() for each
      buffer.  This actually simplifies the code a lot since the
      splice_from_pipe() helper can be used.
      
      This limitation is caused by HIGHMEM pages, and so only affects a
      subset of architectures and configurations.  In the future it may be
      worth to implement default_file_splice_write() in a more efficient way
      on configs that allow it.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      b2858d7d
    • Tejun Heo's avatar
      bio: always copy back data for copied kernel requests · 4fc981ef
      Tejun Heo authored
      When a read bio_copy_kern() request fails, the content of the bounce
      buffer is not copied back.  However, as request failure doesn't
      necessarily mean complete failure, the buffer state can be useful.
      This behavior is also inconsistent with the user map counterpart and
      causes the subtle difference between bounced and unbounced IO causes
      confusion.
      
      This patch makes bio_copy_kern_endio() ignore @err and always copy
      back data on request completion.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      4fc981ef
    • Tejun Heo's avatar
      block: set rq->resid_len to blk_rq_bytes() on issue · 5f49f631
      Tejun Heo authored
      In commit c3a4d78c, while introducing
      rq->resid_len, the default value of residue count was changed from
      full count to zero.  The conversion was done under the assumption that
      when a request fails residue count wasn't defined.  However, Boaz and
      James pointed out that this wasn't true and the residue count should
      be preserved for failed requests too.
      
      This patchset restores the original behavior by setting rq->resid_len
      to blk_rq_bytes(rq) on request start and restoring explicit clearing
      in affected drivers.  While at it, take advantage of the fact that
      rq->resid_len is set to full count where applicable.
      
      * ide-cd: rq->resid_len cleared on pc success
      
      * mptsas: req->resid_len cleared on success
      
      * sas_expander: rsp/req->resid_len cleared on success
      
      * mpt2sas_transport: req->resid_len cleared on success
      
      * ide-cd, ide-tape, mptsas, sas_host_smp, mpt2sas_transport, ub: take
        advantage of initial full count to simplify code
      
      Boaz Harrosh spotted bug in resid_len initialization.  Fixed as
      suggested.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Acked-by: default avatarBorislav Petkov <petkovbb@googlemail.com>
      Cc: Boaz Harrosh <bharrosh@panasas.com>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Eric Moore <Eric.Moore@lsi.com>
      Cc: Darrick J. Wong <djwong@us.ibm.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      5f49f631
    • Tejun Heo's avatar
      ub: use __blk_end_request_all() · 3755100d
      Tejun Heo authored
      ub_end_rq() always tries to complete full request.  The @cmd_len
      parameter was there because rq->data_len used to be overwritten with
      residue count.  Drop @cmd_len and use __blk_end_request_all().
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      3755100d
  2. 18 May, 2009 3 commits
  3. 14 May, 2009 1 commit
  4. 13 May, 2009 1 commit
  5. 12 May, 2009 2 commits
  6. 11 May, 2009 23 commits
    • Miklos Szeredi's avatar
      splice: implement default splice_write method · 0b0a47f5
      Miklos Szeredi authored
      If f_op->splice_write() is not implemented, fall back to a plain write.
      Use vfs_writev() to write from the pipe buffers.
      
      This will allow splice on all filesystems and file types.  This
      includes "direct_io" files in fuse which bypass the page cache.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      0b0a47f5
    • Miklos Szeredi's avatar
      splice: implement default splice_read method · 6818173b
      Miklos Szeredi authored
      If f_op->splice_read() is not implemented, fall back to a plain read.
      Use vfs_readv() to read into previously allocated pages.
      
      This will allow splice and functions using splice, such as the loop
      device, to work on all filesystems.  This includes "direct_io" files
      in fuse which bypass the page cache.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      6818173b
    • Miklos Szeredi's avatar
      splice: implement pipe to pipe splicing · 7c77f0b3
      Miklos Szeredi authored
      Allow splice(2) to work when both the input and the output is a pipe.
      
      Based on the impementation of the tee(2) syscall, but instead of
      duplicating the buffer references move the buffers from the input pipe
      to the output pipe.
      
      Moving the whole buffer only succeeds if the full length of the buffer
      is spliced.  Otherwise duplicate the buffer, just like tee(2), set the
      length of the output buffer and advance the offset on the input
      buffer.
      
      Since splice is operating on two pipes, special care needs to be taken
      with locking to prevent AN ABBA deadlock.  Again this is done
      similarly to the tee(2) syscall, first preparing the input and output
      pipes so there's data to consume and space for that data, and then
      doing the move operation while holding both locks.
      
      If other processes are doing I/O on the same pipes parallel to the
      splice, then by the time both inodes are locked there might be no
      buffers left to move, or no space to move them to.  In this case retry
      the whole operation, including the preparation phase.  This could lead
      to starvation, but I'm not sure if that's serious enough to worry
      about.
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      7c77f0b3
    • FUJITA Tomonori's avatar
      block: move completion related functions back to blk-core.c · b1f74493
      FUJITA Tomonori authored
      Let's put the completion related functions back to block/blk-core.c
      where they have lived. We can also unexport blk_end_bidi_request() and
      __blk_end_bidi_request(), which nobody uses.
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      b1f74493
    • FUJITA Tomonori's avatar
      scsi: simplify the bidi completion · e6bb7a96
      FUJITA Tomonori authored
      Let's use blk_end_request_all() instead of blk_end_bidi_request().
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      e6bb7a96
    • FUJITA Tomonori's avatar
      block: let blk_end_request_all handle bidi requests · 1822952b
      FUJITA Tomonori authored
      blk_end_request_all() and __blk_end_request_all() should finish all
      bytes including bidi, by definition. That's what all bidi users need ,
      bidi requests must be complete as a whole (partial completion is
      impossible).
      Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      1822952b
    • Tejun Heo's avatar
      block: implement and enforce request peek/start/fetch · 9934c8c0
      Tejun Heo authored
      Till now block layer allowed two separate modes of request execution.
      A request is always acquired from the request queue via
      elv_next_request().  After that, drivers are free to either dequeue it
      or process it without dequeueing.  Dequeue allows elv_next_request()
      to return the next request so that multiple requests can be in flight.
      
      Executing requests without dequeueing has its merits mostly in
      allowing drivers for simpler devices which can't do sg to deal with
      segments only without considering request boundary.  However, the
      benefit this brings is dubious and declining while the cost of the API
      ambiguity is increasing.  Segment based drivers are usually for very
      old or limited devices and as converting to dequeueing model isn't
      difficult, it doesn't justify the API overhead it puts on block layer
      and its more modern users.
      
      Previous patches converted all block low level drivers to dequeueing
      model.  This patch completes the API transition by...
      
      * renaming elv_next_request() to blk_peek_request()
      
      * renaming blkdev_dequeue_request() to blk_start_request()
      
      * adding blk_fetch_request() which is combination of peek and start
      
      * disallowing completion of queued (not started) requests
      
      * applying new API to all LLDs
      
      Renamings are for consistency and to break out of tree code so that
      it's apparent that out of tree drivers need updating.
      
      [ Impact: block request issue API cleanup, no functional change ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
      Cc: Mike Miller <mike.miller@hp.com>
      Cc: unsik Kim <donari75@gmail.com>
      Cc: Paul Clements <paul.clements@steeleye.com>
      Cc: Tim Waugh <tim@cyberelk.net>
      Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Cc: David S. Miller <davem@davemloft.net>
      Cc: Laurent Vivier <Laurent@lvivier.info>
      Cc: Jeff Garzik <jgarzik@pobox.com>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      Cc: Borislav Petkov <petkovbb@googlemail.com>
      Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: Pierre Ossman <drzeus@drzeus.cx>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Stefan Weinhuber <wein@de.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      9934c8c0
    • Tejun Heo's avatar
      gdrom: dequeue in-flight request · 23430468
      Tejun Heo authored
      gdrom already dequeues and fully completes requests on normal path and
      the error paths can be easily converted to do so too.  Clean it up and
      dequeue requests on error paths too.
      
      While at it remove superflous blk_fs_request() && !blk_rq_sectors()
      condition check.
      
      [ Impact: dequeue in-flight request, cleanup ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Adrian McMenamin <adrian@mcmen.demon.co.uk>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      23430468
    • Tejun Heo's avatar
      block: convert to dequeueing model (easy ones) · 296b2f6a
      Tejun Heo authored
      plat-omap/mailbox, floppy, viocd, mspro_block, i2o_block and
      mmc/card/queue are already pretty close to dequeueing model and can be
      converted with simple changes.  Convert them.
      
      While at it,
      
      * xen-blkfront: !fs check moved downwards to share dequeue call with
        normal path.
      
      * mspro_block: __blk_end_request(..., blk_rq_cur_byte()) converted to
        __blk_end_request_cur()
      
      * mmc/card/queue: loop of __blk_end_request() converted to
        __blk_end_request_all()
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Alex Dubov <oakad@yahoo.com>
      Cc: Markus Lidel <Markus.Lidel@shadowconnect.com>
      Cc: Pierre Ossman <drzeus@drzeus.cx>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      296b2f6a
    • Tejun Heo's avatar
      z2ram: dequeue in-flight request · fb3ac7f6
      Tejun Heo authored
      z2ram processes requests one-by-one synchronously and can be easily
      converted to dequeueing model.  Convert it.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      fb3ac7f6
    • Tejun Heo's avatar
      jsflash: dequeue in-flight request · 6b0bf407
      Tejun Heo authored
      jsflash processes requests one-by-one synchronously from a kthread and
      can be easily converted to dequeueing model.  Convert it.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Pete Zaitcev <zaitcev@redhat.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      6b0bf407
    • Tejun Heo's avatar
      mtd_blkdevs: dequeue in-flight request · 1498ada7
      Tejun Heo authored
      mtd_blkdevs processes requests one-by-one synchronously from a kthread
      and can be easily converted to dequeueing model.  Convert it.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      1498ada7
    • Tejun Heo's avatar
      xd: dequeue in-flight request · bab2a807
      Tejun Heo authored
      xd processes requests one-by-one synchronously and can be easily
      converted to dequeueing model.  Convert it.
      
      While at it, use rq_cur_bytes instead of rq_bytes when checking for
      sector overflow.  This is for for consistency and better behavior for
      merged requests.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      bab2a807
    • Tejun Heo's avatar
      swim: dequeue in-flight request · 06b0608e
      Tejun Heo authored
      swim processes requests one-by-one synchronously and can easily be
      converted to dequeuing model.  Convert it.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Laurent Vivier <Laurent@lvivier.info>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      06b0608e
    • Tejun Heo's avatar
      amiflop: dequeue in-flight request · 9e31bebe
      Tejun Heo authored
      Request processing in amiflop is done sequentially in
      redo_fd_request() proper and redo_fd_request() can easily be converted
      to track in-flight request.  Remove CURRENT, track in-flight request
      directly and dequeue it when processing starts.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      9e31bebe
    • Tejun Heo's avatar
      ps3disk: dequeue in-flight request · 10e1e629
      Tejun Heo authored
      Other than in issue error paths, ps3disk always completely finishes
      fetched requests.  With full completion on error paths, it can be
      easily converted to dequeueing model.
      
      * After L1 r/w call failure, ps3disk_submit_request_sg() now fails the
        whole request.  Issue failure isn't likely to benefit from partial
        retry anyway and ps3disk uses full failure in completion error path
        too, so I don't think this amounts to any meaningful functionality
        loss.
      
      * flush completion is converted to _all for consistency.  It doesn't
        make any functional difference.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      10e1e629
    • Tejun Heo's avatar
      paride: dequeue in-flight request · b12d4f82
      Tejun Heo authored
      pd/pf/pcd have track in-flight request by pd/pf/pcd_req.  They can be
      converted to dequeueing model by updating fetching and completion
      paths.  Convert them.
      
      Note that removal of elv_next_request() call from pf_next_buf()
      doesn't make any functional difference.  The path is traveled only
      during partial completion of a request and elv_next_request() call
      must return the same request anyway.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Tim Waugh <tim@cyberelk.net>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      b12d4f82
    • Tejun Heo's avatar
      xsysace: dequeue in-flight request · 2d75ce08
      Tejun Heo authored
      xsysace already tracks in-flight request using ace->req.  Converting
      to dequeueing model is mostly a matter of adding dequeueing call after
      request fetching.  The only tricky part is handling CF removal which
      should complete both in flight and on queue requests.  Convert to
      dequeueing model.
      
      While at it, remove explicit blk_rq_cur_bytes() and use
      __blk_end_request_cur() instead.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Grant Likely <grant.likely@secretlab.ca>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      2d75ce08
    • Tejun Heo's avatar
      swim3: dequeue in-flight request · f4bd4b90
      Tejun Heo authored
      swim3 has at most single request in flight and already tracks it using
      fd_req.  Convert it to dequeuing model by updating request fetching
      and wrapping completion function.
      
      [ Impact: dequeue in-flight request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      f4bd4b90
    • Tejun Heo's avatar
      ataflop: dequeue and track in-flight request · a336ca6f
      Tejun Heo authored
      ataflop has single request in flight.  Till now, whenever it needs to
      access the in-flight request it called elv_next_request().  This patch
      makes ataflop track the in-flight request directly and dequeue it when
      processing starts.  The added complexity is minimal and this will help
      future block layer changes.
      
      [ Impact: dequeue in-flight request, one elv_next_request() per request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      a336ca6f
    • Tejun Heo's avatar
      hd: dequeue and track in-flight request · 8a12c4a4
      Tejun Heo authored
      hd has at most single request in flight.  Till now, whenever it needs
      to access the in-flight request it called elv_next_request().  This
      patch makes hd track the in-flight request directly and dequeue it
      when processing starts.  The added complexity is minimal and this will
      help future block layer changes.
      
      [ Impact: dequeue in-flight request, one elv_next_request() per request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      8a12c4a4
    • Tejun Heo's avatar
      mg_disk: dequeue and track in-flight request · 5b36ad60
      Tejun Heo authored
      mg_disk has at most single request in flight per device.  Till now,
      whenever it needs to access the in-flight request it called
      elv_next_request().  This patch makes mg_disk track the in-flight
      request directly using mg_host->req and dequeue it when processing
      starts.
      
      q->queuedata is set to mg_host so that mg_host can be determined
      without fetching request from the queue.
      
      [ Impact: dequeue in-flight request, one elv_next_request() per request ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: unsik Kim <donari75@gmail.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      5b36ad60
    • Tejun Heo's avatar
      mg_disk: fix queue hang / infinite retry on !fs requests · 9a8d23d8
      Tejun Heo authored
      Both request functions in mg_disk simply return when they encounter a
      !fs request, which means the request will never be cleared from the
      queue causing queue hang and indefinite retry of the request.  Fix it.
      
      While at it, flatten condition checks and add unlikely to !fs tests.
      
      [ Impact: fix possible queue hang / infinite retry of !fs requests ]
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: unsik Kim <donari75@gmail.com>
      Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
      9a8d23d8