RE: PATCH: allow percentile size of tmpfs (2.5.66 / 2.4.20-pre2)

Hugh Dickins
2003-04-02T10:12:49Z

On Tue, 1 Apr 2003, Hua Zhong wrote:
> There is at least one case that ramfs works but tmpfs doesn't.
>
> If you have a loopback file A, and the following will fail in 2.4:
>
> mount -t tmpfs tmpfs /mnt/tmp
> extract file A to /mnt/tmp/A
> mount -t ext2 -o loop /mnt/tmp /mnt/loopback
>
> You'll get "ioctl: LOOP_SET_FD: Invalid argument".
>
> But ramfs works great.
>
> Is this a bug or feature?

Feature: the way tmpfs allows a page to move between swap and memory
makes loopback harder to support than it is for all-in-memory ramfs.

I used to have the patches to enable loopback on tmpfs in 2.4 (well,
I still have them, but 2.4 and tmpfs have both moved on), but shifted
attention to 2.5. One day I'll clean them up, but that day is not soon.

Hugh