On Tue, Mar 10, 2020 at 08:08:49PM +0100, Miklos Szeredi wrote: > On Tue, Mar 10, 2020 at 7:46 PM Liu Bo <bo.liu@xxxxxxxxxxxxxxxxx> wrote: > > > > On Tue, Mar 10, 2020 at 11:14:17AM +0100, Miklos Szeredi wrote: > > > On Tue, Mar 3, 2020 at 10:15 PM Liu Bo <bo.liu@xxxxxxxxxxxxxxxxx> wrote: > > > > > > > > If this is a DSYNC write, make sure we push it to stable storage now > > > > that we've written data. > > > > > > If this is direct I/O then why do we need an fysnc() call? > > > > > > The only thing needed should be correct setting O_DSYNC in the flags > > > field of the WRITE request, and it appears to me that that is already > > > being done. > > > > Given direct IO itself doesn't guarantee FUA or FLUSH, I think we > > still need such a fsync() call to make sure a FUA/FLUSH is sent after > > direct IO. > > What I mean is that the server itself can call fsync(2) from the WRITE > request if it finds that fi->flags contains O_DSYNC. Right, I missed that with no_open FUSE_DIRECT_IO is not possible, thanks for clarifying it. thanks, -liubo