[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 08:43:05PM -0500, Theodore Tso wrote:
> On Mon, Nov 26, 2001 at 05:38:48PM +0100, Andrea Arcangeli wrote:
> > > I don't think that we should be applying _any_ of the LFS or ulimit
> > > logic to device inodes, should we?  It's not as if we're allocating
> > > space by writing beyond the ulimit max offset in this case.
> > 
> > I don't much connection between "allocation of space" and "maxfilesize
> > ulimit", the maxfile limit is about i_size, not i_blocks. We can run out
> > of the filesize ulimit without allocating any data space by simply
> > truncating an empty inode over the limit.
> 
> And i_size of block devices is always zero.  Ergo, the filesize limit
> shouldn't apply for block or character mode devices.

Actually the i_size of the blkdev is now set to the size of the blkdev.
The inode passed to the cache layer is not the original ext2 inode, but
it's the bdev->bd_inode, with the i_size set to the size of the blkdev
so we can share all the filesystem cache routines (generic_file_*)
without special checks for IS_BLK.

Andrea





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