Skip to contentSkip to conversation

ramdisk contents lost with 2.6

DISCUSSION Olaf Hering 2 participants 2 messages Nov 24, 2003

lore
Share & tools
lore
#0 lore raw

Good morning,

is it only me or is the file really gone with 2.6?

umount -v /mnt
/sbin/mkfs.ext2 /dev/ram3
mount -v /dev/ram3 /mnt
cp /etc/hosts /mnt
sync
umount -v /mnt
mount -v /dev/ram3 /mnt
ls -l /mnt/hosts
umount -v /mnt

works ok with 2.4.

Signature · 3 lines
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
#1 lore raw
Quoted 16 lines · Olaf Hering

Good morning,

is it only me or is the file really gone with 2.6?

umount -v /mnt
/sbin/mkfs.ext2 /dev/ram3
mount -v /dev/ram3 /mnt
cp /etc/hosts /mnt
sync
umount -v /mnt
mount -v /dev/ram3 /mnt
ls -l /mnt/hosts
umount -v /mnt

Quoted 2 lines

works ok with 2.4.

Yup. Because the kernel considers the ramdisk as being "memory backed" it doesn't do writeback into the blockdev pagecache. If you remove the memory-backed flag, ramdisk contributes to dirty memory in undesirable ways. That memory-backed flag is too overloaded and needs to be split up.

It's something I need to fix, but nobody seemed to be hurting from it up to now so I figured it could wait until after 2.6.0.