Whamcloud - gitweb
LU-7988 hsm: update many cookie status at once
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_iam.c
index 8b7047c..dd671d1 100644 (file)
  * in the LICENSE file that accompanied this code).
  *
  * You should have received a copy of the GNU General Public License
- * version 2 along with this program; If not, see [sun.com URL with a
- * copy of GPLv2].
- *
- * 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.
+ * version 2 along with this program; If not, see
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -27,7 +23,7 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2015, Intel Corporation.
+ * Copyright (c) 2011, 2016, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -182,9 +178,8 @@ iam_load_idle_blocks(struct iam_container *c, iam_ptr_t blk)
 
        bh = __ldiskfs_bread(NULL, inode, blk, 0);
        if (IS_ERR_OR_NULL(bh)) {
-               CERROR("%.16s: cannot load idle blocks, blk = %u, err = %ld\n",
-                      LDISKFS_SB(inode->i_sb)->s_es->s_volume_name, blk,
-                      bh ? PTR_ERR(bh) : -EIO);
+               CERROR("%s: cannot load idle blocks, blk = %u, err = %ld\n",
+                      osd_ino2name(inode), blk, bh ? PTR_ERR(bh) : -EIO);
                c->ic_idle_failed = 1;
                if (bh == NULL)
                        bh = ERR_PTR(-EIO);
@@ -193,9 +188,8 @@ iam_load_idle_blocks(struct iam_container *c, iam_ptr_t blk)
 
        head = (struct iam_idle_head *)(bh->b_data);
        if (le16_to_cpu(head->iih_magic) != IAM_IDLE_HEADER_MAGIC) {
-               CERROR("%.16s: invalid idle block head, blk = %u, magic = %d\n",
-                      LDISKFS_SB(inode->i_sb)->s_es->s_volume_name, blk,
-                      le16_to_cpu(head->iih_magic));
+               CERROR("%s: invalid idle block head, blk = %u, magic = %d\n",
+                      osd_ino2name(inode), blk, le16_to_cpu(head->iih_magic));
                brelse(bh);
                c->ic_idle_failed = 1;
                return ERR_PTR(-EBADF);
@@ -1027,11 +1021,9 @@ static int iam_lookup_lock(struct iam_path *path,
  */
 static int iam_path_lookup(struct iam_path *path, int index)
 {
-        struct iam_container *c;
         struct iam_leaf  *leaf;
         int result;
 
-        c = path->ip_container;
         leaf = &path->ip_leaf;
         result = iam_lookup_lock(path, &leaf->il_lock, DLT_WRITE);
         assert_inv(iam_path_check(path));
@@ -1367,13 +1359,11 @@ int iam_index_next(struct iam_container *c, struct iam_path *path)
         iam_ptr_t cursor;
        struct dynlock_handle *lh[DX_MAX_TREE_HEIGHT] = { NULL, };
         int result;
-        struct inode *object;
 
         /*
          * Locking for iam_index_next()... is to be described.
          */
 
-        object = c->ic_object;
         cursor = path->ip_frame->leaf;
 
         while (1) {
@@ -2227,8 +2217,8 @@ static iam_ptr_t iam_index_shrink(handle_t *h, struct iam_path *p,
 
        lh = iam_lock_htree(c, frame->curidx, DLT_WRITE);
        if (lh == NULL) {
-               CWARN("%.16s: No memory to recycle idle blocks\n",
-                     LDISKFS_SB(inode->i_sb)->s_es->s_volume_name);
+               CWARN("%s: No memory to recycle idle blocks\n",
+                     osd_ino2name(inode));
                return 0;
        }
 
@@ -2369,8 +2359,8 @@ static void iam_recycle_leaf(handle_t *h, struct iam_path *p,
 unlock:
        mutex_unlock(&c->ic_idle_mutex);
        if (rc != 0)
-               CWARN("%.16s: idle blocks failed, will lose the blk %u\n",
-                     LDISKFS_SB(inode->i_sb)->s_es->s_volume_name, blk);
+               CWARN("%s: idle blocks failed, will lose the blk %u\n",
+                     osd_ino2name(inode), blk);
 }
 
 /*