Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1414584 > unrolled thread
| Started by | green@linuxhacker.ru |
|---|---|
| First post | 2016-06-06 05:30 +0200 |
| Last post | 2016-06-06 05:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 1/4] staging/lustre/lov: calculate file offset correctly green@linuxhacker.ru - 2016-06-06 05:30 +0200
| From | green@linuxhacker.ru |
|---|---|
| Date | 2016-06-06 05:30 +0200 |
| Subject | [PATCH 1/4] staging/lustre/lov: calculate file offset correctly |
| Message-ID | <rGToK-7AE-33@gated-at.bofh.it> |
From: Jinshan Xiong <jinshan.xiong@intel.com>
In lov_stripe_pgoff(), it calls lov_stripe_size() to calculate the
file size by ost_size, which will be wrong if the stripe_index
happens to be stripe aligned.
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/14462
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6482
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
---
drivers/staging/lustre/lustre/lov/lov_offset.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c
index 9302f06..7636bfa 100644
--- a/drivers/staging/lustre/lustre/lov/lov_offset.c
+++ b/drivers/staging/lustre/lustre/lov/lov_offset.c
@@ -74,7 +74,7 @@ pgoff_t lov_stripe_pgoff(struct lov_stripe_md *lsm, pgoff_t stripe_index,
{
loff_t offset;
- offset = lov_stripe_size(lsm, stripe_index << PAGE_SHIFT, stripe);
+ offset = lov_stripe_size(lsm, (stripe_index << PAGE_SHIFT) + 1, stripe);
return offset >> PAGE_SHIFT;
}
--
2.7.4
Back to top | Article view | linux.kernel
csiph-web