Whamcloud - gitweb
LU-16302 llite: Use alloc_inode_sb() to allocate inodes
[fs/lustre-release.git] / lustre / osd-ldiskfs / osd_iam_lfix.c
index 5d44a33..c8ff819 100644 (file)
@@ -27,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * iam_lfix.c
  * implementation of iam format for fixed size records.
@@ -512,7 +511,7 @@ static int iam_lfix_leaf_empty(struct iam_leaf *leaf)
        return lentry_count_get(leaf) == 0;
 }
 
-static struct iam_leaf_operations iam_lfix_leaf_ops = {
+static const struct iam_leaf_operations iam_lfix_leaf_ops = {
        .init           = iam_lfix_init,
        .init_new       = iam_lfix_init_new,
        .fini           = iam_lfix_fini,
@@ -659,7 +658,7 @@ static struct iam_path_descr *iam_lfix_ipd_alloc(const struct iam_container *c,
        return iam_ipd_alloc(area, c->ic_descr->id_ikey_size);
 }
 
-static struct iam_operations iam_lfix_ops = {
+static const struct iam_operations iam_lfix_ops = {
        .id_root_ptr    = iam_lfix_root_ptr,
        .id_node_read   = iam_node_read,
        .id_node_init   = iam_lfix_node_init,
@@ -672,7 +671,7 @@ static struct iam_operations iam_lfix_ops = {
        .id_name        = "lfix"
 };
 
-static int iam_lfix_guess(struct iam_container *c)
+int iam_lfix_guess(struct iam_container *c)
 {
        int result;
        struct buffer_head *bh;
@@ -704,15 +703,6 @@ static int iam_lfix_guess(struct iam_container *c)
        return result;
 }
 
-static struct iam_format iam_lfix_format = {
-       .if_guess = iam_lfix_guess
-};
-
-void iam_lfix_format_init(void)
-{
-       iam_format_register(&iam_lfix_format);
-}
-
 /*
  * Debugging aid.
  */
@@ -757,7 +747,7 @@ void iam_lfix_format_init(void)
 #define STORE_UNALIGNED(val, dst)                      \
 ({                                                     \
        typeof(val) __val = (val);                      \
-       CLASSERT(sizeof(val) == sizeof(*(dst)));        \
+       BUILD_BUG_ON(sizeof(val) != sizeof(*(dst)));    \
        memcpy(dst, &__val, sizeof(*(dst)));            \
 })