Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1367458
| From | green@linuxhacker.ru |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 21/43] staging/lustre/llite: clip page correctly for vvp_io_commit_sync |
| Date | 2016-03-30 19:00 +0200 |
| Message-ID | <rirDo-8fh-81@gated-at.bofh.it> (permalink) |
| References | <rirtD-8bi-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jinshan Xiong <jinshan.xiong@intel.com>
The original code was wrong which clipped page incorrectly for
partial pages started with zero.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/8531
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4201
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: wangdi <di.wang@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
---
drivers/staging/lustre/lustre/llite/vvp_io.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c
index fb6f932..e44ef21 100644
--- a/drivers/staging/lustre/lustre/llite/vvp_io.c
+++ b/drivers/staging/lustre/lustre/llite/vvp_io.c
@@ -595,15 +595,17 @@ static int vvp_io_commit_sync(const struct lu_env *env, struct cl_io *io,
if (plist->pl_nr == 0)
return 0;
- if (from != 0) {
+ if (from > 0 || to != PAGE_SIZE) {
page = cl_page_list_first(plist);
- cl_page_clip(env, page, from,
- plist->pl_nr == 1 ? to : PAGE_SIZE);
- }
- if (to != PAGE_SIZE && plist->pl_nr > 1) {
+ if (plist->pl_nr == 1) {
+ cl_page_clip(env, page, from, to);
+ } else if (from > 0) {
+ cl_page_clip(env, page, from, PAGE_SIZE);
+ } else {
page = cl_page_list_last(plist);
cl_page_clip(env, page, 0, to);
}
+ }
cl_2queue_init(queue);
cl_page_list_splice(plist, &queue->c2_qin);
--
2.1.0
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/43] Lustre IO stack simplifications and cleanups green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 04/43] staging/lustre: Reintroduce global env list green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 10/43] staging/lustre/osc: add weight function for DLM lock green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 20/43] staging/lustre: update comments after cl_lock simplification green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 02/43] staging/lustre: Get rid of CFS_PAGE_MASK green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 17/43] staging/lustre: Remove struct ll_iattr green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 08/43] staging/lustre/obdclass: Add a preallocated percpu cl_env green@linuxhacker.ru - 2016-03-30 18:50 +0200
[PATCH 25/43] staging/lustre/llite: rename ccc_device to vvp_device green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 28/43] staging/lustre/llite: rename ccc_lock to vvp_lock green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 43/43] staging/lustre/ldlm: restore the ELC for enqueue green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 31/43] staging/lustre/llite: use vui prefix for struct vvp_io members green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 15/43] staging/lustre/obd: remove struct client_obd_lock green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 30/43] staging/lustre/llite: merge ccc_io and vvp_io green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 29/43] staging/lustre:llite: remove struct ll_ra_read green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 37/43] staging/lustre/llite: Remove ccc_global_{init,fini}() green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 38/43] staging/lustre/llite: Move ll_dirent_type_get and make it static green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 16/43] staging/lustre/llite: remove some cl wrappers green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 27/43] staging/lustre/llite: rename ccc_page to vvp_page green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 41/43] staging/lustre/ldlm: ELC picks locks in a safer policy green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 32/43] staging/lustre/llite: move vvp_io functions to vvp_io.c green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 40/43] staging/lustre/llite: Remove unused vui_local_lock field green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 42/43] staging/lustre/ldlm: revert changes to ldlm_cancel_aged_policy() green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 33/43] staging/lustre/llite: rename ccc_req to vvp_req green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 36/43] staging/lustre/llite: rename struct ccc_thread_info to vvp_thread_info green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 23/43] staging/lustre/llite: make sure we do cl_page_clip on the last page green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 14/43] staging/lustre/lmv: remove lmv_init_{lock,unlock}() green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 22/43] staging/lustre/llite: deadlock for page write green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 18/43] staging/lustre/clio: generalize cl_sync_io green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 39/43] staging/lustre/llite: Move several declarations to llite_internal.h green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 35/43] staging/lustre/llite: Rename struct vvp_thread_info to ll_thread_info green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 34/43] staging/lustre/llite: Rename struct ccc_grouplock to ll_grouplock green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 24/43] staging/lustre/llite: merge lclient.h into llite/vvp_internal.h green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 21/43] staging/lustre/llite: clip page correctly for vvp_io_commit_sync green@linuxhacker.ru - 2016-03-30 19:00 +0200
[PATCH 12/43] staging/lustre/clio: optimize read ahead code green@linuxhacker.ru - 2016-03-30 19:10 +0200
[PATCH 05/43] staging/lustre/osc: Adjustment on osc LRU for performance green@linuxhacker.ru - 2016-03-30 19:10 +0200
[PATCH 13/43] staging/lustre/llite: remove lli_lvb green@linuxhacker.ru - 2016-03-30 19:10 +0200
[PATCH 06/43] staging/lustre/osc: to drop LRU pages with cl_lru_work green@linuxhacker.ru - 2016-03-30 19:10 +0200
csiph-web