summaryrefslogtreecommitdiffstats
path: root/mboxd_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'mboxd_windows.c')
-rw-r--r--mboxd_windows.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mboxd_windows.c b/mboxd_windows.c
index 1755c4a..e4d9882 100644
--- a/mboxd_windows.c
+++ b/mboxd_windows.c
@@ -586,6 +586,14 @@ int create_map_window(struct mbox_context *context,
cur = find_oldest_window(context);
}
+/*
+ * In case of the virtual pnor, as of now it's possible that a window may
+ * have content less than it's max size. We basically copy one flash partition
+ * per window, and some partitions are smaller than the max size. An offset
+ * right after such a small partition ends should lead to new mapping. The code
+ * below prevents that.
+ */
+#ifndef VIRTUAL_PNOR_ENABLED
if (!exact) {
/*
* It would be nice to align the offsets which we map to window
@@ -597,6 +605,7 @@ int create_map_window(struct mbox_context *context,
*/
offset &= ~(cur->size - 1);
}
+#endif
if ((offset + cur->size) > context->flash_size) {
/*
OpenPOWER on IntegriCloud