Re: [PATCH 04/12] block_dev: only write bdev inode on close

2015-01-14 Thread Jan Kara
On Wed 14-01-15 10:42:33, Christoph Hellwig wrote: > Since 018a17bdc865 ("bdi: reimplement bdev_inode_switch_bdi()") the > block device code writes out all dirty data whenever switching the > backing_dev_info for a block device inode. But a block device inode can > only be dirtied when it is in us

[PATCH 04/12] block_dev: only write bdev inode on close

2015-01-14 Thread Christoph Hellwig
Since 018a17bdc865 ("bdi: reimplement bdev_inode_switch_bdi()") the block device code writes out all dirty data whenever switching the backing_dev_info for a block device inode. But a block device inode can only be dirtied when it is in use, which means we only have to write it out on the final bl

Re: [PATCH 04/12] block_dev: only write bdev inode on close

2015-01-12 Thread Christoph Hellwig
On Sun, Jan 11, 2015 at 12:32:09PM -0500, Tejun Heo wrote: > Is this an optimization or something necessary for the following > changes? If latter, maybe it's a good idea to state why this is > necessary in the description? Otherwise, It gets rid of a bdi reassignment, and thus makes life a lot

Re: [PATCH 04/12] block_dev: only write bdev inode on close

2015-01-11 Thread Tejun Heo
Hello, On Thu, Jan 08, 2015 at 06:45:25PM +0100, Christoph Hellwig wrote: > Since "bdi: reimplement bdev_inode_switch_bdi()" the block device code 018a17bdc865 ("bdi: reimplement bdev_inode_switch_bdi()") would be better. > writes out all dirty data whenever switching the backing_dev_info for >

[PATCH 04/12] block_dev: only write bdev inode on close

2015-01-08 Thread Christoph Hellwig
Since "bdi: reimplement bdev_inode_switch_bdi()" the block device code writes out all dirty data whenever switching the backing_dev_info for a block device inode. But a block device inode can only be dirtied when it is in use, which means we only have to write it out on the final blkdev_put, but n