>>Most disk devices can't change their size with a few commands as a ram disk can
>>as it's a physical constant. Ram disks are virtual so their size is whatever
>>the user specifies, with a kernel configured upper limit. I argue that the size
>>is the allocated amount, not the upper limit.
>>
>
> I think your problem is that you are querying the disk to ask it the file
> system size ? If so you asked the wrong code
I take your point. The file system knows its right size. However, it would
still be useful to be able to tell what the ram disk allocated size actually is.
Currently there's no good mechanism I know of that returns the actual
allocated size.
I'm using ram disks as a way of building a single floppy linux I'm working on (a
variation on LRP and Tom's Root Boot). Some of the time in this process I have
ram disk(s) without filesystems to query for the size. It's also possible to
build a filesystem that's smaller than the allocated size.
Mypatch doesn't affect userland tools like "du" and "df" since they query the
filesystem for the size. It does fix lowel-level tools that look at the ramdisk
and not the filesystem.
Having the ramdisk report the max possible size and not the allocated size is
akin to having a physical hard disk report the theoretical max that could be
achieved using current technology, not the actual blocks the device is built to
hold.
-Malcolm
-
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/