-
Andrew Morton authored
Sigh. ramdisk almost works, except it loses data on umount. This is because the files which are atop the ramdisk do not contribute to dirty memory accounting, but they do need writeback. So when sync() calls sync_inodes_sb() to do the work, sync_inodes_sb() hopelessly underestimates the number of pages which need writeback for a complete sync. If you run `sync' enough times, everything eventually hits "disk" and all is happy. The root cause here is that the ramdisk and the files which it hosts shared the same backing_dev_info. This is inappropriate because the hosted files *do* want to writeback and really should contribute to dirty memory accounting. But the ramdisk inode itself wants neither. So. The patch sets up the infrastructure which permits a blockdev to provide a separate backing_dev_info for the files which it hosts. It's a bit of a ramdisk-special.
520808bf