From: Peng Tao <bergwolf@gmail.com>
To: Trond.Myklebust@netapp.com
Cc: linux-nfs@vger.kernel.org, Peng Tao <tao.peng@emc.com>
Subject: [PATCH 2/3] pnfsblock: call block plug in bl_dio_begin/end
Date: Sun, 27 May 2012 13:32:59 +0800 [thread overview]
Message-ID: <1338096780-2763-3-git-send-email-bergwolf@gmail.com> (raw)
In-Reply-To: <1338096780-2763-1-git-send-email-bergwolf@gmail.com>
Signed-off-by: Peng Tao <tao.peng@emc.com>
---
fs/nfs/blocklayout/blocklayout.c | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/fs/nfs/blocklayout/blocklayout.c b/fs/nfs/blocklayout/blocklayout.c
index 7ae8a60..53cb450 100644
--- a/fs/nfs/blocklayout/blocklayout.c
+++ b/fs/nfs/blocklayout/blocklayout.c
@@ -996,6 +996,19 @@ bl_clear_layoutdriver(struct nfs_server *server)
return 0;
}
+static bool bl_dio_begin(struct inode *inode, const struct iovec *iov,
+ unsigned long nr_segs, loff_t pos,
+ struct blk_plug *plug)
+{
+ blk_start_plug(plug);
+ return true;
+}
+
+void bl_dio_end(struct blk_plug *plug)
+{
+ blk_finish_plug(plug);
+}
+
static const struct nfs_pageio_ops bl_pg_read_ops = {
.pg_init = pnfs_generic_pg_init_read,
.pg_test = pnfs_generic_pg_test,
@@ -1013,6 +1026,8 @@ static struct pnfs_layoutdriver_type blocklayout_type = {
.name = "LAYOUT_BLOCK_VOLUME",
.read_pagelist = bl_read_pagelist,
.write_pagelist = bl_write_pagelist,
+ .dio_begin = bl_dio_begin,
+ .dio_end = bl_dio_end,
.alloc_layout_hdr = bl_alloc_layout_hdr,
.free_layout_hdr = bl_free_layout_hdr,
.alloc_lseg = bl_alloc_lseg,
--
1.7.1.262.g5ef3d
next prev parent reply other threads:[~2012-05-27 5:33 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-27 5:32 [PATCH 0/3] NFS41: make block layout driver work w/ NFS DIO changes Peng Tao
2012-05-27 5:32 ` [PATCH 1/3] NFS41: add pnfs_dio_begin/dio_end Peng Tao
2012-05-27 16:29 ` Myklebust, Trond
2012-05-28 2:30 ` tao.peng
2012-05-28 3:42 ` Myklebust, Trond
2012-05-28 4:13 ` tao.peng
2012-05-28 10:44 ` Boaz Harrosh
2012-05-28 10:51 ` Boaz Harrosh
2012-05-28 17:14 ` Peng Tao
2012-05-28 17:24 ` Boaz Harrosh
2012-05-28 17:36 ` Peng Tao
2012-05-28 17:44 ` Myklebust, Trond
2012-05-27 5:32 ` Peng Tao [this message]
2012-05-27 5:33 ` [PATCH 3/3] pnfsblock: bail out unaligned DIO Peng Tao
2012-05-27 16:38 ` Myklebust, Trond
2012-05-28 2:30 ` tao.peng
2012-05-28 3:45 ` Myklebust, Trond
2012-05-28 4:26 ` tao.peng
2012-05-28 16:33 ` Myklebust, Trond
2012-05-28 17:07 ` Peng Tao
2012-05-28 11:26 ` Boaz Harrosh
2012-05-28 16:50 ` Peng Tao
2012-05-28 17:10 ` Boaz Harrosh
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=1338096780-2763-3-git-send-email-bergwolf@gmail.com \
--to=bergwolf@gmail.com \
--cc=Trond.Myklebust@netapp.com \
--cc=linux-nfs@vger.kernel.org \
--cc=tao.peng@emc.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.