]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
staging: lustre: add missing blank line after declarations
authorMike Rapoport <mike.rapoport@gmail.com>
Tue, 13 Oct 2015 13:03:40 +0000 (16:03 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 17:21:10 +0000 (10:21 -0700)
Fixes checkpatch.pl WARNING:LINE_SPACING: Missing a blank line after
declarations.
The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=Missing \
    --fix-inplace -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
53 files changed:
drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c
drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c
drivers/staging/lustre/lustre/include/linux/obd.h
drivers/staging/lustre/lustre/include/lustre/lustre_idl.h
drivers/staging/lustre/lustre/include/lustre/lustre_user.h
drivers/staging/lustre/lustre/include/lustre_cfg.h
drivers/staging/lustre/lustre/include/lustre_disk.h
drivers/staging/lustre/lustre/include/lustre_fid.h
drivers/staging/lustre/lustre/include/lustre_lib.h
drivers/staging/lustre/lustre/include/obd_class.h
drivers/staging/lustre/lustre/libcfs/linux/linux-crypto.c
drivers/staging/lustre/lustre/libcfs/linux/linux-curproc.c
drivers/staging/lustre/lustre/libcfs/module.c
drivers/staging/lustre/lustre/libcfs/tracefile.c
drivers/staging/lustre/lustre/llite/llite_internal.h
drivers/staging/lustre/lustre/llite/llite_nfs.c
drivers/staging/lustre/lustre/llite/lloop.c
drivers/staging/lustre/lustre/llite/lproc_llite.c
drivers/staging/lustre/lustre/llite/rw.c
drivers/staging/lustre/lustre/llite/rw26.c
drivers/staging/lustre/lustre/llite/super25.c
drivers/staging/lustre/lustre/llite/vvp_io.c
drivers/staging/lustre/lustre/lmv/lmv_obd.c
drivers/staging/lustre/lustre/lmv/lproc_lmv.c
drivers/staging/lustre/lustre/lov/lov_io.c
drivers/staging/lustre/lustre/lov/lov_lock.c
drivers/staging/lustre/lustre/lov/lov_obd.c
drivers/staging/lustre/lustre/lov/lov_pool.c
drivers/staging/lustre/lustre/mgc/mgc_request.c
drivers/staging/lustre/lustre/obdclass/cl_io.c
drivers/staging/lustre/lustre/obdclass/cl_lock.c
drivers/staging/lustre/lustre/obdclass/cl_object.c
drivers/staging/lustre/lustre/obdclass/class_obd.c
drivers/staging/lustre/lustre/obdclass/lprocfs_status.c
drivers/staging/lustre/lustre/obdclass/lu_object.c
drivers/staging/lustre/lustre/obdclass/lustre_handles.c
drivers/staging/lustre/lustre/obdclass/obd_config.c
drivers/staging/lustre/lustre/obdclass/obd_mount.c
drivers/staging/lustre/lustre/osc/lproc_osc.c
drivers/staging/lustre/lustre/osc/osc_cache.c
drivers/staging/lustre/lustre/osc/osc_page.c
drivers/staging/lustre/lustre/osc/osc_quota.c
drivers/staging/lustre/lustre/osc/osc_request.c
drivers/staging/lustre/lustre/ptlrpc/client.c
drivers/staging/lustre/lustre/ptlrpc/import.c
drivers/staging/lustre/lustre/ptlrpc/llog_client.c
drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
drivers/staging/lustre/lustre/ptlrpc/pinger.c
drivers/staging/lustre/lustre/ptlrpc/sec.c
drivers/staging/lustre/lustre/ptlrpc/sec_null.c
drivers/staging/lustre/lustre/ptlrpc/service.c

index 8ab73eece620ac6fe6d860e0d1a2fa89c8f134ac..3ffffbe22ca7c86cc204597477a1114943a42263 100644 (file)
@@ -2154,6 +2154,7 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob)
        unsigned long flags;
        int rc;
        struct sockaddr_in *peer_addr;
+
        LASSERT(!in_interrupt());
 
        /* cmid inherits 'context' from the corresponding listener id */
