Whamcloud - gitweb
LU-6587 obdclass: use OBD_FREE_LARGE with OBD_ALLOC_LARGE
[fs/lustre-release.git] / lustre / lov / lov_cl_internal.h
index 133a183..65009f9 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2008, 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/
@@ -121,7 +121,7 @@ struct lov_device_emerg {
          *
          * \see cl_env_get()
          */
-        int                 emrg_refcheck;
+       __u16               emrg_refcheck;
 };
 
 struct lov_device {
@@ -242,6 +242,8 @@ struct lov_object {
                         * When top-object is destroyed (lov_delete_raid0())
                         * it releases its reference to a sub-object and waits
                         * until the latter is finally destroyed.
+                        *
+                        * May be vmalloc'd, must be freed with OBD_FREE_LARGE.
                         */
                        struct lovsub_object **lo_sub;
                        /**
@@ -381,40 +383,39 @@ struct lov_thread_info {
  * State that lov_io maintains for every sub-io.
  */
 struct lov_io_sub {
-        int                  sub_stripe;
-        /**
-         * sub-io for a stripe. Ideally sub-io's can be stopped and resumed
-         * independently, with lov acting as a scheduler to maximize overall
-         * throughput.
-         */
-        struct cl_io        *sub_io;
-        /**
-         * Linkage into a list (hanging off lov_io::lis_active) of all
-         * sub-io's active for the current IO iteration.
-         */
+       __u16                   sub_stripe;
+       /**
+        * environment's refcheck.
+        *
+        * \see cl_env_get()
+        */
+       __u16                   sub_refcheck;
+       __u16                   sub_reenter;
+       /**
+        * true, iff cl_io_init() was successfully executed against
+        * lov_io_sub::sub_io.
+        */
+       __u16                   sub_io_initialized:1,
+       /**
+        * True, iff lov_io_sub::sub_io and lov_io_sub::sub_env weren't
+        * allocated, but borrowed from a per-device emergency pool.
+        */
+                               sub_borrowed:1;
+       /**
+        * Linkage into a list (hanging off lov_io::lis_active) of all
+        * sub-io's active for the current IO iteration.
+        */
        struct list_head        sub_linkage;
-        /**
-         * true, iff cl_io_init() was successfully executed against
-         * lov_io_sub::sub_io.
-         */
-        int                  sub_io_initialized;
-        /**
-         * True, iff lov_io_sub::sub_io and lov_io_sub::sub_env weren't
-         * allocated, but borrowed from a per-device emergency pool.
-         */
-        int                  sub_borrowed;
-        /**
-         * environment, in which sub-io executes.
-         */
-        struct lu_env *sub_env;
-        /**
-         * environment's refcheck.
-         *
-         * \see cl_env_get()
-         */
-        int                  sub_refcheck;
-        int                  sub_refcheck2;
-        int                  sub_reenter;
+       /**
+        * sub-io for a stripe. Ideally sub-io's can be stopped and resumed
+        * independently, with lov acting as a scheduler to maximize overall
+        * throughput.
+        */
+       struct cl_io            *sub_io;
+       /**
+        * environment, in which sub-io executes.
+        */
+       struct lu_env           *sub_env;
 };
 
 /**
@@ -443,30 +444,31 @@ struct lov_io {
          * (stripe), used by ci_io_loop().
          */
        loff_t                   lis_pos;
-        /**
-         * end position with in a file, for the current stripe io. This is
-         * exclusive (i.e., next offset after last byte affected by io).
-         */
+       /**
+        * end position with in a file, for the current stripe io. This is
+        * exclusive (i.e., next offset after last byte affected by io).
+        */
        loff_t                   lis_endpos;
 
-        int                lis_mem_frozen;
-        int                lis_stripe_count;
-        int                lis_active_subios;
+       int                     lis_mem_frozen;
+       int                     lis_stripe_count;
+       int                     lis_active_subios;
 
-        /**
-         * the index of ls_single_subio in ls_subios array
-         */
-        int                lis_single_subio_index;
-        struct cl_io       lis_single_subio;
+       /**
+        * the index of ls_single_subio in ls_subios array
+        */
+       int                     lis_single_subio_index;
+       struct cl_io            lis_single_subio;
 
-        /**
-         * size of ls_subios array, actually the highest stripe #
-         */
-        int                lis_nr_subios;
-        struct lov_io_sub *lis_subs;
-        /**
-         * List of active sub-io's.
-         */
+       /**
+        * size of ls_subios array, actually the highest stripe #
+        * May be vmalloc'd, must be freed with OBD_FREE_LARGE().
+        */
+       int                     lis_nr_subios;
+       struct lov_io_sub       *lis_subs;
+       /**
+        * List of active sub-io's.
+        */
        struct list_head        lis_active;
 };