1. 24 4月, 2017 1 次提交
    • J
      lightnvm: pblk: fix erase counters on error fail · a44f53fa
      Javier González 提交于
      When block erases fail, these blocks are marked bad. The number of valid
      blocks in the line was not updated, which could cause an infinite loop
      on the erase path.
      
      Fix this atomic counter and, in order to avoid taking an irq lock on the
      interrupt context, make the erase counters atomic too.
      
      Also, in the case that a significant number of blocks become bad in a
      line, the result is the double shared metadata buffer (emeta) to stop
      the pipeline until all metadata is flushed to the media. Increase the
      number of metadata lines from 2 to 4 to avoid this case.
      
      Fixes: a4bd217b "lightnvm: physical block device (pblk) target"
      Signed-off-by: NJavier González <javier@cnexlabs.com>
      Reviewed-by: NMatias Bjørling <matias@cnexlabs.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a44f53fa
  2. 17 4月, 2017 2 次提交
    • D
      lightnvm: pblk-gc: fix an error pointer dereference in init · 503ec94e
      Dan Carpenter 提交于
      These labels are reversed so we could end up dereferencing an error
      pointer or leaking.
      
      Fixes: 7f347ba6bb3a ("lightnvm: physical block device (pblk) target")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NMatias Bjørling <matias@cnexlabs.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      503ec94e
    • J
      lightnvm: physical block device (pblk) target · a4bd217b
      Javier González 提交于
      This patch introduces pblk, a host-side translation layer for
      Open-Channel SSDs to expose them like block devices. The translation
      layer allows data placement decisions, and I/O scheduling to be
      managed by the host, enabling users to optimize the SSD for their
      specific workloads.
      
      An open-channel SSD has a set of LUNs (parallel units) and a
      collection of blocks. Each block can be read in any order, but
      writes must be sequential. Writes may also fail, and if a block
      requires it, must also be reset before new writes can be
      applied.
      
      To manage the constraints, pblk maintains a logical to
      physical address (L2P) table,  write cache, garbage
      collection logic, recovery scheme, and logic to rate-limit
      user I/Os versus garbage collection I/Os.
      
      The L2P table is fully-associative and manages sectors at a
      4KB granularity. Pblk stores the L2P table in two places, in
      the out-of-band area of the media and on the last page of a
      line. In the cause of a power failure, pblk will perform a
      scan to recover the L2P table.
      
      The user data is organized into lines. A line is data
      striped across blocks and LUNs. The lines enable the host to
      reduce the amount of metadata to maintain besides the user
      data and makes it easier to implement RAID or erasure coding
      in the future.
      
      pblk implements multi-tenant support and can be instantiated
      multiple times on the same drive. Each instance owns a
      portion of the SSD - both regarding I/O bandwidth and
      capacity - providing I/O isolation for each case.
      
      Finally, pblk also exposes a sysfs interface that allows
      user-space to peek into the internals of pblk. The interface
      is available at /dev/block/*/pblk/ where * is the block
      device name exposed.
      
      This work also contains contributions from:
        Matias Bjørling <matias@cnexlabs.com>
        Simon A. F. Lund <slund@cnexlabs.com>
        Young Tack Jin <youngtack.jin@gmail.com>
        Huaicheng Li <huaicheng@cs.uchicago.edu>
      Signed-off-by: NJavier González <javier@cnexlabs.com>
      Signed-off-by: NMatias Bjørling <matias@cnexlabs.com>
      Signed-off-by: NJens Axboe <axboe@fb.com>
      a4bd217b
新手
引导
客服 返回
顶部