From: Patrick Farrell Date: Fri, 6 Oct 2023 19:39:41 +0000 (-0400) Subject: LU-13802 llite: refactor ll_file_io_generic decs X-Git-Tag: 2.15.62~241 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=947bcaba646e41176e3a2895e4932a182dd7d505;p=fs%2Flustre-release.git LU-13802 llite: refactor ll_file_io_generic decs 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 Change-Id: I0b808ab82bdc129853dd4f27b93b3c91b201ca8a Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52587 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Sebastien Buisson Reviewed-by: Oleg Drokin Reviewed-by: Shaun Tancheff --- diff --git a/lustre/llite/file.c b/lustre/llite/file.c index a52f4ed..0116127 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -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;