diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/obdclass')
18 files changed, 72 insertions, 111 deletions
diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c index 2619bfeceb8b..9a69f6b35a0e 100644 --- a/drivers/staging/lustre/lustre/obdclass/acl.c +++ b/drivers/staging/lustre/lustre/obdclass/acl.c @@ -171,17 +171,17 @@ EXPORT_SYMBOL(lustre_posix_acl_xattr_2ext); /* * Filter out the "nobody" entries in the posix ACL. */ -int lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, int size, +int lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, size_t size, posix_acl_xattr_header **out) { int count, i, j, rc = 0; __u32 id; posix_acl_xattr_header *new; - if (unlikely(size < 0)) - return -EINVAL; - else if (!size) + if (!size) return 0; + if (size < sizeof(*new)) + return -EINVAL; OBD_ALLOC(new, size); if (unlikely(new == NULL)) diff --git a/drivers/staging/lustre/lustre/obdclass/capa.c b/drivers/staging/lustre/lustre/obdclass/capa.c index cd1abce378ea..d206b1046a18 100644 --- a/drivers/staging/lustre/lustre/obdclass/capa.c +++ b/drivers/staging/lustre/lustre/obdclass/capa.c @@ -272,8 +272,7 @@ int capa_hmac(__u8 *hmac, struct lustre_capa *capa, __u8 *key) tfm = crypto_alloc_hash(alg->ha_name, 0, 0); if (IS_ERR(tfm)) { - CERROR("crypto_alloc_tfm failed, check whether your kernel" - "has crypto support!\n"); + CERROR("crypto_alloc_tfm failed, check whether your kernel has crypto support!\n"); return PTR_ERR(tfm); } keylen = alg->ha_keylen; @@ -302,7 +301,7 @@ int capa_encrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen) /* passing "aes" in a variable instead of a constant string keeps gcc * 4.3.2 happy */ - tfm = crypto_alloc_blkcipher(alg, 0, 0 ); + tfm = crypto_alloc_blkcipher(alg, 0, 0); if (IS_ERR(tfm)) { CERROR("failed to load transform for aes\n"); return PTR_ERR(tfm); @@ -355,7 +354,7 @@ int capa_decrypt_id(__u32 *d, __u32 *s, __u8 *key, int keylen) /* passing "aes" in a variable instead of a constant string keeps gcc * 4.3.2 happy */ - tfm = crypto_alloc_blkcipher(alg, 0, 0 ); + tfm = crypto_alloc_blkcipher(alg, 0, 0); if (IS_ERR(tfm)) { CERROR("failed to load transform for aes\n"); return PTR_ERR(tfm); @@ -407,14 +406,13 @@ EXPORT_SYMBOL(capa_cpy); void _debug_capa(struct lustre_capa *c, struct libcfs_debug_msg_data *msgdata, - const char *fmt, ... ) + const char *fmt, ...) { va_list args; va_start(args, fmt); libcfs_debug_vmsg2(msgdata, fmt, args, - " capability@%p fid "DFID" opc %#llx uid %llu" - " gid %llu flags %u alg %d keyid %u timeout %u " - "expiry %u\n", c, PFID(capa_fid(c)), capa_opc(c), + " capability@%p fid " DFID " opc %#llx uid %llu gid %llu flags %u alg %d keyid %u timeout %u expiry %u\n", + c, PFID(capa_fid(c)), capa_opc(c), capa_uid(c), capa_gid(c), capa_flags(c), capa_alg(c), capa_keyid(c), capa_timeout(c), capa_expiry(c)); diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index f2383a497cbe..3141b6043708 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -1622,8 +1622,7 @@ int cl_sync_io_wait(const struct lu_env *env, struct cl_io *io, atomic_read(&anchor->csi_sync_nr) == 0, &lwi); if (rc < 0) { - CERROR("SYNC IO failed with error: %d, try to cancel " - "%d remaining pages\n", + CERROR("SYNC IO failed with error: %d, try to cancel %d remaining pages\n", rc, atomic_read(&anchor->csi_sync_nr)); (void)cl_io_cancel(env, io, queue); diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c index b204531ef710..b081167f9767 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c @@ -129,8 +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", + 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, lock->cll_state, lock->cll_error, lock->cll_holds, diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c index 7265ecbc6f9d..89a3fb2e56b2 100644 --- a/drivers/staging/lustre/lustre/obdclass/class_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c @@ -144,13 +144,11 @@ int obd_alloc_fail(const void *ptr, const char *name, const char *type, CERROR("%s%salloc of %s (%llu bytes) failed at %s:%d\n", ptr ? "force " :"", type, name, (__u64)size, file, line); - CERROR("%llu total bytes and %llu total pages " - "(%llu bytes) allocated by Lustre, " - "%d total bytes by LNET\n", + CERROR("%llu total bytes and %llu total pages (%llu bytes) allocated by Lustre, %d total bytes by LNET\n", obd_memory_sum(), obd_pages_sum() << PAGE_CACHE_SHIFT, obd_pages_sum(), - atomic_read(&libcfs_kmemory)); + atomic_read(&libcfs_kmemory)); return 1; } return 0; diff --git a/drivers/staging/lustre/lustre/obdclass/debug.c b/drivers/staging/lustre/lustre/obdclass/debug.c index d0f8f875ddd6..9c934e6d2ea1 100644 --- a/drivers/staging/lustre/lustre/obdclass/debug.c +++ b/drivers/staging/lustre/lustre/obdclass/debug.c @@ -40,6 +40,7 @@ #define DEBUG_SUBSYSTEM D_OTHER +#include <linux/unaligned/access_ok.h> #include "../include/obd_support.h" #include "../include/lustre_debug.h" @@ -60,14 +61,11 @@ int block_debug_setup(void *addr, int len, __u64 off, __u64 id) { LASSERT(addr); - off = cpu_to_le64 (off); - id = cpu_to_le64 (id); - memcpy(addr, (char *)&off, LPDS); - memcpy(addr + LPDS, (char *)&id, LPDS); - + put_unaligned_le64(off, addr); + put_unaligned_le64(id, addr+LPDS); addr += len - LPDS - LPDS; - memcpy(addr, (char *)&off, LPDS); - memcpy(addr + LPDS, (char *)&id, LPDS); + put_unaligned_le64(off, addr); + put_unaligned_le64(id, addr+LPDS); return 0; } diff --git a/drivers/staging/lustre/lustre/obdclass/dt_object.c b/drivers/staging/lustre/lustre/obdclass/dt_object.c index 52256c26bf07..e7be26ec7521 100644 --- a/drivers/staging/lustre/lustre/obdclass/dt_object.c +++ b/drivers/staging/lustre/lustre/obdclass/dt_object.c @@ -332,8 +332,7 @@ static struct dt_object *dt_reg_open(const struct lu_env *env, result = dt_lookup_dir(env, p, name, fid); if (result == 0){ o = dt_locate(env, dt, fid); - } - else + } else o = ERR_PTR(result); return o; @@ -950,8 +949,8 @@ int lprocfs_dt_rd_blksize(char *page, char **start, off_t off, { struct dt_device *dt = data; struct obd_statfs osfs; - int rc = dt_statfs(NULL, dt, &osfs); + if (rc == 0) { *eof = 1; rc = snprintf(page, count, "%u\n", @@ -967,8 +966,8 @@ int lprocfs_dt_rd_kbytestotal(char *page, char **start, off_t off, { struct dt_device *dt = data; struct obd_statfs osfs; - int rc = dt_statfs(NULL, dt, &osfs); + if (rc == 0) { __u32 blk_size = osfs.os_bsize >> 10; __u64 result = osfs.os_blocks; @@ -989,8 +988,8 @@ int lprocfs_dt_rd_kbytesfree(char *page, char **start, off_t off, { struct dt_device *dt = data; struct obd_statfs osfs; - int rc = dt_statfs(NULL, dt, &osfs); + if (rc == 0) { __u32 blk_size = osfs.os_bsize >> 10; __u64 result = osfs.os_bfree; @@ -1011,8 +1010,8 @@ int lprocfs_dt_rd_kbytesavail(char *page, char **start, off_t off, { struct dt_device *dt = data; struct obd_statfs osfs; - int rc = dt_statfs(NULL, dt, &osfs); + if (rc == 0) { __u32 blk_size = osfs.os_bsize >> 10; __u64 result = osfs.os_bavail; @@ -1033,8 +1032,8 @@ int lprocfs_dt_rd_filestotal(char *page, char **start, off_t off, { struct dt_device *dt = data; struct obd_statfs osfs; - int rc = dt_statfs(NULL, dt, &osfs); + if (rc == 0) { *eof = 1; rc = snprintf(page, count, "%llu\n", osfs.os_files); @@ -1049,8 +1048,8 @@ int lprocfs_dt_rd_filesfree(char *page, char **start, off_t off, { struct dt_device *dt = data; struct obd_statfs osfs; - int rc = dt_statfs(NULL, dt, &osfs); + if (rc == 0) { *eof = 1; rc = snprintf(page, count, "%llu\n", osfs.os_ffree); diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index c314e9c2343e..736ca410aca3 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c @@ -317,7 +317,7 @@ struct obd_device *class_newdev(const char *type_name, const char *name) result->obd_minor, new_obd_minor); obd_devs[result->obd_minor] = NULL; - result->obd_name[0]='\0'; + result->obd_name[0] = '\0'; } result = ERR_PTR(-EEXIST); break; @@ -524,8 +524,8 @@ void class_obd_list(void) /* Search for a client OBD connected to tgt_uuid. If grp_uuid is specified, then only the client with that uuid is returned, otherwise any client connected to the tgt is returned. */ -struct obd_device * class_find_client_obd(struct obd_uuid *tgt_uuid, - const char * typ_name, +struct obd_device *class_find_client_obd(struct obd_uuid *tgt_uuid, + const char *typ_name, struct obd_uuid *grp_uuid) { int i; @@ -557,7 +557,7 @@ EXPORT_SYMBOL(class_find_client_obd); searching at *next, and if a device is found, the next index to look at is saved in *next. If next is NULL, then the first matching device will always be returned. */ -struct obd_device * class_devices_in_group(struct obd_uuid *grp_uuid, int *next) +struct obd_device *class_devices_in_group(struct obd_uuid *grp_uuid, int *next) { int i; @@ -1087,8 +1087,7 @@ void __class_export_del_lock_ref(struct obd_export *exp, struct ldlm_lock *lock) spin_lock(&exp->exp_locks_list_guard); LASSERT(lock->l_exp_refs_nr > 0); if (lock->l_exp_refs_target != exp) { - LCONSOLE_WARN("lock %p, " - "mismatching export pointers: %p, %p\n", + LCONSOLE_WARN("lock %p, mismatching export pointers: %p, %p\n", lock, lock->l_exp_refs_target, exp); } if (-- lock->l_exp_refs_nr == 0) { @@ -1259,8 +1258,7 @@ static void class_disconnect_export_list(struct list_head *list, } class_export_get(exp); - CDEBUG(D_HA, "%s: disconnecting export at %s (%p), " - "last request at "CFS_TIME_T"\n", + CDEBUG(D_HA, "%s: disconnecting export at %s (%p), last request at " CFS_TIME_T "\n", exp->exp_obd->obd_name, obd_export_nid2str(exp), exp, exp->exp_last_request_time); /* release one export reference anyway */ @@ -1284,8 +1282,8 @@ void class_disconnect_exports(struct obd_device *obd) spin_unlock(&obd->obd_dev_lock); if (!list_empty(&work_list)) { - CDEBUG(D_HA, "OBD device %d (%p) has exports, " - "disconnecting them\n", obd->obd_minor, obd); + CDEBUG(D_HA, "OBD device %d (%p) has exports, disconnecting them\n", + obd->obd_minor, obd); class_disconnect_export_list(&work_list, exp_flags_from_obd(obd)); } else @@ -1422,8 +1420,8 @@ int obd_export_evict_by_nid(struct obd_device *obd, const char *nid) LASSERTF(doomed_exp != obd->obd_self_export, "self-export is hashed by NID?\n"); exports_evicted++; - LCONSOLE_WARN("%s: evicting %s (at %s) by administrative " - "request\n", obd->obd_name, + LCONSOLE_WARN("%s: evicting %s (at %s) by administrative request\n", + obd->obd_name, obd_uuid2str(&doomed_exp->exp_client_uuid), obd_export_nid2str(doomed_exp)); class_fail_export(doomed_exp); @@ -1546,9 +1544,7 @@ void obd_exports_barrier(struct obd_device *obd) set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(cfs_time_seconds(waited)); if (waited > 5 && IS_PO2(waited)) { - LCONSOLE_WARN("%s is waiting for obd_unlinked_exports " - "more than %d seconds. " - "The obd refcount = %d. Is it stuck?\n", + LCONSOLE_WARN("%s is waiting for obd_unlinked_exports more than %d seconds. The obd refcount = %d. Is it stuck?\n", obd->obd_name, waited, atomic_read(&obd->obd_refcount)); dump_exports(obd, 1); @@ -1783,7 +1779,7 @@ EXPORT_SYMBOL(kuc_len); * @param p Pointer to payload area * @returns Pointer to kuc header */ -struct kuc_hdr * kuc_ptr(void *p) +struct kuc_hdr *kuc_ptr(void *p) { struct kuc_hdr *lh = ((struct kuc_hdr *)p) - 1; LASSERT(lh->kuc_magic == KUC_MAGIC); diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 7eaaaa648dfb..66ceab20c743 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -166,14 +166,14 @@ int obd_ioctl_popdata(void *arg, void *data, int len) EXPORT_SYMBOL(obd_ioctl_popdata); /* opening /dev/obd */ -static int obd_class_open(struct inode * inode, struct file * file) +static int obd_class_open(struct inode *inode, struct file *file) { try_module_get(THIS_MODULE); return 0; } /* closing /dev/obd */ -static int obd_class_release(struct inode * inode, struct file * file) +static int obd_class_release(struct inode *inode, struct file *file) { module_put(THIS_MODULE); return 0; diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index 38a9b319355e..dd46e7358160 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -202,9 +202,8 @@ static int proc_max_dirty_pages_in_mb(struct ctl_table *table, int write, /* Don't allow them to let dirty pages exceed 90% of system * memory and set a hard minimum of 4MB. */ if (obd_max_dirty_pages > ((totalram_pages / 10) * 9)) { - CERROR("Refusing to set max dirty pages to %u, which " - "is more than 90%% of available RAM; setting " - "to %lu\n", obd_max_dirty_pages, + CERROR("Refusing to set max dirty pages to %u, which is more than 90%% of available RAM; setting to %lu\n", + obd_max_dirty_pages, ((totalram_pages / 10) * 9)); obd_max_dirty_pages = ((totalram_pages / 10) * 9); } else if (obd_max_dirty_pages < 4 << (20 - PAGE_CACHE_SHIFT)) { diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c index 3ab05292152c..114be4a78ccf 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog.c +++ b/drivers/staging/lustre/lustre/obdclass/llog.c @@ -346,8 +346,8 @@ repeat: } if (rec->lrh_len == 0 || rec->lrh_len > LLOG_CHUNK_SIZE) { - CWARN("invalid length %d in llog record for " - "index %d/%d\n", rec->lrh_len, + CWARN("invalid length %d in llog record for index %d/%d\n", + rec->lrh_len, rec->lrh_index, index); rc = -EINVAL; goto out; diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index 6e139cf372c4..4b850fc5f5d9 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -228,8 +228,7 @@ int llog_cat_close(const struct lu_env *env, struct llog_handle *cathandle) (llh->llh_count == 1)) { rc = llog_destroy(env, loghandle); if (rc) - CERROR("%s: failure destroying log during " - "cleanup: rc = %d\n", + CERROR("%s: failure destroying log during cleanup: rc = %d\n", loghandle->lgh_ctxt->loc_obd->obd_name, rc); @@ -746,8 +745,7 @@ int llog_cat_cleanup(const struct lu_env *env, struct llog_handle *cathandle, llog_cat_set_first_idx(cathandle, index); rc = llog_cancel_rec(env, cathandle, index); if (rc == 0) - CDEBUG(D_HA, "cancel plain log at index" - " %u of catalog "DOSTID"\n", + CDEBUG(D_HA, "cancel plain log at index %u of catalog " DOSTID "\n", index, POSTID(&cathandle->lgh_id.lgl_oi)); return rc; } @@ -810,8 +808,8 @@ int llog_cat_init_and_process(const struct lu_env *env, rc = llog_process_or_fork(env, llh, cat_cancel_cb, NULL, NULL, false); if (rc) - CERROR("%s: llog_process() with cat_cancel_cb failed: rc = " - "%d\n", llh->lgh_ctxt->loc_obd->obd_name, rc); + CERROR("%s: llog_process() with cat_cancel_cb failed: rc = %d\n", + llh->lgh_ctxt->loc_obd->obd_name, rc); return 0; } EXPORT_SYMBOL(llog_cat_init_and_process); diff --git a/drivers/staging/lustre/lustre/obdclass/llog_obd.c b/drivers/staging/lustre/lustre/obdclass/llog_obd.c index da769db0af77..978d886a1103 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_obd.c @@ -42,7 +42,7 @@ #include "llog_internal.h" /* helper functions for calling the llog obd methods */ -static struct llog_ctxt* llog_new_ctxt(struct obd_device *obd) +static struct llog_ctxt *llog_new_ctxt(struct obd_device *obd) { struct llog_ctxt *ctxt; diff --git a/drivers/staging/lustre/lustre/obdclass/llog_swab.c b/drivers/staging/lustre/lustre/obdclass/llog_swab.c index bfac8387021e..d3ec90e85eb9 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_swab.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_swab.c @@ -400,8 +400,7 @@ void lustre_swab_cfg_marker(struct cfg_marker *marker, int swab, int size) } marker->cm_createtime = createtime; marker->cm_canceltime = canceltime; - CDEBUG(D_CONFIG, "Find old cfg_marker(Srv32b,Clt64b) " - "for target %s, converting\n", + CDEBUG(D_CONFIG, "Find old cfg_marker(Srv32b,Clt64b) for target %s, converting\n", marker->cm_tgtname); } else if (swab) { __swab64s(&marker->cm_createtime); diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 61e04af2464f..3b7dfc367722 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -177,7 +177,7 @@ int lprocfs_read_frac_helper(char *buffer, unsigned long count, long val, } EXPORT_SYMBOL(lprocfs_read_frac_helper); -int lprocfs_write_frac_helper(const char *buffer, unsigned long count, +int lprocfs_write_frac_helper(const char __user *buffer, unsigned long count, int *val, int mult) { char kernbuf[20], *end, *pbuf; @@ -1400,8 +1400,8 @@ int lprocfs_alloc_obd_stats(struct obd_device *obd, unsigned num_private_stats) * LPROCFS_OBD_OP_INIT(.., .., opname) * is missing from the list above. */ LASSERTF(stats->ls_cnt_header[i].lc_name != NULL, - "Missing obd_stat initializer obd_op " - "operation at offset %d.\n", i - num_private_stats); + "Missing obd_stat initializer obd_op operation at offset %d.\n", + i - num_private_stats); } rc = lprocfs_register_stats(obd->obd_proc_entry, "stats", stats); if (rc < 0) { @@ -1486,8 +1486,7 @@ int lprocfs_alloc_md_stats(struct obd_device *obd, for (i = num_private_stats; i < num_stats; i++) { if (stats->ls_cnt_header[i].lc_name == NULL) { - CERROR("Missing md_stat initializer md_op " - "operation at offset %d. Aborting.\n", + CERROR("Missing md_stat initializer md_op operation at offset %d. Aborting.\n", i - num_private_stats); LBUG(); } @@ -1607,8 +1606,7 @@ LPROC_SEQ_FOPS_RO(lproc_exp_hash); int lprocfs_nid_stats_clear_read(struct seq_file *m, void *data) { return seq_printf(m, "%s\n", - "Write into this file to clear all nid stats and " - "stale nid entries"); + "Write into this file to clear all nid stats and stale nid entries"); } EXPORT_SYMBOL(lprocfs_nid_stats_clear_read); @@ -1819,7 +1817,7 @@ __s64 lprocfs_read_helper(struct lprocfs_counter *lc, } EXPORT_SYMBOL(lprocfs_read_helper); -int lprocfs_write_helper(const char *buffer, unsigned long count, +int lprocfs_write_helper(const char __user *buffer, unsigned long count, int *val) { return lprocfs_write_frac_helper(buffer, count, val, 1); diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 2fc037cfb62f..83bf168c2939 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -866,8 +866,7 @@ static int lu_htable_order(void) /* clear off unreasonable cache setting. */ if (lu_cache_percent == 0 || lu_cache_percent > LU_CACHE_PERCENT_MAX) { - CWARN("obdclass: invalid lu_cache_percent: %u, it must be in" - " the range of (0, %u]. Will use default value: %u.\n", + CWARN("obdclass: invalid lu_cache_percent: %u, it must be in the range of (0, %u]. Will use default value: %u.\n", lu_cache_percent, LU_CACHE_PERCENT_MAX, LU_CACHE_PERCENT_DEFAULT); diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index 5e7b3d7cc984..6ce9adc2f11c 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -835,7 +835,7 @@ int class_del_conn(struct obd_device *obd, struct lustre_cfg *lcfg) LIST_HEAD(lustre_profile_list); -struct lustre_profile *class_get_profile(const char * prof) +struct lustre_profile *class_get_profile(const char *prof) { struct lustre_profile *lprof; @@ -1443,8 +1443,7 @@ int class_config_llog_handler(const struct lu_env *env, if (!(clli->cfg_flags & CFG_F_COMPAT146) && !(clli->cfg_flags & CFG_F_MARKER) && (lcfg->lcfg_command != LCFG_MARKER)) { - CWARN("Config not inside markers, ignoring! " - "(inst: %p, uuid: %s, flags: %#x)\n", + CWARN("Config not inside markers, ignoring! (inst: %p, uuid: %s, flags: %#x)\n", clli->cfg_instance, clli->cfg_uuid.uuid, clli->cfg_flags); clli->cfg_flags |= CFG_F_SKIP; @@ -1467,14 +1466,12 @@ int class_config_llog_handler(const struct lu_env *env, if ((lcfg->lcfg_command == LCFG_ATTACH && typename && strcmp(typename, "mds") == 0)) { - CWARN("For 1.8 interoperability, rename obd " - "type from mds to mdt\n"); + CWARN("For 1.8 interoperability, rename obd type from mds to mdt\n"); typename[2] = 't'; } if ((lcfg->lcfg_command == LCFG_SETUP && index && strcmp(index, "type") == 0)) { - CDEBUG(D_INFO, "For 1.8 interoperability, " - "set this index to '0'\n"); + CDEBUG(D_INFO, "For 1.8 interoperability, set this index to '0'\n"); index[0] = '0'; index[1] = 0; } diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c index 1260c8713bc6..4f39cdee1b5c 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c @@ -100,19 +100,12 @@ int lustre_process_log(struct super_block *sb, char *logname, OBD_FREE_PTR(bufs); if (rc == -EINVAL) - LCONSOLE_ERROR_MSG(0x15b, "%s: The configuration from log '%s'" - "failed from the MGS (%d). Make sure this " - "client and the MGS are running compatible " - "versions of Lustre.\n", + LCONSOLE_ERROR_MSG(0x15b, "%s: The configuration from log '%s' failed from the MGS (%d). Make sure this client and the MGS are running compatible versions of Lustre.\n", mgc->obd_name, logname, rc); if (rc) - LCONSOLE_ERROR_MSG(0x15c, "%s: The configuration from log '%s' " - "failed (%d). This may be the result of " - "communication errors between this node and " - "the MGS, a bad configuration, or other " - "errors. See the syslog for more " - "information.\n", mgc->obd_name, logname, + LCONSOLE_ERROR_MSG(0x15c, "%s: The configuration from log '%s' failed (%d). This may be the result of communication errors between this node and the MGS, a bad configuration, or other errors. See the syslog for more information.\n", + mgc->obd_name, logname, rc); /* class_obd_list(); */ @@ -297,11 +290,8 @@ int lustre_start_mgc(struct super_block *sb) if (has_ir ^ !(*flags & LMD_FLG_NOIR)) { /* LMD_FLG_NOIR is for test purpose only */ LCONSOLE_WARN( - "Trying to mount a client with IR setting " - "not compatible with current mgc. " - "Force to use current mgc setting that is " - "IR %s.\n", - has_ir ? "enabled" : "disabled"); + "Trying to mount a client with IR setting not compatible with current mgc. Force to use current mgc setting that is IR %s.\n", + has_ir ? "enabled" : "disabled"); if (has_ir) *flags &= ~LMD_FLG_NOIR; else @@ -998,16 +988,14 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd) LASSERT(lmd); if (!options) { - LCONSOLE_ERROR_MSG(0x162, "Missing mount data: check that " - "/sbin/mount.lustre is installed.\n"); + LCONSOLE_ERROR_MSG(0x162, "Missing mount data: check that /sbin/mount.lustre is installed.\n"); return -EINVAL; } /* Options should be a string - try to detect old lmd data */ if ((raw->lmd_magic & 0xffffff00) == (LMD_MAGIC & 0xffffff00)) { - LCONSOLE_ERROR_MSG(0x163, "You're using an old version of " - "/sbin/mount.lustre. Please install " - "version %s\n", LUSTRE_VERSION_STRING); + LCONSOLE_ERROR_MSG(0x163, "You're using an old version of /sbin/mount.lustre. Please install version %s\n", + LUSTRE_VERSION_STRING); return -EINVAL; } lmd->lmd_magic = LMD_MAGIC; @@ -1139,8 +1127,7 @@ static int lmd_parse(char *options, struct lustre_mount_data *lmd) } if (!devname) { - LCONSOLE_ERROR_MSG(0x164, "Can't find the device name " - "(need mount option 'device=...')\n"); + LCONSOLE_ERROR_MSG(0x164, "Can't find the device name (need mount option 'device=...')\n"); goto invalid; } @@ -1232,9 +1219,7 @@ int lustre_fill_super(struct super_block *sb, void *data, int silent) if (client_fill_super == NULL) request_module("lustre"); if (client_fill_super == NULL) { - LCONSOLE_ERROR_MSG(0x165, "Nothing registered for " - "client mount! Is the 'lustre' " - "module loaded?\n"); + LCONSOLE_ERROR_MSG(0x165, "Nothing registered for client mount! Is the 'lustre' module loaded?\n"); lustre_put_lsi(sb); rc = -ENODEV; } else { @@ -1249,8 +1234,7 @@ int lustre_fill_super(struct super_block *sb, void *data, int silent) /* c_f_s will call lustre_common_put_super on failure */ } } else { - CERROR("This is client-side-only module, " - "cannot handle server mount.\n"); + CERROR("This is client-side-only module, cannot handle server mount.\n"); rc = -EINVAL; } |