Re: ancient block_dev patch

From: Andrew Morton (akpm@digeo.com)
Date: Mon Mar 24 2003 - 13:16:05 EST


davej@codemonkey.org.uk wrote:
>
> Andrew,
> What became of this patch ? Is it needed ?
>
>
> ...
> down(&bdev->bd_sem);
> - switch (kind) {
> - case BDEV_FILE:
> - case BDEV_FS:
> - sync_blockdev(bd_inode->i_bdev);
> - break;
> - }
> lock_kernel();
> - if (!--bdev->bd_openers)
> + if (!--bdev->bd_openers) {
> + switch (kind) {
> + case BDEV_FILE:
> + case BDEV_FS:
> + sync_blockdev(bd_inode->i_bdev);
> + break;
> + }
> kill_bdev(bdev);
> + }

Seems so, yes. Without it we sync the blockdev on every close rather
than on the final one.

It has scary potential to expose existing bugs. I shall play with it,
thanks.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Mar 31 2003 - 22:00:16 EST