NFS client fix - was NFS over-quota not detected if utimes() called before fsync()/close()

2013-08-06 Thread J. Hannken-Illjes
On Aug 1, 2013, at 10:31 AM, J. Hannken-Illjes hann...@eis.cs.tu-bs.de wrote: On Jul 31, 2013, at 10:04 PM, Christos Zoulas chris...@astron.com wrote: In article 20130730211200.gd96...@trav.math.uni-bonn.de, Edgar Fuß e...@math.uni-bonn.de wrote: I think the problem is in nfs_setattr(),

Re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-08-04 Thread Christos Zoulas
In article 20130731222303.gj96...@trav.math.uni-bonn.de, Edgar Fuß e...@math.uni-bonn.de wrote: Yes, I believe you are right. Return an error for all errors. Any idea what the intent of only catching EINTR was? The flawed logic of: If the write fails for any other reason than being

re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-08-01 Thread matthew green
On Sat, 06 Jul 2013, Manuel Bouyer wrote: But I would expect close() to do an implicit fsync() as well, and return the error if the implicit fsync() didn't succeed (but still closing the file). As I already mentionned, linux behaves this way, and I guess applications expects this

Re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-08-01 Thread J. Hannken-Illjes
On Jul 31, 2013, at 10:04 PM, Christos Zoulas chris...@astron.com wrote: In article 20130730211200.gd96...@trav.math.uni-bonn.de, Edgar Fuß e...@math.uni-bonn.de wrote: I think the problem is in nfs_setattr(), sys/nfs/nfs_vnops.c:681, where files are flushed before setattr because a later

Re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-07-31 Thread Christos Zoulas
In article 20130730211200.gd96...@trav.math.uni-bonn.de, Edgar Fuß e...@math.uni-bonn.de wrote: I think the problem is in nfs_setattr(), sys/nfs/nfs_vnops.c:681, where files are flushed before setattr because a later write of cached data might change timestamps or reset sugid bits, but the

Re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-07-31 Thread Edgar Fuß
Yes, I believe you are right. Return an error for all errors. Any idea what the intent of only catching EINTR was?

Re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-07-30 Thread Edgar Fuß
I think the problem is in nfs_setattr(), sys/nfs/nfs_vnops.c:681, where files are flushed before setattr because a later write of cached data might change timestamps or reset sugid bits, but the only return value of nfs_vinvalbuf() that's treated as an error is EINTR. Why? Any comments on

Re: NFS over-quota not detected if utimes() called before fsync()/close()

2013-07-01 Thread David Holland
On Fri, Jun 28, 2013 at 02:44:46PM +0200, Edgar Fu? wrote: On an NFS-mounted file system, when you try to write to a file and are over-quota, the write() succeeds, but a following fsync() or close() fails. However, when you insert a utimes() or futimes() call after the write(), the fsync()

NFS over-quota not detected if utimes() called before fsync()/close()

2013-06-28 Thread Edgar Fuß
On an NFS-mounted file system, when you try to write to a file and are over-quota, the write() succeeds, but a following fsync() or close() fails. However, when you insert a utimes() or futimes() call after the write(), the fsync() or close() succeed and you end up with a zero-length file. The