Commit 855b5da5 authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman

staging: lustre: obd: change brw_page->count to unsigned

Pages count is unsigned. So, change the type accordant usage.
Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5577
Reviewed-on: http://review.whamcloud.com/12378Reviewed-by: default avatarJohn L. Hammond <john.hammond@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@gmail.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a5d604d7
...@@ -176,7 +176,7 @@ struct obd_type { ...@@ -176,7 +176,7 @@ struct obd_type {
struct brw_page { struct brw_page {
u64 off; u64 off;
struct page *pg; struct page *pg;
int count; unsigned int count;
u32 flag; u32 flag;
}; };
......
...@@ -1099,7 +1099,7 @@ static int osc_extent_make_ready(const struct lu_env *env, ...@@ -1099,7 +1099,7 @@ static int osc_extent_make_ready(const struct lu_env *env,
struct osc_async_page *oap; struct osc_async_page *oap;
struct osc_async_page *last = NULL; struct osc_async_page *last = NULL;
struct osc_object *obj = ext->oe_obj; struct osc_object *obj = ext->oe_obj;
int page_count = 0; unsigned int page_count = 0;
int rc; int rc;
/* we're going to grab page lock, so object lock must not be taken. */ /* we're going to grab page lock, so object lock must not be taken. */
...@@ -1140,9 +1140,11 @@ static int osc_extent_make_ready(const struct lu_env *env, ...@@ -1140,9 +1140,11 @@ static int osc_extent_make_ready(const struct lu_env *env,
* the size of file. * the size of file.
*/ */
if (!(last->oap_async_flags & ASYNC_COUNT_STABLE)) { if (!(last->oap_async_flags & ASYNC_COUNT_STABLE)) {
last->oap_count = osc_refresh_count(env, last, OBD_BRW_WRITE); 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_SIZE); LASSERT(last_oap_count > 0);
LASSERT(last->oap_page_off + last_oap_count <= PAGE_SIZE);
last->oap_count = last_oap_count;
spin_lock(&last->oap_lock); spin_lock(&last->oap_lock);
last->oap_async_flags |= ASYNC_COUNT_STABLE; last->oap_async_flags |= ASYNC_COUNT_STABLE;
spin_unlock(&last->oap_lock); spin_unlock(&last->oap_lock);
......
...@@ -64,7 +64,7 @@ struct osc_io { ...@@ -64,7 +64,7 @@ struct osc_io {
/** true if this io is lockless. */ /** true if this io is lockless. */
unsigned int oi_lockless; unsigned int oi_lockless;
/** how many LRU pages are reserved for this IO */ /** 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, /** active extents, we know how many bytes is going to be written,
* so having an active extent will prevent it from being fragmented * so having an active extent will prevent it from being fragmented
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment