lkml.org 
[lkml]   [2000]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: loop device length
From

[Tim Riker]
> losetup allows for setting a starting offset within a file for the
> loop block device. There however is no length parameter to permit
> setting the length. Adding a length parameter would allow for
> multiple fs images in a single file (or device) and would correctly
> handle programs like resize2fs.

You don't need a length field for this, although it may be a good idea.
Filesystems know how big they are. You only need to force it at mkfs
and resize time, and in both cases you can override the tool's
knowledge.

In other words, you *can* put multiple fs images on a single piece of
backing store as long as you manage the lengths manually, which you
have to do anyway since you're keeping track of the starting offsets.

All the length parameter buys is not having to specify the same length
to losetup and mke2fs. And a little protection from shooting yourself
in the foot, but by the time you are messing with stuff like this you
had better be careful anyway.

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

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