ancient block_dev patch
Andrew,
What became of this patch ? Is it needed ?
fs/block_dev.c +8 -7
@@ -653,15 +653,16 @@ int blkdev_put(struct block_device *bdevstruct 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 );
Quoted 14 lines · [email protected] wrote:
Andrew,
What became of this patch ? Is it needed ?...
fs/block_dev.c +0
-6down (&bdev->bd_sem); -switch (kind) { -case BDEV_FILE : -case BDEV_FS : -sync_blockdev (bd_inode->i_bdev); -break ; - }lock_kernel ();
fs/block_dev.c int blkdev_put(struct block_device *bdev · line 665
Quoted 10 lines
fs/block_dev.c +8
-1-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.
Quoted 2 lines · 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.
Quoted 6 lines · Christoph Hellwig
Quoted 2 lines · 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