Commit f1564f16 authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre/lov: Fix style vs open parenthesis alignment

This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 926d6fb2
...@@ -615,11 +615,9 @@ int lov_page_init(const struct lu_env *env, struct cl_object *ob, ...@@ -615,11 +615,9 @@ int lov_page_init(const struct lu_env *env, struct cl_object *ob,
int lovsub_page_init(const struct lu_env *env, struct cl_object *ob, int lovsub_page_init(const struct lu_env *env, struct cl_object *ob,
struct cl_page *page, struct page *vmpage); struct cl_page *page, struct page *vmpage);
int lov_page_init_empty(const struct lu_env *env, int lov_page_init_empty(const struct lu_env *env, struct cl_object *obj,
struct cl_object *obj,
struct cl_page *page, struct page *vmpage); struct cl_page *page, struct page *vmpage);
int lov_page_init_raid0(const struct lu_env *env, int lov_page_init_raid0(const struct lu_env *env, struct cl_object *obj,
struct cl_object *obj,
struct cl_page *page, struct page *vmpage); struct cl_page *page, struct page *vmpage);
struct lu_object *lov_object_alloc(const struct lu_env *env, struct lu_object *lov_object_alloc(const struct lu_env *env,
const struct lu_object_header *hdr, const struct lu_object_header *hdr,
...@@ -631,8 +629,7 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env, ...@@ -631,8 +629,7 @@ struct lu_object *lovsub_object_alloc(const struct lu_env *env,
struct lov_lock_link *lov_lock_link_find(const struct lu_env *env, struct lov_lock_link *lov_lock_link_find(const struct lu_env *env,
struct lov_lock *lck, struct lov_lock *lck,
struct lovsub_lock *sub); struct lovsub_lock *sub);
struct lov_io_sub *lov_page_subio(const struct lu_env *env, struct lov_io_sub *lov_page_subio(const struct lu_env *env, struct lov_io *lio,
struct lov_io *lio,
const struct cl_page_slice *slice); const struct cl_page_slice *slice);
#define lov_foreach_target(lov, var) \ #define lov_foreach_target(lov, var) \
......
...@@ -138,12 +138,10 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm, ...@@ -138,12 +138,10 @@ int lov_merge_lvb_kms(struct lov_stripe_md *lsm,
struct ost_lvb *lvb, __u64 *kms_place); struct ost_lvb *lvb, __u64 *kms_place);
/* lov_offset.c */ /* lov_offset.c */
u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, int stripeno);
int stripeno);
int lov_stripe_offset(struct lov_stripe_md *lsm, u64 lov_off, int lov_stripe_offset(struct lov_stripe_md *lsm, u64 lov_off,
int stripeno, u64 *u64); int stripeno, u64 *u64);
u64 lov_size_to_stripe(struct lov_stripe_md *lsm, u64 file_size, u64 lov_size_to_stripe(struct lov_stripe_md *lsm, u64 file_size, int stripeno);
int stripeno);
int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno, int lov_stripe_intersects(struct lov_stripe_md *lsm, int stripeno,
u64 start, u64 end, u64 start, u64 end,
u64 *obd_start, u64 *obd_end); u64 *obd_start, u64 *obd_end);
......
...@@ -1125,7 +1125,8 @@ static void lov_empty_lock_fini(const struct lu_env *env, ...@@ -1125,7 +1125,8 @@ static void lov_empty_lock_fini(const struct lu_env *env,
} }
static int lov_empty_lock_print(const struct lu_env *env, void *cookie, static int lov_empty_lock_print(const struct lu_env *env, void *cookie,
lu_printer_t p, const struct cl_lock_slice *slice) lu_printer_t p,
const struct cl_lock_slice *slice)
{ {
(*p)(env, cookie, "empty\n"); (*p)(env, cookie, "empty\n");
return 0; return 0;
......
...@@ -621,8 +621,8 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp, ...@@ -621,8 +621,8 @@ static int lov_add_target(struct obd_device *obd, struct obd_uuid *uuidp,
if (lov->lov_cache) { if (lov->lov_cache) {
rc = obd_set_info_async(NULL, tgt->ltd_exp, rc = obd_set_info_async(NULL, tgt->ltd_exp,
sizeof(KEY_CACHE_SET), KEY_CACHE_SET, sizeof(KEY_CACHE_SET), KEY_CACHE_SET,
sizeof(struct cl_client_cache), lov->lov_cache, sizeof(struct cl_client_cache),
NULL); lov->lov_cache, NULL);
if (rc < 0) if (rc < 0)
goto out; goto out;
} }
...@@ -1414,8 +1414,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, ...@@ -1414,8 +1414,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
/* copy UUID */ /* copy UUID */
if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(osc_obd), if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(osc_obd),
min((int) data->ioc_plen2, min((int)data->ioc_plen2,
(int) sizeof(struct obd_uuid)))) (int)sizeof(struct obd_uuid))))
return -EFAULT; return -EFAULT;
memcpy(&flags, data->ioc_inlbuf1, sizeof(__u32)); memcpy(&flags, data->ioc_inlbuf1, sizeof(__u32));
...@@ -1428,8 +1428,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len, ...@@ -1428,8 +1428,8 @@ static int lov_iocontrol(unsigned int cmd, struct obd_export *exp, int len,
if (rc) if (rc)
return rc; return rc;
if (copy_to_user(data->ioc_pbuf1, &stat_buf, if (copy_to_user(data->ioc_pbuf1, &stat_buf,
min((int) data->ioc_plen1, min((int)data->ioc_plen1,
(int) sizeof(stat_buf)))) (int)sizeof(stat_buf))))
return -EFAULT; return -EFAULT;
break; break;
} }
...@@ -1762,7 +1762,8 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key, ...@@ -1762,7 +1762,8 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key,
fm_end = fm_key->oa.o_size; fm_end = fm_key->oa.o_size;
last_stripe = fiemap_calc_last_stripe(lsm, fm_start, fm_end, last_stripe = fiemap_calc_last_stripe(lsm, fm_start, fm_end,
actual_start_stripe, &stripe_count); actual_start_stripe,
&stripe_count);
fm_end_offset = fiemap_calc_fm_end_offset(fiemap, lsm, fm_start, fm_end_offset = fiemap_calc_fm_end_offset(fiemap, lsm, fm_start,
fm_end, &start_stripe); fm_end, &start_stripe);
......
...@@ -646,7 +646,7 @@ static int lov_layout_wait(const struct lu_env *env, struct lov_object *lov) ...@@ -646,7 +646,7 @@ static int lov_layout_wait(const struct lu_env *env, struct lov_object *lov)
struct l_wait_info lwi = { 0 }; struct l_wait_info lwi = { 0 };
while (atomic_read(&lov->lo_active_ios) > 0) { while (atomic_read(&lov->lo_active_ios) > 0) {
CDEBUG(D_INODE, "file:"DFID" wait for active IO, now: %d.\n", CDEBUG(D_INODE, "file:" DFID " wait for active IO, now: %d.\n",
PFID(lu_object_fid(lov2lu(lov))), PFID(lu_object_fid(lov2lu(lov))),
atomic_read(&lov->lo_active_ios)); atomic_read(&lov->lo_active_ios));
......
...@@ -43,8 +43,7 @@ ...@@ -43,8 +43,7 @@
#include "lov_internal.h" #include "lov_internal.h"
/* compute object size given "stripeno" and the ost size */ /* compute object size given "stripeno" and the ost size */
u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, u64 lov_stripe_size(struct lov_stripe_md *lsm, u64 ost_size, int stripeno)
int stripeno)
{ {
unsigned long ssize = lsm->lsm_stripe_size; unsigned long ssize = lsm->lsm_stripe_size;
unsigned long stripe_size; unsigned long stripe_size;
......
...@@ -267,7 +267,8 @@ static int lov_verify_lmm(void *lmm, int lmm_bytes, __u16 *stripe_count) ...@@ -267,7 +267,8 @@ static int lov_verify_lmm(void *lmm, int lmm_bytes, __u16 *stripe_count)
return -EINVAL; return -EINVAL;
} }
rc = lsm_op_find(le32_to_cpu(*(__u32 *)lmm))->lsm_lmm_verify(lmm, rc = lsm_op_find(le32_to_cpu(*(__u32 *)lmm))->lsm_lmm_verify(lmm,
lmm_bytes, stripe_count); lmm_bytes,
stripe_count);
return rc; return rc;
} }
......
...@@ -172,8 +172,7 @@ int lov_page_init_raid0(const struct lu_env *env, struct cl_object *obj, ...@@ -172,8 +172,7 @@ int lov_page_init_raid0(const struct lu_env *env, struct cl_object *obj,
offset = cl_offset(obj, page->cp_index); offset = cl_offset(obj, page->cp_index);
stripe = lov_stripe_number(loo->lo_lsm, offset); stripe = lov_stripe_number(loo->lo_lsm, offset);
LASSERT(stripe < r0->lo_nr); LASSERT(stripe < r0->lo_nr);
rc = lov_stripe_offset(loo->lo_lsm, offset, stripe, rc = lov_stripe_offset(loo->lo_lsm, offset, stripe, &suboff);
&suboff);
LASSERT(rc == 0); LASSERT(rc == 0);
lpg->lps_invalid = 1; lpg->lps_invalid = 1;
......
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