X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Flov%2Flov_offset.c;h=3a7f6106796c58fb48ca66213f8c38fc4e606373;hp=d325e1c44c848e7300b9869fc29cbb25ec6987fc;hb=f913720c7e09f9e829bbd6bea49e0f4cb9b4e6c5;hpb=89e685e154daba096c8388e39e279c6e6b342940;ds=sidebyside diff --git a/lustre/lov/lov_offset.c b/lustre/lov/lov_offset.c index d325e1c..3a7f610 100644 --- a/lustre/lov/lov_offset.c +++ b/lustre/lov/lov_offset.c @@ -15,11 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ @@ -27,7 +23,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, 2014, Intel Corporation. + * Copyright (c) 2012, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -76,9 +72,9 @@ 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_CACHE_SHIFT, + offset = lov_stripe_size(lsm, (stripe_index << PAGE_SHIFT) + 1, stripe); - return offset >> PAGE_CACHE_SHIFT; + return offset >> PAGE_SHIFT; } /* we have an offset in file backed by an lov and want to find out where @@ -231,15 +227,14 @@ loff_t lov_size_to_stripe(struct lov_stripe_md *lsm, u64 file_size, * that is contained within the lov extent. this returns true if the given * stripe does intersect with the lov extent. */ int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, - loff_t start, loff_t end, - loff_t *obd_start, loff_t *obd_end) + u64 start, u64 end, u64 *obd_start, u64 *obd_end) { int start_side, end_side; start_side = lov_stripe_offset(lsm, start, stripeno, obd_start); end_side = lov_stripe_offset(lsm, end, stripeno, obd_end); - CDEBUG(D_INODE, "["LPD64"->"LPD64"] -> [(%d) "LPD64"->"LPD64" (%d)]\n", + CDEBUG(D_INODE, "[%lld->%lld] -> [(%d) %lld->%lld (%d)]\n", start, end, start_side, *obd_start, *obd_end, end_side); /* this stripe doesn't intersect the file extent when neither