Re: fsync_range and O_RDONLY

2021-02-18 Thread David Holland
On Thu, Feb 18, 2021 at 06:56:00PM -0500, Greg Troxel wrote: > > And report any errors to me, so if you're a database and I'm feeling > > nasty I can maybe mess with you that way. So I'm not sure it's a great > > idea. > > > > Right now fsync error reporting is a trainwreck though. > > I

Re: fsync_range and O_RDONLY

2021-02-18 Thread Greg Troxel
David Holland writes: > Well, if you have it open for write and I have it open for read, and I > fsync it, it'll sync your changes. I guess maybe POSIX is wrong then :-) But as a random user I can type sync to the shell. > And report any errors to me, so if you're a database and I'm feeling

Re: fsync_range and O_RDONLY

2021-02-18 Thread David Holland
On Wed, Feb 17, 2021 at 01:17:14PM -0500, Greg Troxel wrote: > > Last year, fdatasync() was changed to allow syncing files opened > > read-only, because that ceased to be prohibited by POSIX and something > > apparently depended on it. > > I have a dim memory of this and mongodb. > > >

Re: fsync_range and O_RDONLY

2021-02-17 Thread Greg Troxel
David Holland writes: > Last year, fdatasync() was changed to allow syncing files opened > read-only, because that ceased to be prohibited by POSIX and something > apparently depended on it. I have a dim memory of this and mongodb. > However, fsync_range() was not also so changed. Should it