linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] md: stop using do_sync_mapping_range
@ 2009-09-23 13:18 Christoph Hellwig
  2009-09-23 13:47 ` Jamie Lokier
  2009-09-23 22:52 ` Neil Brown
  0 siblings, 2 replies; 6+ messages in thread
From: Christoph Hellwig @ 2009-09-23 13:18 UTC (permalink / raw)
  To: Neil Brown; +Cc: linux-raid, linux-fsdevel

It's a very awkward way to write out all data and wait for it, so just
call filemap_write_and_wait.  I still can't figure what the point of
all this is, so a comment would surely be helpful.

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: vfs-2.6.git/drivers/md/bitmap.c
===================================================================
--- vfs-2.6.git.orig/drivers/md/bitmap.c	2009-09-22 14:31:08.698262797 -0300
+++ vfs-2.6.git/drivers/md/bitmap.c	2009-09-22 14:33:01.573762756 -0300
@@ -1621,10 +1621,7 @@ int bitmap_create(mddev_t *mddev)
 	bitmap->offset = mddev->bitmap_offset;
 	if (file) {
 		get_file(file);
-		do_sync_mapping_range(file->f_mapping, 0, LLONG_MAX,
-				      SYNC_FILE_RANGE_WAIT_BEFORE |
-				      SYNC_FILE_RANGE_WRITE |
-				      SYNC_FILE_RANGE_WAIT_AFTER);
+		filemap_write_and_wait(file->f_mapping);
 	}
 	/* read superblock from bitmap file (this sets bitmap->chunksize) */
 	err = bitmap_read_sb(bitmap);

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-09-26 21:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-23 13:18 [PATCH] md: stop using do_sync_mapping_range Christoph Hellwig
2009-09-23 13:47 ` Jamie Lokier
2009-09-26 15:11   ` Christoph Hellwig
2009-09-23 22:52 ` Neil Brown
2009-09-26 15:13   ` Christoph Hellwig
2009-09-26 21:51     ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).