*
* 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
*/
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2012, 2015, Intel Corporation.
+ * Copyright (c) 2012, 2017, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
* initializes the current atime, mtime, ctime to avoid regressing a more
* uptodate time on the local client.
*/
-int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
+int lov_merge_lvb_kms(struct lov_stripe_md *lsm, int index,
struct ost_lvb *lvb, __u64 *kms_place)
{
+ struct lov_stripe_md_entry *lse = lsm->lsm_entries[index];
u64 size = 0;
u64 kms = 0;
u64 blocks = 0;
int rc = 0;
assert_spin_locked(&lsm->lsm_lock);
- LASSERT(lsm->lsm_lock_owner == current_pid());
+ LASSERT(lsm->lsm_lock_owner == current->pid);
- CDEBUG(D_INODE, "MDT ID "DOSTID" initial value: s="LPU64" m="LPU64
- " a="LPU64" c="LPU64" b="LPU64"\n", POSTID(&lsm->lsm_oi),
+ CDEBUG(D_INODE, "MDT ID "DOSTID" initial value: s=%llu m=%llu"
+ " a=%llu c=%llu b=%llu\n", POSTID(&lsm->lsm_oi),
lvb->lvb_size, lvb->lvb_mtime, lvb->lvb_atime, lvb->lvb_ctime,
lvb->lvb_blocks);
- for (i = 0; i < lsm->lsm_stripe_count; i++) {
- struct lov_oinfo *loi = lsm->lsm_oinfo[i];
+ for (i = 0; i < lse->lsme_stripe_count; i++) {
+ struct lov_oinfo *loi = lse->lsme_oinfo[i];
u64 lov_size;
u64 tmpsize;
}
tmpsize = loi->loi_kms;
- lov_size = lov_stripe_size(lsm, tmpsize, i);
+ lov_size = lov_stripe_size(lsm, index, tmpsize, i);
if (lov_size > kms)
kms = lov_size;
if (loi->loi_lvb.lvb_size > tmpsize)
tmpsize = loi->loi_lvb.lvb_size;
- lov_size = lov_stripe_size(lsm, tmpsize, i);
+ lov_size = lov_stripe_size(lsm, index, tmpsize, i);
if (lov_size > size)
size = lov_size;
/* merge blocks, mtime, atime */
if (loi->loi_lvb.lvb_ctime > current_ctime)
current_ctime = loi->loi_lvb.lvb_ctime;
- CDEBUG(D_INODE, "MDT ID "DOSTID" on OST[%u]: s="LPU64" m="LPU64
- " a="LPU64" c="LPU64" b="LPU64"\n", POSTID(&lsm->lsm_oi),
+ CDEBUG(D_INODE, "MDT ID "DOSTID" on OST[%u]: s=%llu m=%llu"
+ " a=%llu c=%llu b=%llu\n", POSTID(&lsm->lsm_oi),
loi->loi_ost_idx, loi->loi_lvb.lvb_size,
loi->loi_lvb.lvb_mtime, loi->loi_lvb.lvb_atime,
loi->loi_lvb.lvb_ctime, loi->loi_lvb.lvb_blocks);