Re: Linux 2.4.10-pre11

From: Chris Mason (mason@suse.com)
Date: Thu Sep 20 2001 - 10:44:48 EST


On Thursday, September 20, 2001 10:50:16 AM -0400 Alexander Viro
<viro@math.psu.edu> wrote:

>> The biggest exception is blkdev_writepage directly submits the io instead
>> of marking the buffers dirty. This means the buffers won't be on
>> the locked/dirty list, and they won't get waited on. Similar problem
>> for direct io.
>
> <nod> And if you add Andrea's (perfectly valid) observation re having no
> need to sync any fs structures we might have for that device, you get
> __block_fsync(). After that it's easy to merge blkdev_close() code into
> blkdev_put().
>
>

Ok, __block_fsync is much better than just fsync_dev.

Are there other parts of blkdev_close you want merged into
blkdev_put? Without changing the reread blocks on last close
semantics, I think this is all we can do.

As far as I can tell, bdev->bd_inode is valid to send
to __block_fsync, am I missing something?

--- linux/fs/block_dev.c Mon Sep 17 11:28:56 2001
+++ linux/fs/block_dev.c Thu Sep 20 11:21:39 2001
@@ -704,10 +704,9 @@
         kdev_t rdev = to_kdev_t(bdev->bd_dev); /* this should become bdev */
         down(&bdev->bd_sem);
         lock_kernel();
- if (kind == BDEV_FILE)
- fsync_dev(rdev);
- else if (kind == BDEV_FS)
- fsync_no_super(rdev);
+
+ __block_fsync(bdev->bd_inode) ;
+
         /* only filesystems uses buffer cache for the metadata these days */
         if (kind == BDEV_FS)
                 invalidate_buffers(rdev);

-
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 : Sun Sep 23 2001 - 21:00:38 EST