aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorAlexander Boyko <alexander_boyko@xyratex.com>2015-02-01 21:52:01 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-02-07 17:27:16 +0800
commitc00266e369b945945316dad3869342d07f4be868 (patch)
tree4f7cd71d00a56256616265b80a3ff40ed1b23c91 /drivers/staging
parentstaging/lustre/ptlrpc: avoid list scan in ptlrpcd_check (diff)
downloadlinux-dev-c00266e369b945945316dad3869342d07f4be868.tar.xz
linux-dev-c00266e369b945945316dad3869342d07f4be868.zip
staging/lustre/osc: split different type of IO
Do not allow different type of pages at the same rpc. Signed-off-by: Alexander Boyko <alexander_boyko@xyratex.com> Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Xyratex-bug-id: MRP-859 Reviewed-on: http://review.whamcloud.com/10930 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3192 Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Niu Yawei <yawei.niu@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_cache.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
index 370e6d4896c6..7022ed42d2d1 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cache.c
+++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
@@ -1820,6 +1820,9 @@ static int try_to_add_extent_for_io(struct client_obd *cli,
int *pc, unsigned int *max_pages)
{
struct osc_extent *tmp;
+ struct osc_async_page *oap = list_first_entry(&ext->oe_pages,
+ struct osc_async_page,
+ oap_pending_item);
EASSERT((ext->oe_state == OES_CACHE || ext->oe_state == OES_LOCK_DONE),
ext);
@@ -1829,6 +1832,10 @@ static int try_to_add_extent_for_io(struct client_obd *cli,
return 0;
list_for_each_entry(tmp, rpclist, oe_link) {
+ struct osc_async_page *oap2;
+
+ oap2 = list_first_entry(&tmp->oe_pages, struct osc_async_page,
+ oap_pending_item);
EASSERT(tmp->oe_owner == current, tmp);
#if 0
if (overlapped(tmp, ext)) {
@@ -1836,6 +1843,11 @@ static int try_to_add_extent_for_io(struct client_obd *cli,
EASSERT(0, ext);
}
#endif
+ if (oap2cl_page(oap)->cp_type != oap2cl_page(oap2)->cp_type) {
+ CDEBUG(D_CACHE, "Do not permit different type of IO"
+ " for a same RPC\n");
+ return 0;
+ }
if (tmp->oe_srvlock != ext->oe_srvlock ||
!tmp->oe_grants != !ext->oe_grants)