Page MenuHomeFreeBSD

D13426.id49691.diff
No OneTemporary

D13426.id49691.diff

Index: head/sys/geom/geom.h
===================================================================
--- head/sys/geom/geom.h
+++ head/sys/geom/geom.h
@@ -215,8 +215,8 @@
TAILQ_ENTRY(g_provider) orphan;
off_t mediasize;
u_int sectorsize;
- u_int stripesize;
- u_int stripeoffset;
+ off_t stripesize;
+ off_t stripeoffset;
struct devstat *stat;
u_int nstart, nend;
u_int flags;
Index: head/sys/geom/geom_disk.h
===================================================================
--- head/sys/geom/geom_disk.h
+++ head/sys/geom/geom_disk.h
@@ -109,8 +109,8 @@
u_int d_fwheads;
u_int d_maxsize;
off_t d_delmaxsize;
- u_int d_stripeoffset;
- u_int d_stripesize;
+ off_t d_stripeoffset;
+ off_t d_stripesize;
char d_ident[DISK_IDENT_SIZE];
char d_descr[DISK_IDENT_SIZE];
uint16_t d_hba_vendor;
@@ -151,7 +151,8 @@
#define DISK_VERSION_03 0x5856105c
#define DISK_VERSION_04 0x5856105d
#define DISK_VERSION_05 0x5856105e
-#define DISK_VERSION DISK_VERSION_05
+#define DISK_VERSION_06 0x5856105f
+#define DISK_VERSION DISK_VERSION_06
#endif /* _KERNEL */
#endif /* _GEOM_GEOM_DISK_H_ */
Index: head/sys/geom/geom_dump.c
===================================================================
--- head/sys/geom/geom_dump.c
+++ head/sys/geom/geom_dump.c
@@ -64,8 +64,8 @@
{
sbuf_printf(sb, "z%p [shape=hexagon,label=\"%s\\nr%dw%de%d\\nerr#%d\\n"
- "sector=%u\\nstripe=%u\"];\n", pp, pp->name, pp->acr, pp->acw,
- pp->ace, pp->error, pp->sectorsize, pp->stripesize);
+ "sector=%u\\nstripe=%ju\"];\n", pp, pp->name, pp->acr, pp->acw,
+ pp->ace, pp->error, pp->sectorsize, (uintmax_t)pp->stripesize);
}
static void
@@ -216,8 +216,8 @@
sbuf_printf(sb, "\t <mediasize>%jd</mediasize>\n",
(intmax_t)pp->mediasize);
sbuf_printf(sb, "\t <sectorsize>%u</sectorsize>\n", pp->sectorsize);
- sbuf_printf(sb, "\t <stripesize>%u</stripesize>\n", pp->stripesize);
- sbuf_printf(sb, "\t <stripeoffset>%u</stripeoffset>\n", pp->stripeoffset);
+ sbuf_printf(sb, "\t <stripesize>%ju</stripesize>\n", (uintmax_t)pp->stripesize);
+ sbuf_printf(sb, "\t <stripeoffset>%ju</stripeoffset>\n", (uintmax_t)pp->stripeoffset);
if (pp->flags & G_PF_WITHER)
sbuf_printf(sb, "\t <wither/>\n");
else if (pp->geom->flags & G_GEOM_WITHER)
Index: head/sys/geom/geom_redboot.c
===================================================================
--- head/sys/geom/geom_redboot.c
+++ head/sys/geom/geom_redboot.c
@@ -246,7 +246,7 @@
int error, sectorsize, i;
struct fis_image_desc *fd, *head;
uint32_t offmask;
- u_int blksize; /* NB: flash block size stored as stripesize */
+ off_t blksize; /* NB: flash block size stored as stripesize */
u_char *buf;
off_t offset;
const char *value;
@@ -283,9 +283,9 @@
else
offmask = 0xffffffff; /* XXX */
if (bootverbose)
- printf("%s: mediasize %ld secsize %d blksize %d offmask 0x%x\n",
+ printf("%s: mediasize %ld secsize %d blksize %ju offmask 0x%x\n",
__func__, (long) cp->provider->mediasize, sectorsize,
- blksize, offmask);
+ (uintmax_t)blksize, offmask);
if (sectorsize < sizeof(struct fis_image_desc) ||
(sectorsize % sizeof(struct fis_image_desc)))
return (NULL);
Index: head/sys/geom/geom_subr.c
===================================================================
--- head/sys/geom/geom_subr.c
+++ head/sys/geom/geom_subr.c
@@ -1409,8 +1409,8 @@
gprintln(" geom: %s (%p)", pp->geom->name, pp->geom);
gprintln(" mediasize: %jd", (intmax_t)pp->mediasize);
gprintln(" sectorsize: %u", pp->sectorsize);
- gprintln(" stripesize: %u", pp->stripesize);
- gprintln(" stripeoffset: %u", pp->stripeoffset);
+ gprintln(" stripesize: %ju", (uintmax_t)pp->stripesize);
+ gprintln(" stripeoffset: %ju", (uintmax_t)pp->stripeoffset);
gprintln(" access: r%dw%de%d", pp->acr, pp->acw,
pp->ace);
gprintln(" flags: %s (0x%04x)",
Index: head/sys/geom/nop/g_nop.c
===================================================================
--- head/sys/geom/nop/g_nop.c
+++ head/sys/geom/nop/g_nop.c
@@ -187,7 +187,7 @@
static int
g_nop_create(struct gctl_req *req, struct g_class *mp, struct g_provider *pp,
int ioerror, u_int rfailprob, u_int wfailprob, off_t offset, off_t size,
- u_int secsize, u_int stripesize, u_int stripeoffset, const char *physpath)
+ u_int secsize, off_t stripesize, off_t stripeoffset, const char *physpath)
{
struct g_nop_softc *sc;
struct g_geom *gp;
@@ -464,7 +464,7 @@
*rfailprob == -1 ? 0 : (u_int)*rfailprob,
*wfailprob == -1 ? 0 : (u_int)*wfailprob,
(off_t)*offset, (off_t)*size, (u_int)*secsize,
- (u_int)*stripesize, (u_int)*stripeoffset,
+ (off_t)*stripesize, (off_t)*stripeoffset,
physpath) != 0) {
return;
}
Index: head/sys/geom/part/g_part.c
===================================================================
--- head/sys/geom/part/g_part.c
+++ head/sys/geom/part/g_part.c
@@ -367,9 +367,9 @@
offset = e1->gpe_offset;
if ((offset + pp->stripeoffset) % pp->stripesize) {
DPRINTF("partition %d on (%s, %s) is not "
- "aligned on %u bytes\n", e1->gpe_index,
+ "aligned on %ju bytes\n", e1->gpe_index,
pp->name, table->gpt_scheme->name,
- pp->stripesize);
+ (uintmax_t)pp->stripesize);
/* Don't treat this as a critical failure */
}
}
@@ -820,7 +820,7 @@
G_PART_FULLNAME(table, entry, sb, gp->name);
if (pp->stripesize > 0 && entry->gpe_pp->stripeoffset != 0)
sbuf_printf(sb, " added, but partition is not "
- "aligned on %u bytes\n", pp->stripesize);
+ "aligned on %ju bytes\n", (uintmax_t)pp->stripesize);
else
sbuf_cat(sb, " added\n");
sbuf_finish(sb);
Index: head/sys/geom/raid/g_raid.c
===================================================================
--- head/sys/geom/raid/g_raid.c
+++ head/sys/geom/raid/g_raid.c
@@ -2423,7 +2423,7 @@
sbuf_printf(sb, "r%d(%s):%d@%ju",
sd->sd_volume->v_global_id,
sd->sd_volume->v_name,
- sd->sd_pos, sd->sd_offset);
+ sd->sd_pos, (uintmax_t)sd->sd_offset);
if (TAILQ_NEXT(sd, sd_next))
sbuf_printf(sb, ", ");
}
Index: head/sys/geom/stripe/g_stripe.h
===================================================================
--- head/sys/geom/stripe/g_stripe.h
+++ head/sys/geom/stripe/g_stripe.h
@@ -76,7 +76,7 @@
uint32_t sc_id; /* stripe unique ID */
struct g_consumer **sc_disks;
uint16_t sc_ndisks;
- uint32_t sc_stripesize;
+ off_t sc_stripesize;
uint32_t sc_stripebits;
struct mtx sc_lock;
};
Index: head/sys/geom/stripe/g_stripe.c
===================================================================
--- head/sys/geom/stripe/g_stripe.c
+++ head/sys/geom/stripe/g_stripe.c
@@ -249,7 +249,7 @@
g_stripe_copy(struct g_stripe_softc *sc, char *src, char *dst, off_t offset,
off_t length, int mode)
{
- u_int stripesize;
+ off_t stripesize;
size_t len;
stripesize = sc->sc_stripesize;
@@ -265,8 +265,8 @@
}
length -= len;
KASSERT(length >= 0,
- ("Length < 0 (stripesize=%zu, offset=%jd, length=%jd).",
- (size_t)stripesize, (intmax_t)offset, (intmax_t)length));
+ ("Length < 0 (stripesize=%ju, offset=%ju, length=%jd).",
+ (uintmax_t)stripesize, (uintmax_t)offset, (intmax_t)length));
if (length > stripesize)
len = stripesize;
else
@@ -307,10 +307,11 @@
g_stripe_start_fast(struct bio *bp, u_int no, off_t offset, off_t length)
{
TAILQ_HEAD(, bio) queue = TAILQ_HEAD_INITIALIZER(queue);
- u_int nparts = 0, stripesize;
struct g_stripe_softc *sc;
char *addr, *data = NULL;
struct bio *cbp;
+ off_t stripesize;
+ u_int nparts = 0;
int error;
sc = bp->bio_to->geom->softc;
@@ -436,7 +437,7 @@
{
TAILQ_HEAD(, bio) queue = TAILQ_HEAD_INITIALIZER(queue);
struct g_stripe_softc *sc;
- uint32_t stripesize;
+ off_t stripesize;
struct bio *cbp;
char *addr;
int error;
@@ -571,9 +572,9 @@
static void
g_stripe_start(struct bio *bp)
{
- off_t offset, start, length, nstripe;
+ off_t offset, start, length, nstripe, stripesize;
struct g_stripe_softc *sc;
- u_int no, stripesize;
+ u_int no;
int error, fast = 0;
sc = bp->bio_to->geom->softc;
@@ -1044,7 +1045,7 @@
struct g_stripe_softc *sc;
struct g_geom *gp;
struct sbuf *sb;
- intmax_t *stripesize;
+ off_t *stripesize;
const char *name;
char param[16];
int *nargs;
@@ -1076,7 +1077,7 @@
gctl_error(req, "No '%s' argument.", "stripesize");
return;
}
- md.md_stripesize = *stripesize;
+ md.md_stripesize = (uint32_t)*stripesize;
bzero(md.md_provider, sizeof(md.md_provider));
/* This field is not important here. */
md.md_provsize = 0;
@@ -1243,8 +1244,8 @@
(u_int)cp->index);
} else {
sbuf_printf(sb, "%s<ID>%u</ID>\n", indent, (u_int)sc->sc_id);
- sbuf_printf(sb, "%s<Stripesize>%u</Stripesize>\n", indent,
- (u_int)sc->sc_stripesize);
+ sbuf_printf(sb, "%s<Stripesize>%ju</Stripesize>\n", indent,
+ (uintmax_t)sc->sc_stripesize);
sbuf_printf(sb, "%s<Type>", indent);
switch (sc->sc_type) {
case G_STRIPE_TYPE_AUTOMATIC:
Index: head/sys/geom/uzip/g_uzip.c
===================================================================
--- head/sys/geom/uzip/g_uzip.c
+++ head/sys/geom/uzip/g_uzip.c
@@ -849,9 +849,9 @@
g_error_provider(pp2, 0);
g_access(cp, -1, 0, 0);
- DPRINTF(GUZ_DBG_INFO, ("%s: taste ok (%d, %jd), (%d, %d), %x\n",
- gp->name, pp2->sectorsize, (intmax_t)pp2->mediasize,
- pp2->stripeoffset, pp2->stripesize, pp2->flags));
+ DPRINTF(GUZ_DBG_INFO, ("%s: taste ok (%d, %ju), (%ju, %ju), %x\n",
+ gp->name, pp2->sectorsize, (uintmax_t)pp2->mediasize,
+ (uintmax_t)pp2->stripeoffset, (uintmax_t)pp2->stripesize, pp2->flags));
DPRINTF(GUZ_DBG_INFO, ("%s: %u x %u blocks\n", gp->name, sc->nblocks,
sc->blksz));
return (gp);

File Metadata

Mime Type
text/plain
Expires
Mon, Nov 18, 5:16 PM (44 m, 22 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14701416
Default Alt Text
D13426.id49691.diff (9 KB)

Event Timeline