I found weird situation: if I constantly use fsync application works steadily, but if I change it on fsyncdata, it sometimes returns error: Bad file descriptor (os error 9). In linux man I found only one thing, which MAY cause an error (but does it?): (read the paragraph, which start from fdatasync() is similar to fsync()) https://man7.org/linux/man-pages/man2/fdatasync.2.html.
So do I understand it right: if some data sensitive metadata changed (size, for example) fdatasync returns error? I am a little bit confused, because bad file descriptor doesn't point on need to fsync metadata either.
Sorry in advance if this question is silly, I am not experienced enough:C
I found weird situation: if I constantly use
fsyncapplication works steadily, but if I change it onfsyncdata, it sometimes returns error:Bad file descriptor (os error 9). In linux man I found only one thing, which MAY cause an error (but does it?): (read the paragraph, which start from fdatasync() is similar to fsync()) https://man7.org/linux/man-pages/man2/fdatasync.2.html.So do I understand it right: if some data sensitive metadata changed (size, for example) fdatasync returns error? I am a little bit confused, because
bad file descriptordoesn't point onneed to fsync metadata either.Sorry in advance if this question is silly, I am not experienced enough:C