summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sbin/geom/class/eli/geom_eli.c4
-rw-r--r--sys/geom/eli/g_eli_ctl.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/sbin/geom/class/eli/geom_eli.c b/sbin/geom/class/eli/geom_eli.c
index ed13555..3bf4fdc 100644
--- a/sbin/geom/class/eli/geom_eli.c
+++ b/sbin/geom/class/eli/geom_eli.c
@@ -609,6 +609,10 @@ eli_init(struct gctl_req *req)
gctl_error(req, "Invalid sector size.");
return;
}
+ if (val > sysconf(_SC_PAGE_SIZE)) {
+ gctl_error(req, "warning: Using sectorsize bigger than "
+ "the page size!");
+ }
md.md_sectorsize = val;
}
diff --git a/sys/geom/eli/g_eli_ctl.c b/sys/geom/eli/g_eli_ctl.c
index e7f556b..7ae56b9 100644
--- a/sys/geom/eli/g_eli_ctl.c
+++ b/sys/geom/eli/g_eli_ctl.c
@@ -355,6 +355,10 @@ g_eli_ctl_onetime(struct gctl_req *req, struct g_class *mp)
gctl_error(req, "Invalid sector size.");
return;
}
+ if (*sectorsize > PAGE_SIZE) {
+ gctl_error(req, "warning: Using sectorsize bigger than "
+ "the page size!");
+ }
md.md_sectorsize = *sectorsize;
}
OpenPOWER on IntegriCloud