Whamcloud - gitweb
LU-5577 obdclass: change cl_fault_io->ft_nob to size_t 80/12380/3
authorDmitry Eremin <dmitry.eremin@intel.com>
Fri, 10 Oct 2014 15:41:29 +0000 (19:41 +0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 18 Dec 2014 00:14:56 +0000 (00:14 +0000)
Change the type accordant usage.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Change-Id: I866b9e0fc24c1d2fd281b40d03e8b4d73f159e31
Reviewed-on: http://review.whamcloud.com/12380
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/cl_object.h
lustre/llite/rw26.c
lustre/obdclass/cl_page.c
lustre/osc/osc_io.c

index 0c9bed8..862d092 100644 (file)
@@ -1855,7 +1855,7 @@ struct cl_io {
                         /** page index within file. */
                         pgoff_t         ft_index;
                         /** bytes valid byte on a faulted page. */
                         /** page index within file. */
                         pgoff_t         ft_index;
                         /** bytes valid byte on a faulted page. */
-                        int             ft_nob;
+                       size_t          ft_nob;
                         /** writable page? for nopage() only */
                         int             ft_writable;
                         /** page of an executable? */
                         /** writable page? for nopage() only */
                         int             ft_writable;
                         /** page of an executable? */
@@ -2374,25 +2374,24 @@ int  cl_page_flush      (const struct lu_env *env, struct cl_io *io,
  * Functions to discard, delete and export a cl_page.
  */
 /** @{ */
  * Functions to discard, delete and export a cl_page.
  */
 /** @{ */
-void    cl_page_discard      (const struct lu_env *env, struct cl_io *io,
-                              struct cl_page *pg);
-void    cl_page_delete       (const struct lu_env *env, struct cl_page *pg);
-int     cl_page_is_vmlocked  (const struct lu_env *env,
-                              const struct cl_page *pg);
-void    cl_page_export       (const struct lu_env *env,
-                              struct cl_page *pg, int uptodate);
+void    cl_page_discard(const struct lu_env *env, struct cl_io *io,
+                       struct cl_page *pg);
+void    cl_page_delete(const struct lu_env *env, struct cl_page *pg);
+int     cl_page_is_vmlocked(const struct lu_env *env,
+                           const struct cl_page *pg);
+void    cl_page_export(const struct lu_env *env,
+                      struct cl_page *pg, int uptodate);
 int     cl_page_is_under_lock(const struct lu_env *env, struct cl_io *io,
                              struct cl_page *page, pgoff_t *max_index);
 int     cl_page_is_under_lock(const struct lu_env *env, struct cl_io *io,
                              struct cl_page *page, pgoff_t *max_index);
-loff_t  cl_offset            (const struct cl_object *obj, pgoff_t idx);
-pgoff_t cl_index             (const struct cl_object *obj, loff_t offset);
-int     cl_page_size         (const struct cl_object *obj);
-int     cl_pages_prune       (const struct lu_env *env, struct cl_object *obj);
+loff_t  cl_offset(const struct cl_object *obj, pgoff_t idx);
+pgoff_t cl_index(const struct cl_object *obj, loff_t offset);
+size_t  cl_page_size(const struct cl_object *obj);
 
 
-void cl_lock_print      (const struct lu_env *env, void *cookie,
-                         lu_printer_t printer, const struct cl_lock *lock);
+void cl_lock_print(const struct lu_env *env, void *cookie,
+                  lu_printer_t printer, const struct cl_lock *lock);
 void cl_lock_descr_print(const struct lu_env *env, void *cookie,
 void cl_lock_descr_print(const struct lu_env *env, void *cookie,
-                         lu_printer_t printer,
-                         const struct cl_lock_descr *descr);
+                        lu_printer_t printer,
+                        const struct cl_lock_descr *descr);
 /* @} helper */
 
 /** @} cl_page */
 /* @} helper */
 
 /** @} cl_page */
index 5749cf0..b0eaf8e 100644 (file)
@@ -237,19 +237,19 @@ ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io,
                            int rw, struct inode *inode,
                            struct ll_dio_pages *pv)
 {
                            int rw, struct inode *inode,
                            struct ll_dio_pages *pv)
 {
-        struct cl_page    *clp;
-        struct cl_2queue  *queue;
-        struct cl_object  *obj = io->ci_obj;
-        int i;
-        ssize_t rc = 0;
-        loff_t file_offset  = pv->ldp_start_offset;
-        long size           = pv->ldp_size;
-        int page_count      = pv->ldp_nr;
-        struct page **pages = pv->ldp_pages;
-        long page_size      = cl_page_size(obj);
-        bool do_io;
-        int  io_pages       = 0;
-        ENTRY;
+       struct cl_page    *clp;
+       struct cl_2queue  *queue;
+       struct cl_object  *obj = io->ci_obj;
+       int i;
+       ssize_t rc = 0;
+       loff_t file_offset  = pv->ldp_start_offset;
+       size_t size         = pv->ldp_size;
+       int page_count      = pv->ldp_nr;
+       struct page **pages = pv->ldp_pages;
+       size_t page_size    = cl_page_size(obj);
+       bool do_io;
+       int  io_pages       = 0;
+       ENTRY;
 
         queue = &io->ci_queue;
         cl_2queue_init(queue);
 
         queue = &io->ci_queue;
         cl_2queue_init(queue);
index 625d8cb..446eb4c 100644 (file)
@@ -1126,9 +1126,9 @@ pgoff_t cl_index(const struct cl_object *obj, loff_t offset)
 }
 EXPORT_SYMBOL(cl_index);
 
 }
 EXPORT_SYMBOL(cl_index);
 
-int cl_page_size(const struct cl_object *obj)
+size_t cl_page_size(const struct cl_object *obj)
 {
 {
-       return 1 << PAGE_CACHE_SHIFT;
+       return 1UL << PAGE_CACHE_SHIFT;
 }
 EXPORT_SYMBOL(cl_page_size);
 
 }
 EXPORT_SYMBOL(cl_page_size);
 
index dca62a5..316c5c7 100644 (file)
@@ -204,7 +204,7 @@ static int osc_io_submit(const struct lu_env *env,
  * Expand stripe KMS if necessary.
  */
 static void osc_page_touch_at(const struct lu_env *env,
  * Expand stripe KMS if necessary.
  */
 static void osc_page_touch_at(const struct lu_env *env,
-                              struct cl_object *obj, pgoff_t idx, unsigned to)
+                             struct cl_object *obj, pgoff_t idx, size_t to)
 {
         struct lov_oinfo  *loi  = cl2osc(obj)->oo_oinfo;
         struct cl_attr    *attr = &osc_env_info(env)->oti_attr;
 {
         struct lov_oinfo  *loi  = cl2osc(obj)->oo_oinfo;
         struct cl_attr    *attr = &osc_env_info(env)->oti_attr;
@@ -365,26 +365,25 @@ static void osc_io_rw_iter_fini(const struct lu_env *env,
 }
 
 static int osc_io_fault_start(const struct lu_env *env,
 }
 
 static int osc_io_fault_start(const struct lu_env *env,
-                              const struct cl_io_slice *ios)
+                             const struct cl_io_slice *ios)
 {
 {
-        struct cl_io       *io;
-        struct cl_fault_io *fio;
-
-        ENTRY;
+       struct cl_io       *io;
+       struct cl_fault_io *fio;
+       ENTRY;
 
 
-        io  = ios->cis_io;
-        fio = &io->u.ci_fault;
-        CDEBUG(D_INFO, "%lu %d %d\n",
-               fio->ft_index, fio->ft_writable, fio->ft_nob);
-        /*
-         * If mapping is writeable, adjust kms to cover this page,
-         * but do not extend kms beyond actual file size.
-         * See bug 10919.
-         */
-        if (fio->ft_writable)
-                osc_page_touch_at(env, ios->cis_obj,
-                                  fio->ft_index, fio->ft_nob);
-        RETURN(0);
+       io  = ios->cis_io;
+       fio = &io->u.ci_fault;
+       CDEBUG(D_INFO, "%lu %d %zu\n",
+               fio->ft_index, fio->ft_writable, fio->ft_nob);
+       /*
+        * If mapping is writeable, adjust kms to cover this page,
+        * but do not extend kms beyond actual file size.
+        * See bug 10919.
+        */
+       if (fio->ft_writable)
+               osc_page_touch_at(env, ios->cis_obj,
+                                 fio->ft_index, fio->ft_nob);
+       RETURN(0);
 }
 
 static int osc_async_upcall(void *a, int rc)
 }
 
 static int osc_async_upcall(void *a, int rc)