Andrew,
What became of this patch ? Is it needed ?
diff -urpN --exclude-from=/home/davej/.exclude bk-linus/fs/block_dev.c linux-2.5/fs/block_dev.c
--- bk-linus/fs/block_dev.c 2003-03-17 12:40:51.000000000 +0000
+++ linux-2.5/fs/block_dev.c 2003-03-17 13:09:03.000000000 +0000
@@ -653,15 +653,16 @@ int blkdev_put(struct block_device *bdev
struct gendisk *disk = bdev->bd_disk;
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);
+ }
if (bdev->bd_contains == bdev) {
if (disk->fops->release)
ret = disk->fops->release(bd_inode, NULL);
[email protected] 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.
On Mon, Mar 24, 2003 at 04:41:54PM +0000, [email protected] wrote:
> Andrew,
> What became of this patch ? Is it needed ?
It's not needed but a nice speedup for certain loads. IIRC one of them
was INN directly using blockdevices.
On Mon, 2003-03-24 at 19:16, Christoph Hellwig wrote:
> On Mon, Mar 24, 2003 at 04:41:54PM +0000, [email protected] wrote:
> > Andrew,
> > What became of this patch ? Is it needed ?
>
> It's not needed but a nice speedup for certain loads. IIRC one of them
> was INN directly using blockdevices
and certain dvd players