Shachar Shemesh <[EMAIL PROTECTED]> writes:

> Hi all,
>
> My memory seems to remember that there was a way to create a loop device
> that not only does not start from the beginning of the file looped
> (which is possible using the losetup "-o" parameter), but also limits
> the kernel from reaching the very end of the file looped.
>
> Going over the kernel source reveals that the LOOP_SET_STATUS64
> does,

I suspect you meant struct loop_info64...

> indeed, have a "sizelimit" field that seems to do exactly that. Going
> over the losetup sources, on the other hand, seems to show that the
> utility does not accept such a parameter, despite my memory telling me
> that it used to.

I do not recall any such option to losetup, but maybe it exists on
some system I have not used. I am not into bleeding edge, sorry.

> If anyone can shed any light, it would be useful.

If you look at the kernel code in loop.{h,c} and fs/compat_ioctl.c you
will see that there is a compatibility layer between old (loop_info)
and new (loop_info64), and that a part of the difference is the
lo_sizelimit field.

I don't know but I suspect that this "upgrade" has not yet propagated
into the user level code, at least not everywhere. Try looking into
/usr/include/linux/loop.h on your system. Do you see loop_info64
defined there or lo_sizelimit as a field of loop_info? If you do, it
is very likely conditional on something. Check that preprocessor
condition against your system.

Hope it helps,

-- 
Oleg Goldshmidt | [EMAIL PROTECTED]

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to