On Fri, Aug 17, 2012 at 11:01:41AM +0800, Liu Yuan wrote: > > +static int syncfs(int fd) > > +{ > > + return syscall(__NR_syncfs, fd); > > +} > > + > > syncfs only appeared in Linux 2.6.39, rather new, I think most of > systems won't support it. Yeah, we probably need to test that it works during startup, similar to what we do for xattrs. Some systems use a plain sync for fallback, and we could also do that. The only issue is that it can lead to deadlocks if the client is running on the same systems as the actual backend storage. > With current implementation, you only flush inode object, not all the > data objects belong to targeted VDI. I think this is hardest part to > implement. Probably you need to call exec_local_request() to take > advantage of retry mechanism. Yes, that also was the issue last time I looked into it. One simple approach could be to simply forward the flush to all nodes. |