Commit cc710d56 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Explicitly sync the header of the VSM so other processes can read(2) it

on kernels without coherent VM/buf (OpenBSD, still ?, really ?)

Submitted by:	Federico G. Schwindt
parent e9a47e80
...@@ -187,8 +187,7 @@ mgt_shm_size(void) ...@@ -187,8 +187,7 @@ mgt_shm_size(void)
size = mgt_param.vsl_space + mgt_param.vsm_space; size = mgt_param.vsl_space + mgt_param.vsm_space;
ps = getpagesize(); ps = getpagesize();
size += ps - 1; size = RUP2(size, ps);
size &= ~(ps - 1U);
return (size); return (size);
} }
...@@ -247,6 +246,9 @@ mgt_SHM_Create(void) ...@@ -247,6 +246,9 @@ mgt_SHM_Create(void)
(void)unlink(fnbuf); (void)unlink(fnbuf);
exit (-1); exit (-1);
} }
/* Commit changes, for OS's without coherent VM/buf */
AZ(msync(p, getpagesize(), MS_SYNC));
} }
/*-------------------------------------------------------------------- /*--------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment