# HG changeset patch # User Paul Boddie # Date 1663365825 -7200 # Node ID f0bb79dd52dd2ce960815ee1e03d0960862d9adc # Parent 750d75411ead94fa556d9a315003f130b9996123 Employ a paging region size compatible with the configured page size. Without this, the mapping mechanism fails to generate valid send flexpages. diff -r 750d75411ead -r f0bb79dd52dd libfsserver/lib/pipes/pipe_paging.cc --- a/libfsserver/lib/pipes/pipe_paging.cc Fri Sep 16 22:59:39 2022 +0200 +++ b/libfsserver/lib/pipes/pipe_paging.cc Sat Sep 17 00:03:45 2022 +0200 @@ -1,7 +1,7 @@ /* * A pipe paging coordinator, permitting memory sharing pipe endpoints. * - * Copyright (C) 2021 Paul Boddie + * Copyright (C) 2021, 2022 Paul Boddie * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as @@ -19,6 +19,8 @@ * Boston, MA 02110-1301, USA */ +#include + #include #include "page_queue_partitioned.h" @@ -27,8 +29,12 @@ PipePaging::PipePaging(Memory *memory, offset_t size) -: NotificationSupport(2), _memory(NULL), _size(size) +: NotificationSupport(2), _memory(NULL) { + /* Employ a region size compatible with the configured page size. */ + + _size = std::max(size, PAGE_SIZE); + /* Reserve space for two pipe regions. */ _memory = new MemoryPreallocated(memory, round(size, memory->region_size()) * 2);