Whamcloud - gitweb
LU-13802 llite: refactor ll_file_io_generic decs 87/52587/11
authorPatrick Farrell <pfarrell@whamcloud.com>
Fri, 6 Oct 2023 19:39:41 +0000 (15:39 -0400)
committerOleg Drokin <green@whamcloud.com>
Fri, 23 Feb 2024 07:00:51 +0000 (07:00 +0000)
The variable declarations in ll_file_io_generic are in no
order at all.  Put them in the standard order and convert
a few 'unsigned int' to bool.

Test-Parameters: trivial
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I0b808ab82bdc129853dd4f27b93b3c91b201ca8a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52587
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Sebastien Buisson <sbuisson@ddn.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
lustre/llite/file.c

index a52f4ed..0116127 100644 (file)
@@ -1708,25 +1708,27 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,
                   struct file *file, enum cl_io_type iot,
                   loff_t *ppos, size_t bytes)
 {
-       struct vvp_io *vio = vvp_env_io(env);
        struct inode *inode = file_inode(file);
+       struct ll_file_data *fd  = file->private_data;
        struct ll_inode_info *lli = ll_i2info(inode);
        struct ll_sb_info *sbi = ll_i2sbi(inode);
-       struct ll_file_data *fd  = file->private_data;
+       struct vvp_io *vio = vvp_env_io(env);
+       struct cl_dio_aio *ci_dio_aio = NULL;
        struct range_lock range;
        struct cl_io *io;
+       int flags = vvp_io_args_flags(file, args);
+       bool is_parallel_dio = false;
        bool range_locked = false;
+       unsigned int retried = 0;
+       bool dio_lock = false;
+       bool is_aio = false;
+       size_t max_io_bytes;
        ssize_t result = 0;
-       int flags = vvp_io_args_flags(file, args);
-       int rc = 0;
-       int rc2 = 0;
        int retries = 1000;
-       unsigned int retried = 0, dio_lock = 0;
-       bool is_aio = false;
-       bool is_parallel_dio = false;
-       struct cl_dio_aio *ci_dio_aio = NULL;
-       size_t per_bytes, max_io_bytes;
+       size_t per_bytes;
        bool partial_io;
+       int rc2 = 0;
+       int rc = 0;
 
        ENTRY;
 
@@ -1740,7 +1742,7 @@ ll_file_io_generic(const struct lu_env *env, struct vvp_io_args *args,
        io = vvp_env_thread_io(env);
        if (iocb_ki_flags_check(flags, DIRECT)) {
                if (iocb_ki_flags_check(flags, APPEND))
-                       dio_lock = 1;
+                       dio_lock = true;
                if (!is_sync_kiocb(args->u.normal.via_iocb))
                        is_aio = true;