Bug 244848 - SIlent truncation of files when NFS quota reached
SIlent truncation of files when NFS quota reached
Status: CLOSED CURRENTRELEASE
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: samba (Show other bugs)
4.5
All Linux
low Severity high
: ---
: ---
Assigned To: Guenther Deschner
qe-baseos-daemons
http://www.mail-archive.com/samba@lis...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-06-19 10:08 EDT by David Losada
Modified: 2010-05-10 10:43 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-05-10 10:43:20 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Check errors returned by fsync call (6.14 KB, patch)
2007-06-19 10:08 EDT, David Losada
no flags Details | Diff
Jeremy's patch adapted by me, for 3.0.10-1.4E.12.2 (6.76 KB, patch)
2007-06-19 10:12 EDT, David Losada
no flags Details | Diff

  None (edit)
Description David Losada 2007-06-19 10:08:57 EDT
Description of problem:
When serving files from an NFS export with quotas enabled, the "quota full"
error is not propagated to windows clients at a moment when they are willing to
let the user know. The result is that users will have their files truncated
without notice.


Version-Release number of selected component (if applicable):
3.0.10-1.4E.12.2


How reproducible:
On a samba share based on any quota-limited NFS exported file system (reproduced
both with Solaris NFS server and Linux NFS server)


Steps to Reproduce:
1. From a Windows 2000 client, fill up the share with a total file size that
exceeds quota
2.
3.
  
Actual results:
Files are left in the share, truncated with size 0, user doesn't receive an
error message.

Expected results:
Files shouldn't be left truncated on the share, user should receive an error
message.

Additional info:
Jeremy Allison <jra@samba.org> acknowledged the problem and produced the patch
I'm attaching. The patch makes samba check the errors that might be returned by
the fsync call. It applies to 3.0.25c

By activating the "strict sync" and "sync always" smb.conf directives, Samba
syncs the file while it's being written, thus being able to report the quota
error at that moment. This is a good moment for Windows to acknowledge the
error. (on close(), it's too late)
Comment 1 David Losada 2007-06-19 10:08:58 EDT
Created attachment 157370 [details]
Check errors returned by fsync call
Comment 2 David Losada 2007-06-19 10:12:09 EDT
Created attachment 157371 [details]
Jeremy's patch adapted by me, for 3.0.10-1.4E.12.2

Note You need to log in before you can comment on or make changes to this bug.