Whamcloud - gitweb
LU-5577 obd: change brw_page->count to unsigned 78/12378/3
authorDmitry Eremin <dmitry.eremin@intel.com>
Wed, 5 Nov 2014 01:24:49 +0000 (20:24 -0500)
committerOleg Drokin <oleg.drokin@intel.com>
Wed, 17 Dec 2014 23:17:33 +0000 (23:17 +0000)
Pages count is unsigned. So, change the type accordant usage.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I71a9c9e31f90a7e6aa456801c6f47dc9ee9c0df2
Reviewed-on: http://review.whamcloud.com/12378
Tested-by: Jenkins
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/obd.h
lustre/osc/osc_cache.c
lustre/osc/osc_cl_internal.h

index 88df7cb..ec69de4 100644 (file)
@@ -192,7 +192,7 @@ struct obd_type {
 struct brw_page {
        obd_off  off;
        struct page *pg;
 struct brw_page {
        obd_off  off;
        struct page *pg;
-       int count;
+       unsigned int count;
        obd_flag flag;
 };
 
        obd_flag flag;
 };
 
index 68dec1a..c97ffa9 100644 (file)
@@ -1057,7 +1057,7 @@ static int osc_extent_make_ready(const struct lu_env *env,
        struct osc_async_page *oap;
        struct osc_async_page *last = NULL;
        struct osc_object *obj = ext->oe_obj;
        struct osc_async_page *oap;
        struct osc_async_page *last = NULL;
        struct osc_object *obj = ext->oe_obj;
-       int page_count = 0;
+       unsigned int page_count = 0;
        int rc;
        ENTRY;
 
        int rc;
        ENTRY;
 
@@ -1098,9 +1098,10 @@ static int osc_extent_make_ready(const struct lu_env *env,
        /* the last page is the only one we need to refresh its count by
         * the size of file. */
        if (!(last->oap_async_flags & ASYNC_COUNT_STABLE)) {
        /* the last page is the only one we need to refresh its count by
         * the size of file. */
        if (!(last->oap_async_flags & ASYNC_COUNT_STABLE)) {
-               last->oap_count = osc_refresh_count(env, last, OBD_BRW_WRITE);
-               LASSERT(last->oap_count > 0);
-               LASSERT(last->oap_page_off + last->oap_count <= PAGE_CACHE_SIZE);
+               int last_oap_count = osc_refresh_count(env, last, OBD_BRW_WRITE);
+               LASSERT(last_oap_count > 0);
+               LASSERT(last->oap_page_off + last_oap_count <= PAGE_CACHE_SIZE);
+               last->oap_count = last_oap_count;
                spin_lock(&last->oap_lock);
                last->oap_async_flags |= ASYNC_COUNT_STABLE;
                spin_unlock(&last->oap_lock);
                spin_lock(&last->oap_lock);
                last->oap_async_flags |= ASYNC_COUNT_STABLE;
                spin_unlock(&last->oap_lock);
index 6ed4179..2eff97d 100644 (file)
@@ -68,7 +68,7 @@ struct osc_io {
         /** true if this io is lockless. */
         int                oi_lockless;
        /** how many LRU pages are reserved for this IO */
         /** true if this io is lockless. */
         int                oi_lockless;
        /** how many LRU pages are reserved for this IO */
-       int oi_lru_reserved;
+       unsigned long      oi_lru_reserved;
 
        /** active extents, we know how many bytes is going to be written,
         * so having an active extent will prevent it from being fragmented */
 
        /** active extents, we know how many bytes is going to be written,
         * so having an active extent will prevent it from being fragmented */