[linux-cifs-client] [PATCH] cifs: fix sb->s_maxbytes so that it casts properly to a signed value

Jeff Layton jlayton at redhat.com
Tue Jul 21 19:14:17 MDT 2009


On Tue, 2009-07-21 at 19:45 -0500, Steve French wrote:
> Fix seems logical, although would like to see the maxbytes field the
> correct size.  If it really is a loff_t rather than unsigned why
> wasn't sparse warning on the vfs in sendfile when it did this
> incorrect cast?
> 

*shrug* -- maybe sparse does throw a warning, I haven't checked. It's
also not necessarily an incorrect cast I guess -- depends on whether
it's just set too large.

I think we should consider changing s_maxbytes to loff_t, but I need to
have a closer look and make sure it wouldn't break anything. There are
also other fs's that probably need similar fixes.

> When did this start breaking, am a little surprised that connectathon
> (and the usual dbench, fsstress, fsx etc.) didn't break if sendfile
> was broken, and I don't think that cifs has changed in this area in a
> long time.
> 

This has been broken for a long, long time (at least a couple of years).
Most of the reports that I have are people complaining that web serving
using apache from CIFS shares doesn't work right. I think apache uses
multiple sendfile calls per file, and bails out when it gets an error on
the first call.

> Shouldn't this cc stable ... sendfile is important.
> 

No objection to -stable if everyone thinks it's important enough.

-- 
Jeff Layton <jlayton at redhat.com>



More information about the linux-cifs-client mailing list