Re: [PATCH] Fix over-zealous flush_disk when changing device size.

2 messages, 2 authors, 2011-02-21 · open the first message on its own page

Re: [PATCH] Fix over-zealous flush_disk when changing device size.

From: Jeff Moyer <hidden>
Date: 2011-02-21 19:41:58

NeilBrown [off-list ref] writes:
quoted hunk
-int __invalidate_device(struct block_device *bdev)
+int __invalidate_device2(struct block_device *bdev, bool kill_dirty)
 {
 	struct super_block *sb = get_super(bdev);
 	int res = 0;
@@ -1614,7 +1614,7 @@ int __invalidate_device(struct block_device *bdev)
 		 * hold).
 		 */
 		shrink_dcache_sb(sb);
-		res = invalidate_inodes(sb);
+		res = invalidate_inodes(sb, kill_dirty);
 		drop_super(sb);
 	}
 	invalidate_bdev(bdev);
Neil, I think you also need to change the EXPORT_SYMBOL from
__invalidate_device to __invalidate_device2.  The floppy module won't
build without that change.

Cheers,
Jeff

Re: [PATCH] Fix over-zealous flush_disk when changing device size.

From: NeilBrown <hidden>
Date: 2011-02-21 21:14:58

On Mon, 21 Feb 2011 14:36:01 -0500 Jeff Moyer [off-list ref] wrote:
NeilBrown [off-list ref] writes:
quoted
-int __invalidate_device(struct block_device *bdev)
+int __invalidate_device2(struct block_device *bdev, bool kill_dirty)
 {
 	struct super_block *sb = get_super(bdev);
 	int res = 0;
@@ -1614,7 +1614,7 @@ int __invalidate_device(struct block_device *bdev)
 		 * hold).
 		 */
 		shrink_dcache_sb(sb);
-		res = invalidate_inodes(sb);
+		res = invalidate_inodes(sb, kill_dirty);
 		drop_super(sb);
 	}
 	invalidate_bdev(bdev);
Neil, I think you also need to change the EXPORT_SYMBOL from
__invalidate_device to __invalidate_device2.  The floppy module won't
build without that change.
Good point, thank.
I've just made this change in mt for-next tree so it should appear in -next
today?

NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help