@@ -2169,6 +2170,7 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob)
        if (*kiblnd_tunables.kib_require_priv_port &&
            ntohs(peer_addr->sin_port) >= PROT_SOCK) {
                __u32 ip = ntohl(peer_addr->sin_addr.s_addr);
+
                CERROR("Peer's port (%pI4h:%hu) is not privileged\n",
                       &ip, ntohs(peer_addr->sin_port));
                goto failed;
index 904d15837cbb8141429f9e128ce1ac8e1826d319..1b472f493a62944e903e708b1dc65df212c8a243 100644 (file)
@@ -2440,6 +2440,7 @@ ksocknal_base_startup(void)
 
        for (i = 0; i < *ksocknal_tunables.ksnd_nconnds; i++) {
                char name[16];
+
                spin_lock_bh(&ksocknal_data.ksnd_connd_lock);
                ksocknal_data.ksnd_connd_starting++;
                spin_unlock_bh(&ksocknal_data.ksnd_connd_lock);
@@ -2705,6 +2706,7 @@ ksocknal_start_schedulers(struct ksock_sched_info *info)
                long id;
                char name[20];
                ksock_sched_t *sched;
+
                id = KSOCK_THREAD_ID(info->ksi_cpt, info->ksi_nthreads + i);
                sched = &info->ksi_scheds[KSOCK_THREAD_SID(id)];
                snprintf(name, sizeof(name), "socknal_sd%02d_%02d",
index 354c8105f9a01972343e78a8b7357245ee3db0e5..8fbd89e7226e2e1c6beceebb16a2498cad04ef38 100644 (file)
@@ -299,6 +299,7 @@ ksocknal_recv_kiov (ksock_conn_t *conn)
        lnet_kiov_t *kiov = conn->ksnc_rx_kiov;
        int nob;
        int rc;
+
        LASSERT(conn->ksnc_rx_nkiov > 0);
 
        /* Never touch conn->ksnc_rx_kiov or change connection
@@ -2240,6 +2241,7 @@ ksocknal_find_timed_out_conn (ksock_peer_t *peer)
 
        list_for_each (ctmp, &peer->ksnp_conns) {
                int error;
+
                conn = list_entry (ctmp, ksock_conn_t, ksnc_list);
 
                /* Don't need the {get,put}connsock dance to deref ksnc_sock */
index 2817e88e014a45826a9dc421f8ea67083604c4cd..1d6750067f2f6f5a3249b4113b7ed9be96b42588 100644 (file)
@@ -70,6 +70,7 @@ static inline void __client_obd_list_lock(client_obd_lock_t *lock,
                                          const char *func, int line)
 {
        unsigned long cur = jiffies;
+
        while (1) {
                if (spin_trylock(&lock->lock)) {
                        LASSERT(lock->task == NULL);
index c4d6c56fc7df043f44e66e9a7e70f8e31dd2ebd3..a9c60ffbe7956dbbb691fe9d045081977da84a50 100644 (file)
@@ -1006,6 +1006,7 @@ static inline int lu_dirent_calc_size(int namelen, __u16 attr)
 
        if (attr & LUDA_TYPE) {
                const unsigned align = sizeof(struct luda_type) - 1;
+
                size = (sizeof(struct lu_dirent) + namelen + align) & ~align;
                size += sizeof(struct luda_type);
        } else
index 1a41366322fe8d8d3a9ffc0cc539dd82853a1ccd..77d987a18e0bafdadfbd55ceb6f6f363e858d73b 100644 (file)
@@ -447,6 +447,7 @@ static inline char *obd_uuid2str(const struct obd_uuid *uuid)
                /* Obviously not safe, but for printfs, no real harm done...
                   we're always null-terminated, even in a race. */
                static char temp[sizeof(*uuid)];
+
                memcpy(temp, uuid->uuid, sizeof(*uuid) - 1);
                temp[sizeof(*uuid) - 1] = '\0';
                return temp;
index c80d78e5b30d00335e426d86bc04b94610fde996..fcc7401c90d8eda455794e197cd78b9735ff4661 100644 (file)
@@ -157,6 +157,7 @@ static inline void *lustre_cfg_buf(struct lustre_cfg *lcfg, int index)
        int i;
        int offset;
        int bufcount;
+
        LASSERT (lcfg != NULL);
        LASSERT (index >= 0);
 
@@ -174,6 +175,7 @@ static inline void lustre_cfg_bufs_init(struct lustre_cfg_bufs *bufs,
                                        struct lustre_cfg *lcfg)
 {
        int i;
+
        bufs->lcfg_bufcount = lcfg->lcfg_bufcount;
        for (i = 0; i < bufs->lcfg_bufcount; i++) {
                bufs->lcfg_buflen[i] = lcfg->lcfg_buflens[i];
@@ -200,6 +202,7 @@ static inline char *lustre_cfg_string(struct lustre_cfg *lcfg, int index)
                int last = min((int)lcfg->lcfg_buflens[index],
                               cfs_size_round(lcfg->lcfg_buflens[index]) - 1);
                char lost = s[last];
+
                s[last] = '\0';
                if (lost != '\0') {
                        CWARN("Truncated buf %d to '%s' (lost '%c'...)\n",
index f1dc967a2d48e13579d65993caed59f3f7ec8a31..d06ce3234e0b7daf9cc5e954a02b87b924572f65 100644 (file)
@@ -223,6 +223,7 @@ static inline void check_lcd(char *obd_name, int index,
                             struct lsd_client_data *lcd)
 {
        int length = sizeof(lcd->lcd_uuid);
+
        if (strnlen((char *)lcd->lcd_uuid, length) == length) {
                lcd->lcd_uuid[length - 1] = '\0';
 
@@ -236,6 +237,7 @@ static inline void lsd_le_to_cpu(struct lr_server_data *buf,
                                 struct lr_server_data *lsd)
 {
        int i;
+
        memcpy(lsd->lsd_uuid, buf->lsd_uuid, sizeof(lsd->lsd_uuid));
        lsd->lsd_last_transno     = le64_to_cpu(buf->lsd_last_transno);
        lsd->lsd_compat14        = le64_to_cpu(buf->lsd_compat14);
@@ -263,6 +265,7 @@ static inline void lsd_cpu_to_le(struct lr_server_data *lsd,
                                 struct lr_server_data *buf)
 {
        int i;
+
        memcpy(buf->lsd_uuid, lsd->lsd_uuid, sizeof(buf->lsd_uuid));
        buf->lsd_last_transno     = cpu_to_le64(lsd->lsd_last_transno);
        buf->lsd_compat14        = cpu_to_le64(lsd->lsd_compat14);
index 19d917588b4ced9e53ec8bdf8c7758acbae134be..47c3f375024094a585e6adaa99464548409b911c 100644 (file)
@@ -532,6 +532,7 @@ static inline void ost_fid_build_resid(const struct lu_fid *fid,
 {
        if (fid_is_mdt0(fid) || fid_is_idif(fid)) {
                struct ost_id oi;
+
                oi.oi.oi_id = 0; /* gcc 4.7.2 complains otherwise */
                if (fid_to_ostid(fid, &oi) != 0)
                        return;
@@ -547,6 +548,7 @@ static inline void ost_fid_from_resid(struct lu_fid *fid,
        if (fid_seq_is_mdt0(name->name[LUSTRE_RES_ID_VER_OID_OFF])) {
                /* old resid */
                struct ost_id oi;
+
                ostid_set_seq(&oi, name->name[LUSTRE_RES_ID_VER_OID_OFF]);
                ostid_set_id(&oi, name->name[LUSTRE_RES_ID_SEQ_OFF]);
                ostid_to_fid(fid, &oi, 0);
index 35175fd3da88fcb5f3442bd62e398c51373aa37b..cc3e8d1dc092cb1fd001f4cacbde8686c1e1f3d9 100644 (file)
@@ -177,6 +177,7 @@ struct obd_ioctl_hdr {
 static inline int obd_ioctl_packlen(struct obd_ioctl_data *data)
 {
        int len = cfs_size_round(sizeof(struct obd_ioctl_data));
+
        len += cfs_size_round(data->ioc_inllen1);
        len += cfs_size_round(data->ioc_inllen2);
        len += cfs_size_round(data->ioc_inllen3);
index 82f1a267092837dd34bb31a176b078c14031acf5..47230345fa90cbb8f35fcd3225f02c991920ef3d 100644 (file)
@@ -486,6 +486,7 @@ static inline int obd_setup(struct obd_device *obd, struct lustre_cfg *cfg)
        if (ldt != NULL) {
                struct lu_context  session_ctx;
                struct lu_env env;
+
                lu_context_init(&session_ctx, LCT_SESSION);
                session_ctx.lc_thread = NULL;
                lu_context_enter(&session_ctx);
@@ -577,6 +578,7 @@ static inline void obd_cleanup_client_import(struct obd_device *obd)
        down_write(&obd->u.cli.cl_sem);
        if (obd->u.cli.cl_import) {
                struct obd_import *imp;
+
                imp = obd->u.cli.cl_import;
                CDEBUG(D_CONFIG, "%s: client import never connected\n",
                       obd->obd_name);
index 328a27860411e7a141f91e16ec0a82e7c8922a5e..f6de3600d5f3f8fe7be81c24f7a8e6b58c8f6547 100644 (file)
@@ -224,6 +224,7 @@ static void cfs_crypto_performance_test(unsigned char alg_id,
                       cfs_crypto_hash_name(alg_id), err);
        } else {
                unsigned long   tmp;
+
                tmp = ((bcount * buf_len / jiffies_to_msecs(end - start)) *
                       1000) / (1024 * 1024);
                cfs_crypto_hash_speeds[alg_id] = (int)tmp;
index 277f6b890e09f4bddcfc335785083485a9330898..c74c80915dca8bd15ed770cfe31ed82c1d52359f 100644 (file)
@@ -91,6 +91,7 @@ static void cfs_kernel_cap_pack(kernel_cap_t kcap, cfs_cap_t *cap)
 cfs_cap_t cfs_curproc_cap_pack(void)
 {
        cfs_cap_t cap;
+
        cfs_kernel_cap_pack(current_cap(), &cap);
        return cap;
 }
index 5e4262a2e6f38f1b4e450e6ea17742c918978bb5..379b2dba6b0417c88f21ed67ee14feb4ec5e8b05 100644 (file)
@@ -293,6 +293,7 @@ static int libcfs_ioctl_int(struct cfs_psdev_file *pfile, unsigned long cmd,
 
        default: {
                struct libcfs_ioctl_handler *hand;
+
                err = -EINVAL;
                down_read(&ioctl_list_sem);
                list_for_each_entry(hand, &ioctl_list, item) {
index 5a2e5ea00570171759e2ff5cb9beb3e106544501..ff6c2c55b2e7a029f3109254ad3889592ae8eafd 100644 (file)
@@ -652,6 +652,7 @@ void cfs_trace_debug_print(void)
                while (p < ((char *)page_address(page) + tage->used)) {
                        struct ptldebug_header *hdr;
                        int len;
+
                        hdr = (void *)p;
                        p += sizeof(*hdr);
                        file = p;
index 4c20b1e1a0ef5626d747a75f75ace26f3906a1ca..d294145ec57d7ffea655d5e9a24cff9008ba3eef 100644 (file)
@@ -995,6 +995,7 @@ static inline struct obd_export *ll_s2mdexp(struct super_block *sb)
 static inline struct client_obd *sbi2mdc(struct ll_sb_info *sbi)
 {
        struct obd_device *obd = sbi->ll_md_exp->exp_obd;
+
        if (obd == NULL)
                LBUG();
        return &obd->u.cli;
index f992eda182355bfa7d9261b10948fd29e560f371..e578a1130ad1bfd007ef8c498b06fe4917d07efe 100644 (file)
@@ -49,6 +49,7 @@
 __u32 get_uuid2int(const char *name, int len)
 {
        __u32 key0 = 0x12a3fe2d, key1 = 0x37abe8f9;
+
        while (len--) {
                __u32 key = key1 + (key0 ^ (*name++ * 7152373));
 
index 5f0d80cc97183e2104c1fcbcd71610750bc08626..90b4233df3769c2e08c47f54f3126242e4cbc77f 100644 (file)
@@ -374,9 +374,11 @@ err:
 static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio)
 {
        int ret;
+
        ret = do_bio_lustrebacked(lo, bio);
        while (bio) {
                struct bio *tmp = bio->bi_next;
+
                bio->bi_next = NULL;
                bio->bi_error = ret;
                bio_endio(bio);
@@ -430,6 +432,7 @@ static int loop_thread(void *data)
                wait_event(lo->lo_bh_wait, loop_active(lo));
                if (!atomic_read(&lo->lo_pending)) {
                        int exiting = 0;
+
                        spin_lock_irq(&lo->lo_lock);
                        exiting = (lo->lo_state == LLOOP_RUNDOWN);
                        spin_unlock_irq(&lo->lo_lock);
index 08d32027d7be0b1da1eeac6d8db8196168017eb7..e7b94f4ca6bc8690abd7a1f0c58cfe2f5a750334 100644 (file)
@@ -1017,6 +1017,7 @@ int ldebugfs_register_mountpoint(struct dentry *parent,
        for (id = 0; id < LPROC_LL_FILE_OPCODES; id++) {
                __u32 type = llite_opcode_table[id].type;
                void *ptr = NULL;
+
                if (type & LPROCFS_TYPE_REGS)
                        ptr = "regs";
                else if (type & LPROCFS_TYPE_BYTES)
index 71be1947dc376e8a07b4dbf83d87dd24bc9bfc01..377947a011cee56298c6a326fc13180eb51846a0 100644 (file)
@@ -327,6 +327,7 @@ static unsigned long ll_ra_count_get(struct ll_sb_info *sbi,
         * the RPC boundary from needing an extra read RPC. */
        if (ria->ria_pages == 0) {
                long beyond_rpc = (ria->ria_start + ret) % PTLRPC_MAX_BRW_PAGES;
+
                if (/* beyond_rpc != 0 && */ beyond_rpc < ret)
                        ret -= beyond_rpc;
        }
@@ -343,6 +344,7 @@ out:
 void ll_ra_count_put(struct ll_sb_info *sbi, unsigned long len)
 {
        struct ll_ra_info *ra = &sbi->ll_ra_info;
+
        atomic_sub(len, &ra->ra_cur_pages);
 }
 
@@ -355,6 +357,7 @@ static void ll_ra_stats_inc_sbi(struct ll_sb_info *sbi, enum ra_stat which)
 void ll_ra_stats_inc(struct address_space *mapping, enum ra_stat which)
 {
        struct ll_sb_info *sbi = ll_i2sbi(mapping->host);
+
        ll_ra_stats_inc_sbi(sbi, which);
 }
 
index b17b7cea582cacb353bb33f8aa3350096859e8d0..3da4c01e2159684faf4e8b63c3d706be08622bf2 100644 (file)
@@ -418,6 +418,7 @@ static ssize_t ll_direct_IO_26(struct kiocb *iocb, struct iov_iter *iter,
                result = iov_iter_get_pages_alloc(iter, &pages, count, &offs);
                if (likely(result > 0)) {
                        int n = DIV_ROUND_UP(result + offs, PAGE_SIZE);
+
                        result = ll_direct_IO_26_seg(env, io, iov_iter_rw(iter),
                                                     inode, file->f_mapping,
                                                     result, file_offset, pages,
index b35e02a49ba33cbf11b025b4a1b1acf26c29ad32..dae1f9caf0db1af0629ab48cfed28c7b212b0caf 100644 (file)
@@ -51,6 +51,7 @@ static struct kmem_cache *ll_inode_cachep;
 static struct inode *ll_alloc_inode(struct super_block *sb)
 {
        struct ll_inode_info *lli;
+
        ll_stats_ops_tally(ll_s2sbi(sb), LPROC_LL_ALLOC_INODE, 1);
        OBD_SLAB_ALLOC_PTR_GFP(lli, ll_inode_cachep, GFP_NOFS);
        if (lli == NULL)
@@ -64,6 +65,7 @@ static void ll_inode_destroy_callback(struct rcu_head *head)
 {
        struct inode *inode = container_of(head, struct inode, i_rcu);
        struct ll_inode_info *ptr = ll_i2info(inode);
+
        OBD_SLAB_FREE_PTR(ptr, ll_inode_cachep);
 }
 
index cf264de0e531657cd34026c745ca942e0172cf59..41947ac396900727d7275e2a56d714cf6b2ed70e 100644 (file)
@@ -1039,6 +1039,7 @@ static int vvp_io_commit_write(const struct lu_env *env,
                                need_clip = false;
                        } else if (last_index == pg->cp_index) {
                                int size_to = i_size_read(inode) & ~CFS_PAGE_MASK;
+
                                if (to < size_to)
                                        to = size_to;
                        }
index 7e6a06075aab67378f49f1978985d7166a2d0e91..397cf812ba7adf39a39cd5b891fe1b6aecaccd1a 100644 (file)
@@ -560,6 +560,7 @@ int lmv_check_connect(struct obd_device *obd)
  out_disc:
        while (i-- > 0) {
                int rc2;
+
                tgt = lmv->tgts[i];
                if (tgt == NULL)
                        continue;
@@ -1084,6 +1085,7 @@ static int lmv_iocontrol(unsigned int cmd, struct obd_export *exp,
        }
        case LL_IOC_HSM_CT_START: {
                struct lustre_kernelcomm *lk = karg;
+
                if (lk->lk_flags & LK_FLG_STOP)
                        rc = lmv_hsm_ct_unregister(lmv, cmd, len, lk, uarg);
                else
@@ -1335,6 +1337,7 @@ static int lmv_cleanup(struct obd_device *obd)
        fld_client_fini(&lmv->lmv_fld);
        if (lmv->tgts != NULL) {
                int i;
+
                for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
                        if (lmv->tgts[i] == NULL)
                                continue;
@@ -1813,6 +1816,7 @@ lmv_getattr_name(struct obd_export *exp, struct md_op_data *op_data,
 
        if (body->valid & OBD_MD_MDS) {
                struct lu_fid rid = body->fid1;
+
                CDEBUG(D_INODE, "Request attrs for "DFID"\n",
                       PFID(&rid));
 
@@ -2692,6 +2696,7 @@ static int lmv_quotactl(struct obd_device *unused, struct obd_export *exp,
        curspace = curinodes = 0;
        for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
                int err;
+
                tgt = lmv->tgts[i];
 
                if (tgt == NULL || tgt->ltd_exp == NULL || tgt->ltd_active == 0)
@@ -2727,6 +2732,7 @@ static int lmv_quotacheck(struct obd_device *unused, struct obd_export *exp,
 
        for (i = 0; i < lmv->desc.ld_tgt_count; i++) {
                int err;
+
                tgt = lmv->tgts[i];
                if (tgt == NULL || tgt->ltd_exp == NULL || !tgt->ltd_active) {
                        CERROR("lmv idx %d inactive\n", i);
index 311fc1b70c4d0042e6afa163bf9e98751f54674d..8f9e8ee09e3200c8c4c8394dbebfde74e336e026 100644 (file)
@@ -149,6 +149,7 @@ static void *lmv_tgt_seq_start(struct seq_file *p, loff_t *pos)
 {
        struct obd_device       *dev = p->private;
        struct lmv_obd    *lmv = &dev->u.lmv;
+
        return (*pos >= lmv->desc.ld_tgt_count) ? NULL : lmv->tgts[*pos];
 }
 
index 489227ae1256d8738eeed9361b4e93807e2b5591..62360d874cd608bd32abbc43731dfd0bdb956278 100644 (file)
@@ -330,6 +330,7 @@ static void lov_io_slice_init(struct lov_io *lio,
 
        case CIT_FAULT: {
                pgoff_t index = io->u.ci_fault.ft_index;
+
                lio->lis_pos = cl_offset(io->ci_obj, index);
                lio->lis_endpos = cl_offset(io->ci_obj, index + 1);
                break;
index a6938085ff24bb4d45b129e098d840949effe41a..173ae840950a01c126a1ed7e4aacac6a8834b47d 100644 (file)
@@ -227,6 +227,7 @@ static int lov_sublock_lock(const struct lu_env *env,
                        result = CLO_REPEAT;
                } else if (lsep) {
                        struct lov_sublock_env *subenv;
+
                        subenv = lov_sublock_env_get(env, parent, lls);
                        if (IS_ERR(subenv)) {
                                lov_sublock_unlock(env, sublock,
@@ -981,6 +982,7 @@ static int lov_lock_fits_into(const struct lu_env *env,
                result = cl_lock_ext_match(&lov->lls_orig, need);
        else if (lov->lls_nr == 1) {
                struct cl_lock_descr *got = &lov->lls_sub[0].sub_got;
+
                result = lov_lock_stripe_is_matching(env,
                                                     cl2lov(slice->cls_obj),
                                                     lov->lls_sub[0].sub_stripe,
@@ -1151,6 +1153,7 @@ static void lov_empty_lock_fini(const struct lu_env *env,
                                struct cl_lock_slice *slice)
 {
        struct lov_lock *lck = cl2lov_lock(slice);
+
        OBD_SLAB_FREE_PTR(lck, lov_lock_kmem);
 }
 
index 5c69ce9b94029ac2c6d2267294d30b5fc53203e8..c8657076a96da2f517a199d4586b0abd0d9fbeb1 100644 (file)
@@ -85,6 +85,7 @@ static void lov_putref(struct obd_device *obd)
                LIST_HEAD(kill);
                int i;
                struct lov_tgt_desc *tgt, *n;
+
                CDEBUG(D_CONFIG, "destroying %d lov targets\n",
                       lov->lov_death_row);
                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
@@ -833,6 +834,7 @@ static int lov_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
        switch (stage) {
        case OBD_CLEANUP_EARLY: {
                int i;
+
                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
                        if (!lov->lov_tgts[i] || !lov->lov_tgts[i]->ltd_active)
                                continue;
@@ -869,6 +871,7 @@ static int lov_cleanup(struct obd_device *obd)
        lprocfs_obd_cleanup(obd);
        if (lov->lov_tgts) {
                int i;
+
                obd_getref(obd);
                for (i = 0; i < lov->desc.ld_tgt_count; i++) {
                        if (!lov->lov_tgts[i])
@@ -1256,6 +1259,7 @@ static int lov_setattr_async(struct obd_export *exp, struct obd_info *oinfo,
        /* If we are not waiting for responses on async requests, return. */
        if (rc || !rqset || list_empty(&rqset->set_requests)) {
                int err;
+
                if (rc)
                        atomic_set(&set->set_completes, 0);
                err = lov_fini_setattr_set(set);
@@ -1348,6 +1352,7 @@ static int lov_statfs_async(struct obd_export *exp, struct obd_info *oinfo,
 
        if (rc || list_empty(&rqset->set_requests)) {
                int err;
+
                if (rc)
                        atomic_set(&set->set_completes, 0);
                err = lov_fini_statfs_set(set);
index f9963481c91bbc83d0c876b98086515750929bb5..d3c6aa7645c7e9f035299dd140b7233e88c68075 100644 (file)
@@ -282,6 +282,7 @@ static int pool_proc_open(struct inode *inode, struct file *file)
        rc = seq_open(file, &pool_proc_ops);
        if (!rc) {
                struct seq_file *s = file->private_data;
+
                s->private = inode->i_private;
        }
        return rc;
index 3e9cca0263060e0cebc74fb51e61987c4b09d56c..76b16f4f95c412d26a50cf71881b1078801b44a2 100644 (file)
@@ -955,6 +955,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp,
        if (KEY_IS(KEY_INIT_RECOV_BACKUP)) {
                struct obd_import *imp = class_exp2cliimp(exp);
                int value;
+
                if (vallen != sizeof(int))
                        return -EINVAL;
                value = *(int *)val;
@@ -1058,6 +1059,7 @@ static int mgc_import_event(struct obd_device *obd,
                break;
        case IMP_EVENT_INVALIDATE: {
                struct ldlm_namespace *ns = obd->obd_namespace;
+
                ldlm_namespace_cleanup(ns, LDLM_FL_LOCAL_ONLY);
                break;
        }
@@ -1648,6 +1650,7 @@ static int mgc_process_config(struct obd_device *obd, u32 len, void *buf)
                                rc = mgc_process_log(obd, cld->cld_recover);
                        } else {
                                struct config_llog_data *cir = cld->cld_recover;
+
                                cld->cld_recover = NULL;
                                config_log_put(cir);
                        }
index ef66ac9a511597b9773336ae689ab4b6e0d6f587..6b1043548d85cf12e8c1c4876b2aa1451ae9988a 100644 (file)
@@ -715,6 +715,7 @@ static int cl_page_in_io(const struct cl_page *page, const struct cl_io *io)
                 */
                if (!cl_io_is_append(io)) {
                        const struct cl_io_rw_common *crw = &(io->u.ci_rw);
+
                        start = cl_offset(page->cp_obj, idx);
                        end   = cl_offset(page->cp_obj, idx + 1);
                        result = crw->crw_pos < end &&
@@ -1311,6 +1312,7 @@ static void cl_req_free(const struct lu_env *env, struct cl_req *req)
        if (req->crq_o != NULL) {
                for (i = 0; i < req->crq_nrobjs; ++i) {
                        struct cl_object *obj = req->crq_o[i].ro_obj;
+
                        if (obj != NULL) {
                                lu_object_ref_del_at(&obj->co_lu,
                                                     &req->crq_o[i].ro_obj_ref,
index b15c990dec6ae4a33e8903b3db201ddb02722c20..0c734f12f21df33b4ade3db4a80f6abb35aab3b3 100644 (file)
@@ -129,6 +129,7 @@ static void cl_lock_trace0(int level, const struct lu_env *env,
                           const char *func, const int line)
 {
        struct cl_object_header *h = cl_object_header(lock->cll_descr.cld_obj);
+
        CDEBUG(level, "%s: %p@(%d %p %d %d %d %d %d %lx)(%p/%d/%d) at %s():%d\n",
               prefix, lock, atomic_read(&lock->cll_ref),
               lock->cll_guarder, lock->cll_depth,
@@ -1098,6 +1099,7 @@ int cl_use_try(const struct lu_env *env, struct cl_lock *lock, int atomic)
                /* @atomic means back-off-on-failure. */
                if (atomic) {
                        int rc;
+
                        rc = cl_unuse_try_internal(env, lock);
                        /* Vet the results. */
                        if (rc < 0 && result > 0)
index 89ff7f1fb0fca99d96e6a2ee326c9aab10420148..cf752aa9634765c4b0c9f6584f95aecf4aa040c1 100644 (file)
@@ -567,6 +567,7 @@ static unsigned cl_env_hops_hash(struct cfs_hash *lh,
 static void *cl_env_hops_obj(struct hlist_node *hn)
 {
        struct cl_env *cle = hlist_entry(hn, struct cl_env, ce_node);
+
        LASSERT(cle->ce_magic == &cl_env_init0);
        return (void *)cle;
 }
@@ -582,6 +583,7 @@ static int cl_env_hops_keycmp(const void *key, struct hlist_node *hn)
 static void cl_env_hops_noop(struct cfs_hash *hs, struct hlist_node *hn)
 {
        struct cl_env *cle = hlist_entry(hn, struct cl_env, ce_node);
+
        LASSERT(cle->ce_magic == &cl_env_init0);
 }
 
index e8a155809872d4c7ba3eb27ce99eab68022c8e8f..a1a492ff62fc7d020af8b6d555d50f915a199d11 100644 (file)
@@ -477,6 +477,7 @@ extern int class_procfs_clean(void);
 static int __init init_obdclass(void)
 {
        int i, err;
+
        int lustre_register_fs(void);
 
        LCONSOLE_INFO("Lustre: Build Version: "BUILD_VERSION"\n");
@@ -548,6 +549,7 @@ static int __init init_obdclass(void)
 static void cleanup_obdclass(void)
 {
        int i;
+
        int lustre_unregister_fs(void);
 
        lustre_unregister_fs();
@@ -555,6 +557,7 @@ static void cleanup_obdclass(void)
        misc_deregister(&obd_psdev);
        for (i = 0; i < class_devno_max(); i++) {
                struct obd_device *obd = class_num2obd(i);
+
                if (obd && obd->obd_set_up &&
                    OBT(obd) && OBP(obd, detach)) {
                        /* XXX should this call generic detach otherwise? */
index c8a5ff4971434960152334be387fdb51877fe4b8..ba56187b4c882c940c6d2d119a3e71acb8b8a1c7 100644 (file)
@@ -672,6 +672,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
        if (ret.lc_count != 0) {
                /* first argument to do_div MUST be __u64 */
                __u64 sum = ret.lc_sum;
+
                do_div(sum, ret.lc_count);
                ret.lc_sum = sum;
        } else
@@ -718,6 +719,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
                if (ret.lc_sum > 0 && ret.lc_count > 0) {
                        /* first argument to do_div MUST be __u64 */
                        __u64 sum = ret.lc_sum;
+
                        do_div(sum, ret.lc_count);
                        ret.lc_sum = sum;
                        seq_printf(m,
@@ -733,6 +735,7 @@ int lprocfs_rd_import(struct seq_file *m, void *data)
                if (ret.lc_sum > 0 && ret.lc_count != 0) {
                        /* first argument to do_div MUST be __u64 */
                        __u64 sum = ret.lc_sum;
+
                        do_div(sum, ret.lc_count);
                        ret.lc_sum = sum;
                        seq_printf(m,
@@ -783,6 +786,7 @@ EXPORT_SYMBOL(lprocfs_rd_state);
 int lprocfs_at_hist_helper(struct seq_file *m, struct adaptive_timeout *at)
 {
        int i;
+
        for (i = 0; i < AT_BINS; i++)
                seq_printf(m, "%3u ", at->at_hist[i]);
        seq_printf(m, "\n");
@@ -1314,6 +1318,7 @@ int lprocfs_write_frac_u64_helper(const char *buffer, unsigned long count,
 
        if (*end == '.') {
                int i;
+
                pbuf = end + 1;
 
                /* need to limit frac_d to a __u32 */
index a801b6cc518a249e5996ff538d69bdbde70673a0..6a6ddb4c34dc5e61094020267329d5048ed16aa5 100644 (file)
@@ -1054,6 +1054,7 @@ EXPORT_SYMBOL(lu_site_fini);
 int lu_site_init_finish(struct lu_site *s)
 {
        int result;
+
        mutex_lock(&lu_sites_guard);
        result = lu_context_refill(&lu_shrink_env.le_ctx);
        if (result == 0)
index d19ec15cb4631d9195aebdeebeecfb6c09d55834..b526e7ef0c0e55cdeba737a621806d0efd5c8835 100644 (file)
@@ -126,6 +126,7 @@ static void class_handle_unhash_nolock(struct portals_handle *h)
 void class_handle_unhash(struct portals_handle *h)
 {
        struct handle_bucket *bucket;
+
        bucket = handle_hash + (h->h_cookie & HANDLE_HASH_MASK);
 
        spin_lock(&bucket->lock);
@@ -233,6 +234,7 @@ static int cleanup_all_handles(void)
 void class_handle_cleanup(void)
 {
        int count;
+
        LASSERT(handle_hash != NULL);
 
        count = cleanup_all_handles();
index f0140155bd5df4415c38fa8afe5f7aa07f48c3a2..68cb3dff985fd201f7e0369e5520a7b46178b9db 100644 (file)
@@ -851,6 +851,7 @@ int class_process_config(struct lustre_cfg *lcfg)
        }
        case LCFG_MARKER: {
                struct cfg_marker *marker;
+
                marker = lustre_cfg_buf(lcfg, 1);
                CDEBUG(D_IOCTL, "marker %d (%#x) %.16s %s\n", marker->cm_step,
                       marker->cm_flags, marker->cm_tgtname, marker->cm_comment);
@@ -1015,6 +1016,7 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
                                rc = -EROFS;
                                if (var->fops && var->fops->write) {
                                        mm_segment_t oldfs;
+
                                        oldfs = get_fs();
                                        set_fs(KERNEL_DS);
                                        rc = (var->fops->write)(&fakefile, sval,
@@ -1091,6 +1093,7 @@ int class_config_llog_handler(const struct lu_env *env,
                /* Figure out config state info */
                if (lcfg->lcfg_command == LCFG_MARKER) {
                        struct cfg_marker *marker = lustre_cfg_buf(lcfg, 1);
+
                        lustre_swab_cfg_marker(marker, swab,
                                               LUSTRE_CFG_BUFLEN(lcfg, 1));
                        CDEBUG(D_CONFIG, "Marker, inst_flg=%#x mark_flg=%#x\n",
index de42acd56b91fa563c913fa16e037ffa69211c2d..0c4dbb1304eea32e376ee714c768948ef5ac2785 100644 (file)
@@ -177,6 +177,7 @@ static int lustre_start_simple(char *obdname, char *type, char *uuid,
                               char *s1, char *s2, char *s3, char *s4)
 {
        int rc;
+
        CDEBUG(D_MOUNT, "Starting obd %s (typ=%s)\n", obdname, type);
 
        rc = do_lcfg(obdname, 0, LCFG_ATTACH, type, uuid, NULL, NULL);
@@ -979,6 +980,7 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd)
                } else if (strncmp(s1, "param=", 6) == 0) {
                        int length;
                        char *tail = strchr(s1 + 6, ',');
+
                        if (tail == NULL)
                                length = strlen(s1);
                        else
index 2a16046aac20839caeea1f27d6160a0fb400acfb..1ad07f6c1b7a2f7cccb7577d4b3980b70afbbba4 100644 (file)
@@ -377,6 +377,7 @@ static int osc_checksum_type_seq_show(struct seq_file *m, void *v)
 {
        struct obd_device *obd = m->private;
        int i;
+
        DECLARE_CKSUM_NAME;
 
        if (obd == NULL)
@@ -400,6 +401,7 @@ static ssize_t osc_checksum_type_seq_write(struct file *file,
 {
        struct obd_device *obd = ((struct seq_file *)file->private_data)->private;
        int i;
+
        DECLARE_CKSUM_NAME;
        char kernbuf[10];
 
@@ -627,6 +629,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
        for (i = 0; i < OBD_HIST_MAX; i++) {
                unsigned long r = cli->cl_read_page_hist.oh_buckets[i];
                unsigned long w = cli->cl_write_page_hist.oh_buckets[i];
+
                read_cum += r;
                write_cum += w;
                seq_printf(seq, "%d:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
@@ -650,6 +653,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
        for (i = 0; i < OBD_HIST_MAX; i++) {
                unsigned long r = cli->cl_read_rpc_hist.oh_buckets[i];
                unsigned long w = cli->cl_write_rpc_hist.oh_buckets[i];
+
                read_cum += r;
                write_cum += w;
                seq_printf(seq, "%d:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
@@ -673,6 +677,7 @@ static int osc_rpc_stats_seq_show(struct seq_file *seq, void *v)
        for (i = 0; i < OBD_HIST_MAX; i++) {
                unsigned long r = cli->cl_read_offset_hist.oh_buckets[i];
                unsigned long w = cli->cl_write_offset_hist.oh_buckets[i];
+
                read_cum += r;
                write_cum += w;
                seq_printf(seq, "%d:\t\t%10lu %3lu %3lu   | %10lu %3lu %3lu\n",
index 62da0615766545d6eb86bdca8e7e80d7341fa627..4d235972e5cc4a80ce9e0c8f9cacaf0c97720558 100644 (file)
@@ -247,6 +247,7 @@ static int osc_extent_sanity_check0(struct osc_extent *ext,
 
        if (ext->oe_osclock) {
                struct cl_lock_descr *descr;
+
                descr = &ext->oe_osclock->cll_descr;
                if (!(descr->cld_start <= ext->oe_start &&
                      descr->cld_end >= ext->oe_max_end)) {
@@ -475,6 +476,7 @@ static void osc_extent_insert(struct osc_object *obj, struct osc_extent *ext)
 static void osc_extent_erase(struct osc_extent *ext)
 {
        struct osc_object *obj = ext->oe_obj;
+
        LASSERT(osc_object_is_locked(obj));
        if (ext->oe_intree) {
                rb_erase(&ext->oe_node, &obj->oo_root);
@@ -868,6 +870,7 @@ int osc_extent_finish(const struct lu_env *env, struct osc_extent *ext,
                int offset = oap->oap_page_off & ~CFS_PAGE_MASK;
                int count = oap->oap_count + (offset & (blocksize - 1));
                int end = (offset + oap->oap_count) & (blocksize - 1);
+
                if (end)
                        count += blocksize - end;
 
@@ -1510,6 +1513,7 @@ static int osc_enter_cache_try(struct client_obd *cli,
 static int ocw_granted(struct client_obd *cli, struct osc_cache_waiter *ocw)
 {
        int rc;
+
        client_obd_list_lock(&cli->cl_loi_list_lock);
        rc = list_empty(&ocw->ocw_entry);
        client_obd_list_unlock(&cli->cl_loi_list_lock);
@@ -1632,6 +1636,7 @@ wakeup:
 static int osc_max_rpc_in_flight(struct client_obd *cli, struct osc_object *osc)
 {
        int hprpc = !!list_empty(&osc->oo_hp_exts);
+
        return rpcs_in_flight(cli) >= cli->cl_max_rpcs_in_flight + hprpc;
 }
 
@@ -1693,6 +1698,7 @@ static int osc_makes_rpc(struct client_obd *cli, struct osc_object *osc,
 static void osc_update_pending(struct osc_object *obj, int cmd, int delta)
 {
        struct client_obd *cli = osc_cli(obj);
+
        if (cmd & OBD_BRW_WRITE) {
                atomic_add(delta, &obj->oo_nr_writes);
                atomic_add(delta, &cli->cl_pending_w_pages);
@@ -2566,6 +2572,7 @@ int osc_queue_sync_pages(const struct lu_env *env, struct osc_object *obj,
 
        list_for_each_entry(oap, list, oap_pending_item) {
                struct cl_page *cp = oap2cl_page(oap);
+
                if (cp->cp_index > end)
                        end = cp->cp_index;
                if (cp->cp_index < start)
@@ -2851,6 +2858,7 @@ int osc_cache_writeback_range(const struct lu_env *env, struct osc_object *obj,
                        result += ext->oe_nr_pages;
                        if (!discard) {
                                struct list_head *list = NULL;
+
                                if (hp) {
                                        EASSERT(!ext->oe_hp, ext);
                                        ext->oe_hp = 1;
@@ -2924,6 +2932,7 @@ int osc_cache_writeback_range(const struct lu_env *env, struct osc_object *obj,
 
        if (hp || discard) {
                int rc;
+
                rc = osc_cache_wait_range(env, obj, start, end);
                if (result >= 0 && rc < 0)
                        result = rc;
index 2af3232230ecaedeb17229620e146afc5a6fc03d..d696b321a659136370f29fa3eeee3e635b3e6cdc 100644 (file)
@@ -166,6 +166,7 @@ static void osc_page_fini(const struct lu_env *env,
                          struct cl_page_slice *slice)
 {
        struct osc_page *opg = cl2osc_page(slice);
+
        CDEBUG(D_TRACE, "%p\n", opg);
        LASSERT(opg->ops_lock == NULL);
 }
@@ -512,6 +513,7 @@ int osc_page_init(const struct lu_env *env, struct cl_object *obj,
                                        cl_offset(obj, page->cp_index));
        if (result == 0) {
                struct osc_io *oio = osc_env_io(env);
+
                opg->ops_srvlock = osc_io_srvlock(oio);
                cl_page_slice_add(page, &opg->ops_cl, obj,
                                &osc_page_ops);
@@ -624,6 +626,7 @@ static int discard_pagevec(const struct lu_env *env, struct cl_io *io,
 
        for (count = 0, i = 0; i < max_index; i++) {
                struct cl_page *page = pvec[i];
+
                if (cl_page_own_try(env, io, page) == 0) {
                        /* free LRU page only if nobody is using it.
                         * This check is necessary to avoid freeing the pages
index 2ff253f458f8af5255f11ed3a2c7f79f35ccd9e4..3b32928eb4fc53f3250dd7af9465d755f5f6668f 100644 (file)
@@ -158,6 +158,7 @@ static void *
 oqi_key(struct hlist_node *hnode)
 {
        struct osc_quota_info *oqi;
+
        oqi = hlist_entry(hnode, struct osc_quota_info, oqi_hash);
        return &oqi->oqi_id;
 }
index 86c0303eb24a9cd661d810eeab295b5fe6b728c5..e3808c97043f38c475ff351985a45c805cdaa8b7 100644 (file)
@@ -1179,6 +1179,7 @@ static u32 osc_checksum_bulk(int nob, u32 pg_count,
                    OBD_FAIL_CHECK(OBD_FAIL_OSC_CHECKSUM_RECEIVE)) {
                        unsigned char *ptr = kmap(pga[i]->pg);
                        int off = pga[i]->off & ~CFS_PAGE_MASK;
+
                        memcpy(ptr + off, "bad1", min(4, nob));
                        kunmap(pga[i]->pg);
                }
@@ -1886,6 +1887,7 @@ int osc_build_rpc(const struct lu_env *env, struct client_obd *cli,
        i = 0;
        list_for_each_entry(oap, &rpc_list, oap_rpc_item) {
                struct cl_page *page = oap2cl_page(oap);
+
                if (clerq == NULL) {
                        clerq = cl_req_alloc(env, page, crt,
                                             1 /* only 1-object rpcs for now */);
@@ -2091,6 +2093,7 @@ static int osc_enqueue_fini(struct ptlrpc_request *req, struct ost_lvb *lvb,
                /* The request was created before ldlm_cli_enqueue call. */
                if (rc == ELDLM_LOCK_ABORTED) {
                        struct ldlm_reply *rep;
+
                        rep = req_capsule_server_get(&req->rq_pill,
                                                     &RMF_DLM_REP);
 
@@ -2277,6 +2280,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
  no_match:
        if (intent) {
                LIST_HEAD(cancels);
+
                req = ptlrpc_request_alloc(class_exp2cliimp(exp),
                                           &RQF_LDLM_ENQUEUE_LVB);
                if (req == NULL)
@@ -2301,6 +2305,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id,
        if (rqset) {
                if (!rc) {
                        struct osc_enqueue_args *aa;
+
                        CLASSERT (sizeof(*aa) <= sizeof(req->rq_async_args));
                        aa = ptlrpc_req_async_args(req);
                        aa->oa_ei = einfo;
@@ -3170,6 +3175,7 @@ static int osc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage)
        switch (stage) {
        case OBD_CLEANUP_EARLY: {
                struct obd_import *imp;
+
                imp = obd->u.cli.cl_import;
                CDEBUG(D_HA, "Deactivating import %s\n", obd->obd_name);
                /* ptlrpc_abort_inflight to stop an mds_lov_synchronize */
index 6aaa5dd55a92088ed042dd8f0b974e9716423e4d..c6c23f92348a846fd8138833670bf3eee57290c2 100644 (file)
@@ -660,6 +660,7 @@ int ptlrpc_request_pack(struct ptlrpc_request *request,
                        __u32 version, int opcode)
 {
        int rc;
+
        rc = ptlrpc_request_bufs_pack(request, version, opcode, NULL, NULL);
        if (rc)
                return rc;
@@ -1089,6 +1090,7 @@ static int ptlrpc_check_status(struct ptlrpc_request *req)
        if (lustre_msg_get_type(req->rq_repmsg) == PTL_RPC_MSG_ERR) {
                struct obd_import *imp = req->rq_import;
                __u32 opc = lustre_msg_get_opc(req->rq_reqmsg);
+
                if (ptlrpc_console_allow(req))
                        LCONSOLE_ERROR_MSG(0x011, "%s: Communicating with %s, operation %s failed with %d.\n",
                                           imp->imp_obd->obd_name,
index 5aaf42f2631d253b71bc24d02b2967e86b32b0b9..23d45e8c67b36d35749c90a42822f5d141dac690 100644 (file)
@@ -454,6 +454,7 @@ int ptlrpc_reconnect_import(struct obd_import *imp)
        if (atomic_read(&imp->imp_inval_count) > 0) {
                int rc;
                struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL);
+
                rc = l_wait_event(imp->imp_recovery_waitq,
                                  (atomic_read(&imp->imp_inval_count) == 0),
                                  &lwi);
@@ -535,6 +536,7 @@ static int import_select_connection(struct obd_import *imp)
           trying to reconnect on it.) */
        if (tried_all && (imp->imp_conn_list.next == &imp_conn->oic_item)) {
                struct adaptive_timeout *at = &imp->imp_at.iat_net_latency;
+
                if (at_get(at) < CONNECTION_SWITCH_MAX) {
                        at_measured(at, at_get(at) + CONNECTION_SWITCH_INC);
                        if (at_get(at) > CONNECTION_SWITCH_MAX)
index fbb9ce8cc31a8b7a7548bb1f6b1338aabc7f65fc..5122205cbb99c41599554ce34502f72ec1687d2a 100644 (file)
@@ -118,6 +118,7 @@ static int llog_client_open(const struct lu_env *env,
 
        if (name) {
                char *tmp;
+
                tmp = req_capsule_client_sized_get(&req->rq_pill, &RMF_NAME,
                                                   strlen(name) + 1);
                LASSERT(tmp);
index 6cf9b92c7c059e6d0667e7c72fccc7667c00e79c..593613276c8f2569128c1769b320f0353ecc832b 100644 (file)
@@ -166,6 +166,7 @@ const char *ll_opcode2str(__u32 opcode)
         *      ptlrpc_internal.h needs to be modified.
         */
        __u32 offset = opcode_offset(opcode);
+
        LASSERTF(offset < LUSTRE_MAX_OPCODES,
                 "offset %u >= LUSTRE_MAX_OPCODES %u\n",
                 offset, LUSTRE_MAX_OPCODES);
@@ -239,6 +240,7 @@ ptlrpc_ldebugfs_register(struct dentry *root, char *dir,
        }
        for (i = 0; i < LUSTRE_MAX_OPCODES; i++) {
                __u32 opcode = ll_rpc_opcode_table[i].opcode;
+
                lprocfs_counter_init(svc_stats,
                                     EXTRA_MAX_OPCODES + i, svc_counter_config,
                                     ll_opcode2str(opcode), "usec");
index 973ff8ddb0c9bfe7bdc2191fa7ecfab3632bbe35..ef33c5b7e852aa709b26f79f8f378890cfdff54d 100644 (file)
@@ -98,6 +98,7 @@ EXPORT_SYMBOL(ptlrpc_buf_need_swab);
 int lustre_msg_early_size(void)
 {
        static int size;
+
        if (!size) {
                /* Always reply old ptlrpc_body_v2 to keep interoperability
                 * with the old client (< 2.3) which doesn't have pb_jobid
@@ -107,6 +108,7 @@ int lustre_msg_early_size(void)
                 *     client.
                 */
                __u32 pblen = sizeof(struct ptlrpc_body_v2);
+
                size = lustre_msg_size(LUSTRE_MSG_MAGIC_V2, 1, &pblen);
        }
        return size;
@@ -187,6 +189,7 @@ void lustre_init_msg_v2(struct lustre_msg_v2 *msg, int count, __u32 *lens,
        ptr = (char *)msg + lustre_msg_hdr_size_v2(count);
        for (i = 0; i < count; i++) {
                char *tmp = bufs[i];
+
                LOGL(tmp, lens[i], ptr);
        }
 }
@@ -572,6 +575,7 @@ EXPORT_SYMBOL(__lustre_unpack_msg);
 int ptlrpc_unpack_req_msg(struct ptlrpc_request *req, int len)
 {
        int rc;
+
        rc = __lustre_unpack_msg(req->rq_reqmsg, len);
        if (rc == 1) {
                lustre_set_req_swabbed(req, MSG_PTLRPC_HEADER_OFF);
@@ -584,6 +588,7 @@ EXPORT_SYMBOL(ptlrpc_unpack_req_msg);
 int ptlrpc_unpack_rep_msg(struct ptlrpc_request *req, int len)
 {
        int rc;
+
        rc = __lustre_unpack_msg(req->rq_repmsg, len);
        if (rc == 1) {
                lustre_set_rep_swabbed(req, MSG_PTLRPC_HEADER_OFF);
@@ -785,6 +790,7 @@ __u32 lustre_msg_get_flags(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (pb)
                        return pb->pb_flags;
 
@@ -804,6 +810,7 @@ void lustre_msg_add_flags(struct lustre_msg *msg, int flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_flags |= flags;
                return;
@@ -819,6 +826,7 @@ void lustre_msg_set_flags(struct lustre_msg *msg, int flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_flags = flags;
                return;
@@ -834,6 +842,7 @@ void lustre_msg_clear_flags(struct lustre_msg *msg, int flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_flags &= ~(flags & MSG_GEN_FLAG_MASK);
                return;
@@ -849,6 +858,7 @@ __u32 lustre_msg_get_op_flags(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (pb)
                        return pb->pb_op_flags;
 
@@ -866,6 +876,7 @@ void lustre_msg_add_op_flags(struct lustre_msg *msg, int flags)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_op_flags |= flags;
                return;
@@ -881,6 +892,7 @@ struct lustre_handle *lustre_msg_get_handle(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return NULL;
@@ -899,6 +911,7 @@ __u32 lustre_msg_get_type(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return PTL_RPC_MSG_ERR;
@@ -917,6 +930,7 @@ void lustre_msg_add_version(struct lustre_msg *msg, int version)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_version |= version;
                return;
@@ -932,6 +946,7 @@ __u32 lustre_msg_get_opc(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return 0;
@@ -951,6 +966,7 @@ __u64 lustre_msg_get_last_committed(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return 0;
@@ -969,6 +985,7 @@ __u64 *lustre_msg_get_versions(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return NULL;
@@ -987,6 +1004,7 @@ __u64 lustre_msg_get_transno(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return 0;
@@ -1005,6 +1023,7 @@ int lustre_msg_get_status(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (pb)
                        return pb->pb_status;
 
@@ -1024,6 +1043,7 @@ __u64 lustre_msg_get_slv(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return -EINVAL;
@@ -1043,6 +1063,7 @@ void lustre_msg_set_slv(struct lustre_msg *msg, __u64 slv)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return;
@@ -1062,6 +1083,7 @@ __u32 lustre_msg_get_limit(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return -EINVAL;
@@ -1081,6 +1103,7 @@ void lustre_msg_set_limit(struct lustre_msg *msg, __u64 limit)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return;
@@ -1100,6 +1123,7 @@ __u32 lustre_msg_get_conn_cnt(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return 0;
@@ -1130,6 +1154,7 @@ __u32 lustre_msg_get_timeout(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return 0;
@@ -1148,6 +1173,7 @@ __u32 lustre_msg_get_service_time(struct lustre_msg *msg)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                if (!pb) {
                        CERROR("invalid msg %p: no ptlrpc body!\n", msg);
                        return 0;
@@ -1179,6 +1205,7 @@ __u32 lustre_msg_calc_cksum(struct lustre_msg *msg)
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
                __u32 crc;
                unsigned int hsize = 4;
+
                cfs_crypto_hash_digest(CFS_HASH_ALG_CRC32, (unsigned char *)pb,
                                   lustre_msg_buflen(msg, MSG_PTLRPC_BODY_OFF),
                                   NULL, 0, (unsigned char *)&crc, &hsize);
@@ -1195,6 +1222,7 @@ void lustre_msg_set_handle(struct lustre_msg *msg, struct lustre_handle *handle)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_handle = *handle;
                return;
@@ -1210,6 +1238,7 @@ void lustre_msg_set_type(struct lustre_msg *msg, __u32 type)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_type = type;
                return;
@@ -1225,6 +1254,7 @@ void lustre_msg_set_opc(struct lustre_msg *msg, __u32 opc)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_opc = opc;
                return;
@@ -1240,6 +1270,7 @@ void lustre_msg_set_versions(struct lustre_msg *msg, __u64 *versions)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_pre_versions[0] = versions[0];
                pb->pb_pre_versions[1] = versions[1];
@@ -1258,6 +1289,7 @@ void lustre_msg_set_transno(struct lustre_msg *msg, __u64 transno)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_transno = transno;
                return;
@@ -1273,6 +1305,7 @@ void lustre_msg_set_status(struct lustre_msg *msg, __u32 status)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_status = status;
                return;
@@ -1288,6 +1321,7 @@ void lustre_msg_set_conn_cnt(struct lustre_msg *msg, __u32 conn_cnt)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_conn_cnt = conn_cnt;
                return;
@@ -1303,6 +1337,7 @@ void lustre_msg_set_timeout(struct lustre_msg *msg, __u32 timeout)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_timeout = timeout;
                return;
@@ -1317,6 +1352,7 @@ void lustre_msg_set_service_time(struct lustre_msg *msg, __u32 service_time)
        switch (msg->lm_magic) {
        case LUSTRE_MSG_MAGIC_V2: {
                struct ptlrpc_body *pb = lustre_msg_ptlrpc_body(msg);
+
                LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg);
                pb->pb_service_time = service_time;
                return;
@@ -1684,6 +1720,7 @@ EXPORT_SYMBOL(lustre_swab_mdt_ioepoch);
 void lustre_swab_mgs_target_info(struct mgs_target_info *mti)
 {
        int i;
+
        __swab32s(&mti->mti_lustre_ver);
        __swab32s(&mti->mti_stripe_index);
        __swab32s(&mti->mti_config_ver);
index a608165d1c2b7ff19c76e9e44a2c40f7a2149b54..53bfae143dfcfd14e3a57c047afc62e564222bc9 100644 (file)
@@ -103,6 +103,7 @@ static int ptlrpc_ping(struct obd_import *imp)
 static void ptlrpc_update_next_ping(struct obd_import *imp, int soon)
 {
        int time = soon ? PING_INTERVAL_SHORT : PING_INTERVAL;
+
        if (imp->imp_state == LUSTRE_IMP_DISCON) {
                int dtime = max_t(int, CONNECTION_SWITCH_MIN,
                                  AT_OFF ? 0 :
@@ -135,6 +136,7 @@ static long pinger_check_timeout(unsigned long time)
        mutex_lock(&pinger_mutex);
        list_for_each_entry(item, &timeout_list, ti_chain) {
                int ti_timeout = item->ti_timeout;
+
                if (timeout > ti_timeout)
                        timeout = ti_timeout;
                break;
index 3a6539c4c81ff5e27266b1c6a9033201ec933f7e..a587c9461e9590fe9888c404f6a0d551bbd9d776 100644 (file)
@@ -1982,6 +1982,7 @@ int sptlrpc_svc_alloc_rs(struct ptlrpc_request *req, int msglen)
        rc = policy->sp_sops->alloc_rs(req, msglen);
        if (unlikely(rc == -ENOMEM)) {
                struct ptlrpc_service_part *svcpt = req->rq_rqbd->rqbd_svcpt;
+
                if (svcpt->scp_service->srv_max_reply_size <
                   msglen + sizeof(struct ptlrpc_reply_state)) {
                        /* Just return failure if the size is too big */
index 0f3c693dd2172581b8b9093b8eb2babee08cc67b..8a6abbc06e1b437e8451dd985fc2858a67125539 100644 (file)
@@ -84,6 +84,7 @@ int null_ctx_sign(struct ptlrpc_cli_ctx *ctx, struct ptlrpc_request *req)
 
        if (!req->rq_import->imp_dlm_fake) {
                struct obd_device *obd = req->rq_import->imp_obd;
+
                null_encode_sec_part(req->rq_reqbuf,
                                     obd->u.cli.cl_sp_me);
        }
index 01313612aef2f90c39531655fc4d3126821ea9e4..2652fc81f66aceb0d6a184954f5258b33079969b 100644 (file)
@@ -1352,6 +1352,7 @@ static bool ptlrpc_server_allow_normal(struct ptlrpc_service_part *svcpt,
                                       bool force)
 {
        int running = svcpt->scp_nthrs_running;
+
        if (unlikely(svcpt->scp_service->srv_req_portal == MDS_REQUEST_PORTAL &&
                     CFS_FAIL_PRECHECK(OBD_FAIL_PTLRPC_CANCEL_RESEND))) {
                /* leave just 1 thread for normal RPCs */
@@ -1722,6 +1723,7 @@ put_conn:
        if (likely(svc->srv_stats != NULL && request->rq_reqmsg != NULL)) {
                __u32 op = lustre_msg_get_opc(request->rq_reqmsg);
                int opc = opcode_offset(op);
+
                if (opc > 0 && !(op == LDLM_ENQUEUE || op == MDS_REINT)) {
                        LASSERT(opc < LUSTRE_MAX_OPCODES);
                        lprocfs_counter_add(svc->srv_stats,
@@ -2256,6 +2258,7 @@ static int ptlrpc_start_hr_threads(void)
 
                for (j = 0; j < hrp->hrp_nthrs; j++) {
                        struct  ptlrpc_hr_thread *hrt = &hrp->hrp_thrs[j];
+
                        rc = PTR_ERR(kthread_run(ptlrpc_hr_main,
                                                 &hrp->hrp_thrs[j],
                                                 "ptlrpc_hr%02d_%03d",