From: Fred Isaman <iisaman@netapp.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 7/7] pnfs: Revert "pnfs_post_submit: Restore "pnfs: pnfs_do_flush" part 2"
Date: Fri, 11 Jun 2010 03:40:39 -0400 [thread overview]
Message-ID: <1276242039-18649-8-git-send-email-iisaman@netapp.com> (raw)
In-Reply-To: <1276242039-18649-7-git-send-email-iisaman@netapp.com>
Now that block does not use do_flush, it can be removed entirely
Conflicts:
fs/nfs/pnfs.c
fs/nfs/pnfs.h
Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
fs/nfs/pnfs.c | 14 --------------
fs/nfs/pnfs.h | 24 ------------------------
fs/nfs/write.c | 4 ++--
include/linux/nfs4_pnfs.h | 3 ---
4 files changed, 2 insertions(+), 43 deletions(-)
diff --git a/fs/nfs/pnfs.c b/fs/nfs/pnfs.c
index d6ba358..10f133c 100644
--- a/fs/nfs/pnfs.c
+++ b/fs/nfs/pnfs.c
@@ -1716,20 +1716,6 @@ int _pnfs_write_end(struct inode *inode, struct page *page,
return status;
}
- /* Given an nfs request, determine if it should be flushed before proceeding.
- * It should default to returning False, returning True only if there is a
- * specific reason to flush.
- */
-int _pnfs_do_flush(struct inode *inode, struct nfs_page *req)
-{
- struct nfs_server *nfss = NFS_SERVER(inode);
- int status = 0;
-
- /* Note that lseg==NULL may be useful info for do_flush */
- status = nfss->pnfs_curr_ld->ld_policy_ops->do_flush(req->wb_lseg, req);
- return status;
-}
-
enum pnfs_try_status
_pnfs_try_to_write_data(struct nfs_write_data *data,
const struct rpc_call_ops *call_ops, int how)
diff --git a/fs/nfs/pnfs.h b/fs/nfs/pnfs.h
index fd7c532..53308df 100644
--- a/fs/nfs/pnfs.h
+++ b/fs/nfs/pnfs.h
@@ -77,7 +77,6 @@ int _pnfs_write_begin(struct inode *inode, struct page *page,
int _pnfs_write_end(struct inode *inode, struct page *page,
loff_t pos, unsigned len, unsigned copied,
struct pnfs_layout_segment *lseg);
-int _pnfs_do_flush(struct inode *inode, struct nfs_page *req);
#define PNFS_EXISTS_LDIO_OP(srv, opname) ((srv)->pnfs_curr_ld && \
(srv)->pnfs_curr_ld->ld_io_ops && \
@@ -186,24 +185,6 @@ static inline int pnfs_write_begin(struct file *filp, struct page *page,
return status;
}
-/* req may not be locked, so we have to be prepared for req->wb_page being
- * set to NULL at any time.
- */
-static inline int pnfs_do_flush(struct nfs_page *req)
-{
- struct page *page = req->wb_page;
- struct inode *inode;
-
- if (!page)
- return 1;
- inode = page->mapping->host;
-
- if (PNFS_EXISTS_LDPOLICY_OP(NFS_SERVER(inode), do_flush))
- return _pnfs_do_flush(inode, req);
- else
- return 0;
-}
-
static inline int pnfs_write_end(struct file *filp, struct page *page,
loff_t pos, unsigned len, unsigned copied,
struct pnfs_layout_segment *lseg)
@@ -335,11 +316,6 @@ pnfs_try_to_commit(struct nfs_write_data *data,
return PNFS_NOT_ATTEMPTED;
}
-static inline int pnfs_do_flush(struct nfs_page *req)
-{
- return 0;
-}
-
static inline int pnfs_write_begin(struct file *filp, struct page *page,
loff_t pos, unsigned len,
struct pnfs_layout_segment *lseg,
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 0dee870..ea36845 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -603,7 +603,7 @@ static struct nfs_page *nfs_try_to_update_request(struct inode *inode,
* have flushed out requests having wrong owners.
*/
if (offset > rqend || end < req->wb_offset ||
- req->wb_lseg != lseg || pnfs_do_flush(req))
+ req->wb_lseg != lseg)
goto out_flushme;
if (nfs_set_page_tag_locked(req))
@@ -712,7 +712,7 @@ int nfs_flush_incompatible(struct file *file, struct page *page,
if (req == NULL)
return 0;
do_flush = req->wb_page != page || req->wb_context != ctx ||
- req->wb_lseg != lseg || pnfs_do_flush(req);
+ req->wb_lseg != lseg;
nfs_release_request(req);
if (!do_flush)
return 0;
diff --git a/include/linux/nfs4_pnfs.h b/include/linux/nfs4_pnfs.h
index b7772c8..7016305 100644
--- a/include/linux/nfs4_pnfs.h
+++ b/include/linux/nfs4_pnfs.h
@@ -210,9 +210,6 @@ struct layoutdriver_policy_operations {
/* test for nfs page cache coalescing */
int (*pg_test)(struct nfs_pageio_descriptor *, struct nfs_page *, struct nfs_page *);
- /* Test for pre-write request flushing */
- int (*do_flush)(struct pnfs_layout_segment *lseg, struct nfs_page *req);
-
/* Retreive the block size of the file system.
* If gather_across_stripes == 1, then the file system will gather
* requests into the block size.
--
1.6.6.1
next prev parent reply other threads:[~2010-06-11 7:40 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-11 7:40 [PATCH 0/7] LAYOUTGET invocation cleanup patches Fred Isaman
2010-06-11 7:40 ` [PATCH 1/7] SQUASHME: pnfs: export get_lseg and put_lseg Fred Isaman
2010-06-11 7:40 ` [PATCH 2/7] SQUASHME: pnfsblock: write_begin adjust for removed fields Fred Isaman
2010-06-11 7:40 ` [PATCH 3/7] SQUASHME: pnfsblock: write_end adjust for removed ok_to_use_pnfs Fred Isaman
2010-06-11 7:40 ` [PATCH 4/7] SQUASHME: pnfsblock: write_end_cleanup " Fred Isaman
2010-06-11 7:40 ` [PATCH 5/7] SQUASHME: pnfsblock: bl_write_pagelist support functions adjust for missing PG_USE_PNFS Fred Isaman
2010-06-11 7:40 ` [PATCH 6/7] SQUASHME: pnfsblock: bl_write_pagelist " Fred Isaman
2010-06-11 7:40 ` Fred Isaman [this message]
2010-06-11 8:07 ` [PATCH 0/7] LAYOUTGET invocation cleanup patches Boaz Harrosh
2010-06-11 8:47 ` Fred Isaman
2010-06-11 8:58 ` Boaz Harrosh
2010-06-11 13:44 ` Fred Isaman
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=1276242039-18649-8-git-send-email-iisaman@netapp.com \
--to=iisaman@netapp.com \
--cc=linux-nfs@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