Print this page
NEX-14754 sd: get rid of ssd cruft
Reviewed by: Dan Fields <dan.fields@nexenta.com>
Reviewed by: Evan Layton <evan.layton@nexenta.com>
Reviewed by: Rick McNeal <rick.mcneal@nexenta.com>
Revert "Revert "6602 lofi should support labeled devices""
This reverts commit 21386c8bd8477810b291eee22e08f1382e70cdf3.
Revert "6602 lofi should support labeled devices"
This reverts commit 406fc5100dac8d225a315a6def6be8d628f34e24.
OS-92 NexentaStor 4.0.1-PASSIV-12022013: Cannot mount root after install
        
@@ -16,24 +16,30 @@
  * fields enclosed by brackets "[]" replaced with your own identifying
  * information: Portions Copyright [yyyy] [name of copyright owner]
  *
  * CDDL HEADER END
  */
+
 /*
- * Copyright 2016 Toomas Soome <tsoome@me.com>
  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  * Use is subject to license terms.
  */
 
+/*
+ * Copyright 2016 Toomas Soome <tsoome@me.com>
+ * Copyright 2017 Nexenta Systems, Inc.
+ */
+
 #ifndef _SYS_CMLB_H
 #define _SYS_CMLB_H
 
 #ifdef  __cplusplus
 extern "C" {
 #endif
 
 #include <sys/dktp/fdisk.h>
+#include <sys/sunddi.h>
 
 /*
  * structure used for getting phygeom and virtgeom from target driver
  */
 typedef struct cmlb_geom {
@@ -327,10 +333,30 @@
     boolean_t is_removable, boolean_t is_hotpluggable, char *node_type,
     int alter_behavior, cmlb_handle_t cmlbhandle, void *tg_cookie);
 
 
 /*
+ * cmlb_workaround_off_by_one:
+ *
+ *      Enables the workaround for the ancient off-by-one bug in sd.
+ *      See comment preceding cmlb_attach().
+ *
+ * Arguments
+ *      cmlbhandle      cmlb handle associated with device.
+ *
+ *
+ * Notes:
+ *      This should only be called by sd_unit_attach(), and only before
+ *      validating the label for the first time.
+ *
+ * Return values:
+ *      None.
+ */
+void
+cmlb_workaround_off_by_one(cmlb_handle_t cmlbhandle);
+
+/*
  * cmlb_validate:
  *
  *      Validates label.
  *
  * Arguments