Re: Why can't I flush /dev/ram0?

Jan Rekorajski
2001-06-18T21:56:04Z

On Mon, 18 Jun 2001, Kelledin Tane wrote:

> At this point, I'm trying to get an initrd working properly. So far, it
> works, the system boots, etc. etc., but whenever I try to do a "blockdev
> --flushbufs /dev/ram0", I get "device or resource busy"
>
> When I mount the filesystem to check it out, nothing appears to have
> anything open on the filesystem. So why am I not able to flush it
> clean?

Because of a bug present in Linus tree. Try this patch:

--- linux.orig/drivers/block/rd.c Mon Nov 20 02:07:47 2000
+++ linux/drivers/block/rd.c Mon Nov 20 04:03:42 2000
@@ -690,6 +690,7 @@
done:
if (infile.f_op->release)
infile.f_op->release(inode, &infile);
+ blkdev_put(out_inode->i_bdev, BDEV_FILE);
set_fs(fs);
return;
free_inodes: /* free inodes on error */

BTW, it's fixed in -ac patches.

Jan
--
Jan Rękorajski | ALL SUSPECTS ARE GUILTY. PERIOD!
baggins<at>mimuw.edu.pl | OTHERWISE THEY WOULDN'T BE SUSPECTS, WOULD THEY?
BOFH, MANIAC | -- TROOPS by Kevin Rubio