* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 only,
* as published by the Free Software Foundation.
-
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License version 2 for more details. A copy is
* included in the COPYING file that accompanied this code.
-
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
* Copyright 2009 Sun Microsystems, Inc. All rights reserved
* Use is subject to license terms.
*
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
#define D_QOS D_OTHER
-#if 0
-#define QOS_DEBUG(fmt, ...) CDEBUG(D_OTHER, fmt, ## __VA_ARGS__)
-#define QOS_CONSOLE(fmt, ...) LCONSOLE(D_OTHER, fmt, ## __VA_ARGS__)
-#else
-#define QOS_DEBUG(fmt, ...)
-#define QOS_CONSOLE(fmt, ...)
-#endif
+#define QOS_DEBUG(fmt, ...) CDEBUG(D_QOS, fmt, ## __VA_ARGS__)
+#define QOS_CONSOLE(fmt, ...) LCONSOLE(D_QOS, fmt, ## __VA_ARGS__)
#define TGT_BAVAIL(i) (OST_TGT(lod,i)->ltd_statfs.os_bavail * \
OST_TGT(lod,i)->ltd_statfs.os_bsize)
{
struct lod_tgt_desc *ost;
int rc;
+ ENTRY;
LASSERT(d);
ost = OST_TGT(d,index);
struct obd_device *obd = lod2obd(lod);
struct ost_pool *osts = &(lod->lod_pool_info);
unsigned int i;
- int idx, rc = 0;
+ int idx;
__u64 max_age, avail;
ENTRY;
down_write(&lod->lod_qos.lq_rw_sem);
if (cfs_time_beforeq_64(max_age, obd->obd_osfs_age))
- GOTO(out, rc = 0);
+ goto out;
for (i = 0; i < osts->op_count; i++) {
idx = osts->op_array[i];
avail = OST_TGT(lod,idx)->ltd_statfs.os_bavail;
- rc = lod_statfs_and_check(env, lod, idx,
- &OST_TGT(lod,idx)->ltd_statfs);
- if (rc)
- break;
+ if (lod_statfs_and_check(env, lod, idx,
+ &OST_TGT(lod, idx)->ltd_statfs))
+ continue;
if (OST_TGT(lod,idx)->ltd_statfs.os_bavail != avail)
/* recalculate weigths */
lod->lod_qos.lq_dirty = 1;