quotas and small files
cary_dickens2 at hp.com
Sun Aug 5 23:57:34 GMT 2001
> -----Original Message-----
> From: Jeremy Allison [mailto:jeremy at valinux.com]
> Sent: Saturday, August 04, 2001 5:56 PM
> To: DICKENS,CARY (HP-Loveland,ex2)
> Cc: Samba technical
> Subject: Re: quotas and small files
> "DICKENS,CARY (HP-Loveland,ex2)" wrote:
> > Jeremy,
> > I've gone through the vfs_allocate_file_space and stepped
> through gdb as
> > well as added debug statements. According to both methods
> errno is 0.
> > I tried setting the errno to EDQUOT and ENOSPC with no
> change in behavior.
> > When I try to copy a 60k or greater file the errno is set to EDQUOT.
> > Let me know what you think comes next. Personally, I'm baffled.
> You're not telling me enough about what you saw in the gdb session.
> Well what does the "write" call return ? Does it return
> less than was asked for ? If not, then errno should be
> zero. If it did return less than was asked for then errno
> should be set to *something*.
> If you set errno to EDQUOT or ENOSPC then the SMBwrite call
> should return the ERRHRD,ERRdiskfull pair to the client. Do
> you see that ? Can I get an ssh onto the box so I can do the
> debugging when you send the write ? That would nail it.
> If not, it's looking like I may need to enable quotas after all
Sorry about that. Let me try this again. I stepped into the vfswrap_write
call where the actual write call is made and where the errno is set for
larger files and it isn't set for small files. That write is returning the
number written, but the errno isn't set.
I decided to walk through the code when win2k actually displays the error.
The main difference is that the call in reply.c being made is the
reply_write_and_X and NT is coming in through the reply_write call. win2k
makes the write call which finally gets to the vfs_write_data function.
This writes as much data as the disk will allow and then returns. At this
point, errno is 0. Since it hasn't written all its data yet, it makes
another call to write. At this point the return is -1 and the errno is set
So in vfs_allocate_file_space we error out if the write wasn't big enough.
The way I read it, we need to call it till we get a return of 0 or -1 to
work with the way errno is being set.
With all this, I'm still not getting an error, but as you can see from the
level 10 log (with all Matt's acl stuff turned off), I am getting the
correct errno now.
As for getting you an ssh onto the box that's failing, it won't happen. It
is on a completely internal network. I can't even get an ssh to it from my
If I can send you anymore information, let me know. If you would like to
see backtraces or something else from gdb, it can definately be arranged.
Thanks ever so much,
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 36214 bytes
Desc: not available
Url : http://lists.samba.org/archive/samba-technical/attachments/20010805/0e33ad42/smbdlog.obj
More information about the samba-technical