Page MenuHomeFreeBSD

Add stripesize/stripeoffset to gnop(8).
ClosedPublic

Authored by trasz on Sep 14 2015, 5:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 27, 12:39 PM
Unknown Object (File)
Sat, Apr 27, 11:40 AM
Unknown Object (File)
Sat, Apr 27, 11:39 AM
Unknown Object (File)
Sat, Apr 27, 11:39 AM
Unknown Object (File)
Sat, Apr 27, 11:08 AM
Unknown Object (File)
Sat, Apr 27, 10:45 AM
Unknown Object (File)
Jan 26 2024, 3:29 AM
Unknown Object (File)
Dec 22 2023, 9:22 PM
Subscribers

Details

Summary

Add a way to specify stripesize and stripeoffset to gnop(8). This makes
it possible to "simulate" 4K media, to eg test alignment handling.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

trasz retitled this revision from to Add stripesize/stripeoffset to gnop(8)..
trasz updated this object.
trasz edited the test plan for this revision. (Show Details)

Generally I like it. Just a few comments.

sbin/geom/class/nop/geom_nop.c
51 ↗(On Diff #8747)

Why 't' and 'T'? any associations I miss? Wouldn't 'p' and 'P' (from "physical") be a bit mode logical?

sys/geom/nop/g_nop.c
218 ↗(On Diff #8747)

There is no strict relation between stripesize and MAXPHYS. This limitation exist for logical sector, since we must be able to access at least sector at a time. But stripesize is only an optimization, so we should be able to support even too large values.

226 ↗(On Diff #8747)

I would compare stripeoffset to stripesize instead. If stripesize is not zero, stripeoffset should not be bigger then it.

sbin/geom/class/nop/geom_nop.c
51 ↗(On Diff #8747)

I didn't have any good idea which letters to use. I'll change it to 'p' and 'P'.

sys/geom/nop/g_nop.c
226 ↗(On Diff #8747)

Can it be equal?

sys/geom/nop/g_nop.c
226 ↗(On Diff #8747)

No. Only less. Equal would give the same effect as set to zero.

trasz edited edge metadata.

Fix stuff.

sys/geom/nop/g_nop.c
219 ↗(On Diff #8754)

Wrong. It should be: if (stripesize != 0 && stripeoffset >= stripesize) {
Stripeoffset without stripesize is possible in some cases.

trasz edited edge metadata.

Fix stuff some more.

mav edited edge metadata.
This revision is now accepted and ready to land.Sep 14 2015, 7:51 PM
This revision was automatically updated to reflect the committed changes.