Hello all. I don't know that this problem has anything to do with
reiserfs, but that is where I'm at. The problem is this: I have an
application that sends a file from a client to a server. The server
reports that all the data is received, but the file isn't written to disk
properly. It is truncated.
Now, this application is written in Java. Not that that should matter.
Myself and the other lead developer at my company have both looked at this
code, and find absolutly nothing wrong with it. But, I try a different
approach. I try an existing Java package for netwrok file transfer,
namely jfs. jfs doesn't work either. The first 8k chunk is written to
disk, and the file never grows above that. Now this is where it gets
interesting.
The server app accepts the data, up to 8k at a time, and writes it to a
file. It then closes the file. When it gets the next chuck, it opens the
file, and appends the data. Now, I have tried this three different way;
opening the file in append mode, using a random file and seeking to the
file.length, and using a random access file and seeking to the previous
write position. All three produce the same 8k file (which is the first
8k) of data.
Now, with the last two methods, I had state information printed out as
the program was run. There were a couple of interesting thigns to note.
a) the file size was always the same (as reported by file.length) through
each pass of received data. b) the seek to position was always correct
(the end of the file as determined by the seek to last write). And c,
when I closed the file, the file desriptor always reported the correct
position, as in the actual length of the file on the client side. So all
the data was sent, and all the data was written, but the file size (10 meg
as reported by length) never changed, and the three meg file always showed
as 8k from the file system (via ls).
I realize most will attribute this to a problem in Java, or my abilities
as a Java developer, but I'm wanting to know if anyone can think of why
reiserfs might have something to do wiht this?
Thanks!