Re: losetuping files in tmpfs fails?

Andy Gaynor
2002-01-04T11:14:08Z

Thanks all for your responses to ...

silver@silver.unix-fu.org (Yers truly) wrote:
> [Lookey, I can't loop to files in tmpfs!]

Before trying out a new kernel feature, I give the docs at least a quick look
for bugs and warnings. The higher the signal-to-noise ratio, the closer I
look. tmpfs.txt is conversational, so I only gave it a cursory scan. The
notes on the loop restriction are kind of obscured. The first is the second
line of "usage" 3. Having read the first line, completely innocuous and
unrelated to the restriction, I moved on. The second was "todo" 2 at the very
bottom, and todos aren't usually very interesting to first-time users. This is
an important restriction with no obvious justification (the cynical might even
call such a bug), and should be prominently advertised.

akpm@zip.com.au (Andrew Morton) wrote:
> It's not obvious that there's a burning need to support loop-on-tmpfs though,
> is there?

Completeness is enough. /tmp is a general purpose area and should generally
work. Given /tmp's transient nature, it's quite reasonable to trade away
persistence for other features, including speed and flexibility. However,
there is no obvious justification for trading away other features, like the
ability to contain the objects of loops.

As for specific need, it's common practice to create temporary filesystems
in a file before sending them to removable volumes. The activity on such
filesystems is usually intensive and short-lived, making them ideal candidates
for tmpfs's features. It pleases me to get better mileage from my generous
swap partitions, which occupy prime prime real estate on my hard drives: fast
low-order fast locations strategically placed between system and data areas.

Regards, [Ag] Andy Gaynor silver@silver.unix-fu.org