1. 21 May, 2019 1 commit
  2. 10 Nov, 2018 1 commit
  3. 13 Aug, 2018 1 commit
  4. 05 Jun, 2018 2 commits
  5. 14 May, 2018 2 commits
  6. 29 Jan, 2018 1 commit
  7. 21 Jun, 2017 1 commit
    • Bart Van Assche's avatar
      block: Make most scsi_req_init() calls implicit · ca18d6f7
      Bart Van Assche authored
      Instead of explicitly calling scsi_req_init() after blk_get_request(),
      call that function from inside blk_get_request(). Add an
      .initialize_rq_fn() callback function to the block drivers that need
      it. Merge the IDE .init_rq_fn() function into .initialize_rq_fn()
      because it is too small to keep it as a separate function. Keep the
      scsi_req_init() call in ide_prep_sense() because it follows a
      blk_rq_init() call.
      
      References: commit 82ed4db4 ("block: split scsi_request out of struct request")
      Signed-off-by: default avatarBart Van Assche <bart.vanassche@sandisk.com>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Hannes Reinecke <hare@suse.com>
      Cc: Omar Sandoval <osandov@fb.com>
      Cc: Nicholas Bellinger <nab@linux-iscsi.org>
      Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
      ca18d6f7
  8. 09 Jun, 2017 1 commit
    • Christoph Hellwig's avatar
      block: introduce new block status code type · 2a842aca
      Christoph Hellwig authored
      Currently we use nornal Linux errno values in the block layer, and while
      we accept any error a few have overloaded magic meanings.  This patch
      instead introduces a new  blk_status_t value that holds block layer specific
      status codes and explicitly explains their meaning.  Helpers to convert from
      and to the previous special meanings are provided for now, but I suspect
      we want to get rid of them in the long run - those drivers that have a
      errno input (e.g. networking) usually get errnos that don't know about
      the special block layer overloads, and similarly returning them to userspace
      will usually return somethings that strictly speaking isn't correct
      for file system operations, but that's left as an exercise for later.
      
      For now the set of errors is a very limited set that closely corresponds
      to the previous overloaded errno values, but there is some low hanging
      fruite to improve it.
      
      blk_status_t (ab)uses the sparse __bitwise annotations to allow for sparse
      typechecking, so that we can easily catch places passing the wrong values.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      2a842aca
  9. 20 Apr, 2017 2 commits
  10. 02 Mar, 2017 1 commit
  11. 31 Jan, 2017 2 commits
    • Christoph Hellwig's avatar
      block: fold cmd_type into the REQ_OP_ space · aebf526b
      Christoph Hellwig authored
      Instead of keeping two levels of indirection for requests types, fold it
      all into the operations.  The little caveat here is that previously
      cmd_type only applied to struct request, while the request and bio op
      fields were set to plain REQ_OP_READ/WRITE even for passthrough
      operations.
      
      Instead this patch adds new REQ_OP_* for SCSI passthrough and driver
      private requests, althought it has to add two for each so that we
      can communicate the data in/out nature of the request.
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      aebf526b
    • Christoph Hellwig's avatar
      ide: don't abuse cmd_type · 2f5a8e80
      Christoph Hellwig authored
      Currently the legacy ide driver defines several request types of it's own,
      which is in the way of removing that field entirely.
      
      Instead add a type field to struct ide_request and use that to distinguish
      the different types of IDE-internal requests.
      
      It's a bit of a mess, but so is the surrounding code..
      Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
      Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarJens Axboe <axboe@fb.com>
      2f5a8e80
  12. 27 Jan, 2017 1 commit
  13. 07 Nov, 2015 1 commit
  14. 05 May, 2015 1 commit
  15. 10 Jul, 2013 1 commit
  16. 20 Mar, 2012 1 commit
  17. 31 Oct, 2011 1 commit
  18. 31 Mar, 2011 1 commit
  19. 09 Aug, 2010 1 commit
    • Julia Lawall's avatar
      drivers/ide: Use memdup_user · 7d543d84
      Julia Lawall authored
      Use memdup_user when user data is immediately copied into the
      allocated region.
      
      The semantic patch that makes this change is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression from,to,size,flag;
      position p;
      identifier l1,l2;
      @@
      
      -  to = \(kmalloc@p\|kzalloc@p\)(size,flag);
      +  to = memdup_user(from,size);
         if (
      -      to==NULL
      +      IS_ERR(to)
                       || ...) {
         <+... when != goto l1;
      -  -ENOMEM
      +  PTR_ERR(to)
         ...+>
         }
      -  if (copy_from_user(to, from, size) != 0) {
      -    <+... when != goto l2;
      -    -EFAULT
      -    ...+>
      -  }
      // </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      7d543d84
  20. 06 Apr, 2010 1 commit
    • Mikulas Patocka's avatar
      ide: Fix IDE taskfile with cfq scheduler · 720fc22a
      Mikulas Patocka authored
      When ide taskfile access is being used (for example with hdparm --security
      commands) and cfq scheduler is selected, the scheduler crashes on BUG in
      cfq_put_request.
      
      The reason is that the cfq scheduler is tracking counts of read and write
      requests separately; the ide-taskfile subsystem allocates a read request and
      then flips the flag to make it a write request. The counters in cfq will
      mismatch.
      
      This patch changes ide-taskfile to allocate the READ or WRITE request as
      required and don't change the flag later.
      Signed-off-by: default avatarMikulas Patocka <mpatocka@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      720fc22a
  21. 07 Aug, 2009 4 commits
  22. 07 Jun, 2009 1 commit
  23. 17 May, 2009 1 commit
  24. 11 May, 2009 1 commit
  25. 28 Apr, 2009 1 commit
    • Tejun Heo's avatar
      ide-taskfile: don't abuse rq->buffer · d868ca24
      Tejun Heo authored
      Impact: rq->buffer usage cleanup
      
      ide_raw_taskfile() directly uses rq->buffer to carry pointer to the
      data buffer.  This complicates both block interface and ide backend
      request handling.  Use blk_rq_map_kern() instead and drop special
      handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg().
      
      Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it
      to initialize bio rw flag.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      d868ca24
  26. 18 Apr, 2009 1 commit
    • Tejun Heo's avatar
      ide-taskfile: don't abuse rq->buffer · eace4cb0
      Tejun Heo authored
      Impact: rq->buffer usage cleanup
      
      ide_raw_taskfile() directly uses rq->buffer to carry pointer to the
      data buffer.  This complicates both block interface and ide backend
      request handling.  Use blk_rq_map_kern() instead and drop special
      handling for REQ_TYPE_ATA_TASKFILE from ide_map_sg().
      
      Note that REQ_RW setting is moved upwards as blk_rq_map_kern() uses it
      to initialize bio rw flag.
      Signed-off-by: default avatarTejun Heo <tj@kernel.org>
      Cc: Jens Axboe <axboe@kernel.dk>
      eace4cb0
  27. 08 Apr, 2009 5 commits
  28. 31 Mar, 2009 2 commits