[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: VFS bug in 2.4.10+ which applies ulimits to block devices



On Mon, Nov 26, 2001 at 10:57:00AM -0700, Andreas Dilger wrote:
> On Nov 26, 2001  17:38 +0100, Andrea Arcangeli wrote:
> > If you're sure the current semantics are wrong for blkdev feel free to
> > add an IS_BLK check in generic_file_write (in vmtruncate it isn't
> > necessary, truncating a blkdev doesn't make sense anyways). This will
> > workaround the ulimit userspace breakage as well.
> > 
> > --- 2.4.15aa1/mm/filemap.c.~1~	Sat Nov 24 06:55:30 2001
> > +++ 2.4.15aa1/mm/filemap.c	Mon Nov 26 17:30:28 2001
> > @@ -2908,7 +2908,7 @@
> >  	 */
> >  	err = -EFBIG;
> >  	
> > -	if (limit != RLIM_INFINITY) {
> > +	if (!S_ISBLK(inode->i_mode) && limit != RLIM_INFINITY) {
> >  		if (pos >= limit) {
> >  			send_sig(SIGXFSZ, current, 0);
> >  			goto out;
> 
> The question also should be asked - is "!S_ISBLK" the right test for this?
> Should it rather be "S_ISREG" instead?  What about I/O on raw character
> devices (e.g. oracle, etc), or tape drives?  I don't _think_ we need to
> support > 2GB directories, do we?  If so, do we need compatibility support
> for such systems if they ever become available?

Only blkdev and the regular files can reach generic_file_write so either
ways it's the same. On the long run I'd drop the check enterly but it
also depends what SuS or whatever official specification has to say
about it, I'd guess it's OS dependent behaviour.

Andrea





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]