Skip to contentSkip to conversation

Bug in swapfs (2.4.0-ac9)

DISCUSSION Gregor Jasny 2 participants 2 messages Jan 15, 2001 – Jan 16, 2001

lore
Share & tools
lore
#0 lore raw

I think I've found a bug in swapfs:

fstab:
swapfs /dev/shm swapfs defaults 0 0
swapfs /tmp swapfs defaults 0 0

When I hit <enter> on a tar.gz file in Midnight Commander nothing happens. If I do a umonut /tmp and hit <enter> again it works as It should (I see the archived files).
Nearly the same Problem with the Acrobat Reader pluin for Netscape. It shows only a blank page when /tmp is swapfs.

I've noticed that it's possible to mount /tmp more than once. mount shows then [snip]
swapfs on /dev/shm type swapfs (rw)
swapfs on /tmp type swapfs (rw)
swapfs on /tmp type swapfs (rw)
swapfs on /tmp type swapfs (rw)
swapfs on /tmp type swapfs (rw)

The permissions for /tmp are rwxrwxrwt, and even -omode=777,exec didn't help.

Any Ideas?

-Gregor
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/

#1 lore raw

Hi Gregor,

Quoted 11 lines · Gregor Jasny

I think I've found a bug in swapfs:

fstab:
swapfs /dev/shm swapfs defaults 0 0
swapfs /tmp swapfs defaults 0 0

When I hit <enter> on a tar.gz file in Midnight Commander nothing happens. If I do a umonut /tmp and hit <enter> again it works as It should (I see the archived files). Nearly the same Problem with the Acrobat Reader pluin for Netscape. It shows only a blank page when /tmp is swapfs.

Yep, Alan introduced a maxbytes field to the superblock which is not set in swapfs. So the vfs will always fail with EFBIG.
I will send out a patch soon.

Quoted 8 lines

I've noticed that it's possible to mount /tmp more than once. mount shows then
[snip]
swapfs on /dev/shm type swapfs (rw)
swapfs on /tmp type swapfs (rw)
swapfs on /tmp type swapfs (rw)
swapfs on /tmp type swapfs (rw)
swapfs on /tmp type swapfs (rw)

The vfs allows multiple mount with 2.4, and for swapfs you always get a fresh instance with its own resource limits. Think anout chroot with its own swapfs instance. AFAIK the new util-linux will give you some checking.

Quoted 2 lines

The permissions for /tmp are rwxrwxrwt, and even -omode=777,exec didn't help.

Your bootup script sets the mode after mounting? The mode parameter is functional for me and the default is 777. 1777 has to be done in user space.

Greetings
Christoph

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
Please read the FAQ at http://www.tux.org/lkml/