Handling of data truncation (short reads/writes) in FUSE

Posted by Vi on Stack Overflow See other posts from Stack Overflow or by Vi
Published on 2010-05-30T12:39:34Z Indexed on 2010/05/30 13:32 UTC
Read the original article Hit count: 206

Filed under:
|
|

I expect any good program should do all their reads and writes in a loop until all data written/read without relying that write will write everything (even with regular files). Am I right?

Implemented simple FUSE filesystem which only allows reading and writing with small buffers, very often returning that it is written less bytes that in a buffer (using -o direct_io). Some programs work, some not (notably mountlo). Are them buggy or programs should not expect truncated writes and reads from the regular files?

In general, are seekable file descriptors expected to truncate data like sockets and pipes?

© Stack Overflow or respective owner

Related posts about input-output

Related posts about truncation