Remove gpt_offset and related code. It was introduced for use
by the BSD scheme, ended up not to be needed. Remove to avoid abuse and to keep the bloat to a minimum.
This commit is contained in:
parent
ebe234793b
commit
832cdc2ca7
@ -701,14 +701,6 @@ g_part_ctl_create(struct gctl_req *req, struct g_part_parms *gpp)
|
||||
error = g_getattr("PART::depth", cp, &attr);
|
||||
table->gpt_depth = (!error) ? attr + 1 : 0;
|
||||
|
||||
/* If we're nested, get the absolute sector offset on disk. */
|
||||
if (table->gpt_depth) {
|
||||
error = g_getattr("PART::offset", cp, &attr);
|
||||
if (error)
|
||||
goto fail;
|
||||
table->gpt_offset = attr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Synthesize a disk geometry. Some partitioning schemes
|
||||
* depend on it and since some file systems need it even
|
||||
@ -1488,14 +1480,6 @@ g_part_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
|
||||
|
||||
table = gp->softc;
|
||||
|
||||
/* If we're nested, get the absolute sector offset on disk. */
|
||||
if (table->gpt_depth) {
|
||||
error = g_getattr("PART::offset", cp, &attr);
|
||||
if (error)
|
||||
goto fail;
|
||||
table->gpt_offset = attr;
|
||||
}
|
||||
|
||||
/*
|
||||
* Synthesize a disk geometry. Some partitioning schemes
|
||||
* depend on it and since some file systems need it even
|
||||
@ -1686,9 +1670,6 @@ g_part_start(struct bio *bp)
|
||||
return;
|
||||
if (g_handleattr_int(bp, "PART::depth", table->gpt_depth))
|
||||
return;
|
||||
if (g_handleattr_int(bp, "PART::offset",
|
||||
table->gpt_offset + entry->gpe_start))
|
||||
return;
|
||||
if (g_handleattr_str(bp, "PART::scheme",
|
||||
table->gpt_scheme->name))
|
||||
return;
|
||||
|
@ -104,13 +104,6 @@ struct g_part_table {
|
||||
*/
|
||||
uint32_t gpt_sectors;
|
||||
uint32_t gpt_heads;
|
||||
/*
|
||||
* gpt_offset holds the absolute block address of the scheme
|
||||
* on disk. Some partitioning schemes (historically) use
|
||||
* absolute addressing. Relative addresses are obtained by
|
||||
* subtracting gpt_offset from the absolute addresses.
|
||||
*/
|
||||
uint64_t gpt_offset;
|
||||
|
||||
int gpt_depth; /* Sub-partitioning level. */
|
||||
int gpt_isleaf:1; /* Cannot be sub-partitioned. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user