From: NeilBrown <neilb@suse.de>
To: linux-raid@vger.kernel.org
Cc: Christoph Hellwig <hch@lst.de>, NeilBrown <neilb@suse.de>
Subject: [md PATCH 05/11] md: remove clumsy usage of do_sync_mapping_range from bitmap code
Date: Fri, 16 Oct 2009 16:49:18 +1100 [thread overview]
Message-ID: <20091016054918.24208.52325.stgit@notabene.brown> (raw)
In-Reply-To: <20091016054316.24208.33818.stgit@notabene.brown>
and replace with vfs_fsync which is much neater (but wasn't exported,
or even in existence at the time the code was written).
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: NeilBrown <neilb@suse.de>
---
drivers/md/bitmap.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index 6986b00..60e2b32 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -1624,10 +1624,11 @@ 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);
+ /* As future accesses to this file will use bmap,
+ * and bypass the page cache, we must sync the file
+ * first.
+ */
+ vfs_fsync(file, file->f_dentry, 1);
}
/* read superblock from bitmap file (this sets bitmap->chunksize) */
err = bitmap_read_sb(bitmap);
next prev parent reply other threads:[~2009-10-16 5:49 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-16 5:49 [md PATCH 00/11] Series short description NeilBrown
2009-10-16 5:49 ` [md PATCH 01/11] Revert "md: do not progress the resync process if the stripe was blocked" NeilBrown
2009-10-16 5:49 ` [md PATCH 03/11] md/raid5: initialize conf->device_lock earlier NeilBrown
2009-10-16 5:49 ` [md PATCH 02/11] md/raid1/raid10: add a cond_resched NeilBrown
2009-10-16 5:49 ` NeilBrown [this message]
2009-10-16 5:49 ` [md PATCH 04/11] md: raid1/raid10: handle allocation errors during array setup NeilBrown
2009-10-16 5:49 ` [md PATCH 06/11] md: drivers/md/unroll.pl replaced with awk analog NeilBrown
2009-10-16 5:49 ` [md PATCH 11/11] raid6/async_tx: handle holes in block list in async_syndrome_val NeilBrown
2009-10-16 5:49 ` [md PATCH 08/11] md: fix problems with RAID6 calculations for DDF NeilBrown
2009-10-16 5:49 ` [md PATCH 09/11] md: Fix handling of raid5 array which is being reshaped to fewer devices NeilBrown
2009-10-16 5:49 ` [md PATCH 10/11] md/async: don't pass a memory pointer as a page pointer NeilBrown
2009-10-16 5:49 ` [md PATCH 07/11] md/raid456: downlevel multicore operations to raid_run_ops NeilBrown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091016054918.24208.52325.stgit@notabene.brown \
--to=neilb@suse.de \
--cc=hch@lst.de \
--cc=linux-raid@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).