Skip to content

Commit

Permalink
sunvdc: don't call VD_OP_GET_VTOC
Browse files Browse the repository at this point in the history
[ Upstream commit 85b0c6e ]

The VD_OP_GET_VTOC operation will succeed only if the vdisk backend has a
VTOC label, otherwise it will fail. In particular, it will return error
48 (ENOTSUP) if the disk has an EFI label. VTOC disk labels are already
handled by directly reading the disk in block/partitions/sun.c (enabled by
CONFIG_SUN_PARTITION which defaults to y on SPARC). Since port->label is
unused in the driver, remove the call and the field.

Signed-off-by: Dwight Engen <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
Dwight Engen authored and gregkh committed Nov 21, 2014
1 parent 891b605 commit df6329d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions drivers/block/sunvdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ struct vdc_port {
u8 vdisk_mtype;

char disk_name[32];

struct vio_disk_vtoc label;
};

static inline struct vdc_port *to_vdc_port(struct vio_driver_state *vio)
Expand Down Expand Up @@ -710,13 +708,6 @@ static int probe_disk(struct vdc_port *port)
if (comp.err)
return comp.err;

err = generic_request(port, VD_OP_GET_VTOC,
&port->label, sizeof(port->label));
if (err < 0) {
printk(KERN_ERR PFX "VD_OP_GET_VTOC returns error %d\n", err);
return err;
}

if (vdc_version_supported(port, 1, 1)) {
/* vdisk_size should be set during the handshake, if it wasn't
* then the underlying disk is reserved by another system
Expand Down

0 comments on commit df6329d

Please sign in to comment.