Changeset View
Changeset View
Standalone View
Standalone View
head/sys/geom/part/g_part.c
Show First 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | |||||
static u_int check_integrity = 1; | static u_int check_integrity = 1; | ||||
SYSCTL_UINT(_kern_geom_part, OID_AUTO, check_integrity, | SYSCTL_UINT(_kern_geom_part, OID_AUTO, check_integrity, | ||||
CTLFLAG_RWTUN, &check_integrity, 1, | CTLFLAG_RWTUN, &check_integrity, 1, | ||||
"Enable integrity checking"); | "Enable integrity checking"); | ||||
static u_int auto_resize = 1; | static u_int auto_resize = 1; | ||||
SYSCTL_UINT(_kern_geom_part, OID_AUTO, auto_resize, | SYSCTL_UINT(_kern_geom_part, OID_AUTO, auto_resize, | ||||
CTLFLAG_RWTUN, &auto_resize, 1, | CTLFLAG_RWTUN, &auto_resize, 1, | ||||
"Enable auto resize"); | "Enable auto resize"); | ||||
static u_int allow_nesting = 0; | |||||
SYSCTL_UINT(_kern_geom_part, OID_AUTO, allow_nesting, | |||||
CTLFLAG_RWTUN, &allow_nesting, 0, | |||||
"Allow additional levels of nesting"); | |||||
/* | /* | ||||
* The GEOM partitioning class. | * The GEOM partitioning class. | ||||
*/ | */ | ||||
static g_ctl_req_t g_part_ctlreq; | static g_ctl_req_t g_part_ctlreq; | ||||
static g_ctl_destroy_geom_t g_part_destroy_geom; | static g_ctl_destroy_geom_t g_part_destroy_geom; | ||||
static g_fini_t g_part_fini; | static g_fini_t g_part_fini; | ||||
static g_init_t g_part_init; | static g_init_t g_part_init; | ||||
▲ Show 20 Lines • Show All 2,112 Lines • ▼ Show 20 Lines | case BIO_WRITE: | ||||
return; | return; | ||||
case BIO_FLUSH: | case BIO_FLUSH: | ||||
break; | break; | ||||
case BIO_GETATTR: | case BIO_GETATTR: | ||||
if (g_handleattr_int(bp, "GEOM::fwheads", table->gpt_heads)) | if (g_handleattr_int(bp, "GEOM::fwheads", table->gpt_heads)) | ||||
return; | return; | ||||
if (g_handleattr_int(bp, "GEOM::fwsectors", table->gpt_sectors)) | if (g_handleattr_int(bp, "GEOM::fwsectors", table->gpt_sectors)) | ||||
return; | return; | ||||
if (g_handleattr_int(bp, "PART::isleaf", table->gpt_isleaf)) | /* | ||||
* allow_nesting overrides "isleaf" to false _unless_ the | |||||
* provider offset is zero, since otherwise we would recurse. | |||||
*/ | |||||
if (g_handleattr_int(bp, "PART::isleaf", | |||||
table->gpt_isleaf && | |||||
(allow_nesting == 0 || entry->gpe_offset == 0))) | |||||
return; | return; | ||||
if (g_handleattr_int(bp, "PART::depth", table->gpt_depth)) | if (g_handleattr_int(bp, "PART::depth", table->gpt_depth)) | ||||
return; | return; | ||||
if (g_handleattr_str(bp, "PART::scheme", | if (g_handleattr_str(bp, "PART::scheme", | ||||
table->gpt_scheme->name)) | table->gpt_scheme->name)) | ||||
return; | return; | ||||
if (g_handleattr_str(bp, "PART::type", | if (g_handleattr_str(bp, "PART::type", | ||||
G_PART_TYPE(table, entry, buf, sizeof(buf)))) | G_PART_TYPE(table, entry, buf, sizeof(buf)))) | ||||
▲ Show 20 Lines • Show All 139 Lines • Show Last 20 Lines |