OSDN Git Service

Merge branch 'for-5.5/drivers' into for-5.5/zoned
authorJens Axboe <axboe@kernel.dk>
Wed, 13 Nov 2019 02:11:30 +0000 (19:11 -0700)
committerJens Axboe <axboe@kernel.dk>
Wed, 13 Nov 2019 02:11:30 +0000 (19:11 -0700)
* for-5.5/drivers: (38 commits)
  null_blk: add zone open, close, and finish support
  dm: add zone open, close and finish support
  nvme: Fix parsing of ANA log page
  nvmet: stop using bio_set_op_attrs
  nvmet: add plugging for read/write when ns is bdev
  nvmet: clean up command parsing a bit
  nvme-pci: Spelling s/resdicovered/rediscovered/
  nvmet: fill discovery controller sn, fr and mn correctly
  nvmet: Open code nvmet_req_execute()
  nvmet: Remove the data_len field from the nvmet_req struct
  nvmet: Introduce nvmet_dsm_len() helper
  nvmet: Cleanup discovery execute handlers
  nvmet: Introduce common execute function for get_log_page and identify
  nvmet-tcp: Don't set the request's data_len
  nvmet-tcp: Don't check data_len in nvmet_tcp_map_data()
  nvme: Introduce nvme_lba_to_sect()
  nvme: Cleanup and rename nvme_block_nr()
  nvme: resync include/linux/nvme.h with nvmecli
  nvme: move common call to nvme_cleanup_cmd to core layer
  nvme: introduce "Command Aborted By host" status code
  ...

1  2 
drivers/block/null_blk_zoned.c
drivers/md/raid0.c
drivers/nvme/host/core.c
drivers/nvme/host/multipath.c
drivers/nvme/host/nvme.h
drivers/nvme/host/pci.c
drivers/nvme/host/rdma.c
drivers/nvme/host/tcp.c
drivers/nvme/target/loop.c

@@@ -141,8 -159,32 +159,31 @@@ static blk_status_t null_zone_mgmt(stru
                zone->cond = BLK_ZONE_COND_EMPTY;
                zone->wp = zone->start;
                break;
+       case REQ_OP_ZONE_OPEN:
+               if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)
+                       return BLK_STS_IOERR;
+               if (zone->cond == BLK_ZONE_COND_FULL)
+                       return BLK_STS_IOERR;
+               zone->cond = BLK_ZONE_COND_EXP_OPEN;
+               break;
+       case REQ_OP_ZONE_CLOSE:
+               if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)
+                       return BLK_STS_IOERR;
+               if (zone->cond == BLK_ZONE_COND_FULL)
+                       return BLK_STS_IOERR;
+               zone->cond = BLK_ZONE_COND_CLOSED;
+               break;
+       case REQ_OP_ZONE_FINISH:
+               if (zone->type == BLK_ZONE_TYPE_CONVENTIONAL)
+                       return BLK_STS_IOERR;
+               zone->cond = BLK_ZONE_COND_FULL;
+               zone->wp = zone->start + zone->len;
+               break;
        default:
 -              cmd->error = BLK_STS_NOTSUPP;
 -              break;
 +              return BLK_STS_NOTSUPP;
        }
        return BLK_STS_OK;
  }
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -2982,10 -2961,11 +2980,10 @@@ static int nvme_suspend(struct device *
  
                /*
                 * Clearing npss forces a controller reset on resume. The
-                * correct value will be resdicovered then.
+                * correct value will be rediscovered then.
                 */
 -              nvme_dev_disable(ndev, true);
 +              ret = nvme_disable_prepare_reset(ndev, true);
                ctrl->npss = 0;
 -              ret = 0;
        }
  unfreeze:
        nvme_unfreeze(ctrl);
Simple merge
Simple merge
Simple merge