Commit 7707df48 authored by Changpeng Liu's avatar Changpeng Liu
Browse files

nvme/opal: remove the unnecessary geometry information



Also remove the unused ctx and a function declaration.

Change-Id: I2f76d5c4795a0bfa3c075a5be83a7be434df6a64
Signed-off-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1475


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
parent ebb01092
Loading
Loading
Loading
Loading
+0 −7
Original line number Original line Diff line number Diff line
@@ -39,8 +39,6 @@


typedef int (*spdk_opal_cb)(struct spdk_opal_dev *dev, void *ctx);
typedef int (*spdk_opal_cb)(struct spdk_opal_dev *dev, void *ctx);


static int opal_parse_and_check_status(struct spdk_opal_dev *dev, void *data);

static int
static int
opal_send_cmd(struct spdk_opal_dev *dev)
opal_send_cmd(struct spdk_opal_dev *dev)
{
{
@@ -759,11 +757,6 @@ static void
opal_check_geometry(struct spdk_opal_dev *dev, const void *data)
opal_check_geometry(struct spdk_opal_dev *dev, const void *data)
{
{
	const struct spdk_opal_d0_geo_feat *geo = data;
	const struct spdk_opal_d0_geo_feat *geo = data;
	uint64_t align = from_be64(&geo->alignment_granularity);
	uint64_t lowest_lba = from_be64(&geo->lowest_aligned_lba);

	dev->align = align;
	dev->lowest_lba = lowest_lba;


	dev->feat_info.geo = *geo;
	dev->feat_info.geo = *geo;
}
}
+0 −3
Original line number Original line Diff line number Diff line
@@ -275,8 +275,6 @@ struct spdk_opal_dev {
	uint16_t comid;
	uint16_t comid;
	uint32_t hsn;
	uint32_t hsn;
	uint32_t tsn;
	uint32_t tsn;
	uint64_t align;
	uint64_t lowest_lba;


	size_t cmd_pos;
	size_t cmd_pos;
	uint8_t cmd[IO_BUFFER_LENGTH];
	uint8_t cmd[IO_BUFFER_LENGTH];
@@ -291,7 +289,6 @@ struct spdk_opal_dev {
	struct spdk_opal_locking_range_info locking_ranges[SPDK_OPAL_MAX_LOCKING_RANGE];
	struct spdk_opal_locking_range_info locking_ranges[SPDK_OPAL_MAX_LOCKING_RANGE];


	pthread_mutex_t mutex_lock; /* some structs are accessed by current thread only */
	pthread_mutex_t mutex_lock; /* some structs are accessed by current thread only */
	void *ctx;  /* user context data */
};
};


#endif
#endif