kernel-ark/drivers/block
Christian Borntraeger 5d0360ee96 rd: fix data corruption on memory pressure
We have seen ramdisk based install systems, where some pages of mapped
libraries and programs were suddendly zeroed under memory pressure.  This
should not happen, as the ramdisk avoids freeing its pages by keeping them
dirty all the time.

It turns out that there is a case, where the VM makes a ramdisk page clean,
without telling the ramdisk driver.  On memory pressure shrink_zone runs
and it starts to run shrink_active_list.  There is a check for
buffer_heads_over_limit, and if true, pagevec_strip is called.
pagevec_strip calls try_to_release_page.  If the mapping has no releasepage
callback, try_to_free_buffers is called.  try_to_free_buffers has now a
special logic for some file systems to make a dirty page clean, if all
buffers are clean.  Thats what happened in our test case.

The simplest solution is to provide a noop-releasepage callback for the
ramdisk driver.  This avoids try_to_free_buffers for ramdisk pages.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Nick Piggin <npiggin@suse.de>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-11-14 18:45:42 -08:00
..
aoe
paride paride: pf driver fixes 2007-11-14 18:45:39 -08:00
amiflop.c
ataflop.c
cciss_cmd.h
cciss_scsi.c cciss: update copyright notices 2007-10-29 11:33:05 +01:00
cciss_scsi.h cciss: update copyright notices 2007-10-29 11:33:05 +01:00
cciss.c cciss: update copyright notices 2007-10-29 11:33:05 +01:00
cciss.h
cpqarray.c
cpqarray.h
cryptoloop.c
DAC960.c
DAC960.h
floppy.c
ida_cmd.h
ida_ioctl.h
Kconfig
loop.c
Makefile
nbd.c [NET]: Add the helper kernel_sock_shutdown() 2007-11-12 18:10:39 -08:00
pktcdvd.c pktcdvd: fix BUG caused by sysfs module reference semantics change 2007-11-08 08:00:24 +01:00
ps2esdi.c
ps3disk.c
rd.c rd: fix data corruption on memory pressure 2007-11-14 18:45:42 -08:00
smart1,2.h
sunvdc.c
swim3.c
sx8.c [PATCH] Fix breakage after SG cleanups 2007-10-23 12:02:39 -07:00
ub.c ub: add sg_init_table for sense and read capacity commands 2007-10-25 09:17:03 +02:00
umem.c
umem.h
viodasd.c
virtio_blk.c SG: audit of drivers that use blk_rq_map_sg() 2007-10-24 13:21:21 +02:00
xd.c
xd.h
xen-blkfront.c
xsysace.c
z2ram.c