On Wed, Aug 23, 2023 at 05:34:02PM +0200, David Hildenbrand wrote:
> There is a difference between how we open a file and how we mmap it,
> and we want to support writable private mappings of readonly files. Let's
> define RAM_READONLY and RAM_READONLY_FD flags, to replace the single
> "readonly" parameter for file-related functions.
> 
> In memory_region_init_ram_from_fd() and memory_region_init_ram_from_file(),
> initialize mr->readonly based on the new RAM_READONLY flag.
> 
> While at it, add some RAM_* flags we missed to add to the list of accepted
> flags in the documentation of some functions.
> 
> No change in functionality intended. We'll make use of both flags next
> and start setting them independently for memory-backend-file.
> 
> Signed-off-by: David Hildenbrand <da...@redhat.com>

Acked-by: Peter Xu <pet...@redhat.com>

-- 
Peter Xu


Reply via email to