lkml.org 
[lkml]   [2002]   [Sep]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] loop device broken in 2.5.38
On Wed, Sep 25, 2002 at 12:03:55PM -0600, Andreas Dilger wrote:
> Is there a historic reason why we pre-compute and store the loop device
> size instead of re-calculating it each time we do a BLKGETSZ ioctl?
> Re-calculating it each time allows you to increase the size of the
> backing file if needed while it is in use, and I don't think we actually
> get the size of the loop device very often, so it is not a big deal,
> especially given the simple calculation needed.

We need to pre-compute the size because the block device layer wants
to know how big devices were so it can do sanity checking on the
incoming requests. This was done in the historically by setting
blk_size[MAJOR_NR] to point to an array which contained the size of
the minor devices in kilobytes, and in the new world order, via the
set_capacity() call.

- Ted
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.141 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site