From: Han-Wen N. <ha...@gm...> - 2012-11-22 14:24:49
|
On Thu, Nov 22, 2012 at 12:12 PM, Maxim V. Patlasov <mpa...@pa...> wrote: >> How should I handle this? Should the FS daemon associate the open file >> with inode directly, and only issue the close on the last flush()? Or >> maybe some scheme with reference counting? >> > > I think flush should flush something (e.g. internal FS daemon caches), not > really close backing store file. One way to trigger flush on backing store > is close(dup(fd)). Another way would be fsync(fd), imho. this works for me. I think fsync() may flush the entire filesystem on many systems, so that's not desired. -- Han-Wen Nienhuys - ha...@xs... - http://www.xs4all.nl/~hanwen |