File truncation fails within CFS mounted directory
Bug #226609 reported by
restamp
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cfs (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
Binary package hint: cfs
Any operation involving the truncation of a file seems to fail within a CFS mounted filesystem.
Further investigation seems to show this problem was introduced with Gutsy, although I didn't use CFS much on that OS, so I didn't notice it until Hardy. It works fine on Feisty. Perhaps there was a change in Gutsy with the way truncation requests are passed to the NFS daemon?
Example:
$ cmkdir xxx
Key:
Again:
$ cattach xxx
Key:
$ cd /crypt/xxx
$ echo hi > hi
$ echo low > hi
ksh: hi: cannot create [Invalid argument]
$ echo low >> hi
$ cat hi
hi
low
$ > hi
ksh: hi: cannot create [Invalid argument]
$ rm hi
$ echo low > hi
$
To post a comment you must log in.
Further investigation revealed that the Ubuntu libc has apparently started boundary checking the tv_usec fields of utimes(). For some reason, one of the tv_usec files being passed was 1000000. I added boundary checking, and it appears to have resolved the problem. Patch code attached.