diff options
Diffstat (limited to 'drivers/staging/lustre/lustre/lov')
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_cl_internal.h | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_dev.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_ea.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_internal.h | 17 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_io.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_merge.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_obd.c | 62 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_object.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_offset.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_pack.c | 17 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_page.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_pool.c | 3 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lov_request.c | 18 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lovsub_dev.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lovsub_object.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/lov/lproc_lov.c | 2 |
16 files changed, 57 insertions, 82 deletions
diff --git a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h index 1c0fe65243e1..66a2492c1cc3 100644 --- a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2015 Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c index 2e8b566458f6..3733fdc88c8c 100644 --- a/drivers/staging/lustre/lustre/lov/lov_dev.c +++ b/drivers/staging/lustre/lustre/lov/lov_dev.c @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 34c1346f0dc7..b3c9c85aab9d 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -27,7 +27,7 @@ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h index 515a5c147827..2d00bad58e35 100644 --- a/drivers/staging/lustre/lustre/lov/lov_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_internal.h @@ -27,7 +27,7 @@ * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -151,23 +151,10 @@ int lov_stripe_number(struct lov_stripe_md *lsm, u64 lov_off); /* lov_qos.c */ #define LOV_USES_ASSIGNED_STRIPE 0 #define LOV_USES_DEFAULT_STRIPE 1 -int qos_add_tgt(struct obd_device *obd, __u32 index); -int qos_del_tgt(struct obd_device *obd, struct lov_tgt_desc *tgt); -void qos_shrink_lsm(struct lov_request_set *set); -int qos_prep_create(struct obd_export *exp, struct lov_request_set *set); -void qos_update(struct lov_obd *lov); -void qos_statfs_done(struct lov_obd *lov); -void qos_statfs_update(struct obd_device *obd, __u64 max_age, int wait); -int qos_remedy_create(struct lov_request_set *set, struct lov_request *req); /* lov_request.c */ -void lov_set_add_req(struct lov_request *req, struct lov_request_set *set); -int lov_set_finished(struct lov_request_set *set, int idempotent); -void lov_update_set(struct lov_request_set *set, - struct lov_request *req, int rc); int lov_update_common_set(struct lov_request_set *set, struct lov_request *req, int rc); -int lov_check_and_wait_active(struct lov_obd *lov, int ost_idx); int lov_prep_getattr_set(struct obd_export *exp, struct obd_info *oinfo, struct lov_request_set **reqset); int lov_fini_getattr_set(struct lov_request_set *set); @@ -184,8 +171,6 @@ int lov_update_setattr_set(struct lov_request_set *set, int lov_fini_setattr_set(struct lov_request_set *set); int lov_prep_statfs_set(struct obd_device *obd, struct obd_info *oinfo, struct lov_request_set **reqset); -void lov_update_statfs(struct obd_statfs *osfs, struct obd_statfs *lov_sfs, - int success); int lov_fini_statfs(struct obd_device *obd, struct obd_statfs *osfs, int success); int lov_fini_statfs_set(struct lov_request_set *set); diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c index 5e6228b9ca01..93fe69eb2560 100644 --- a/drivers/staging/lustre/lustre/lov/lov_io.c +++ b/drivers/staging/lustre/lustre/lov/lov_io.c @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_merge.c b/drivers/staging/lustre/lustre/lov/lov_merge.c index dd1cf3d2d039..97115bec7cca 100644 --- a/drivers/staging/lustre/lustre/lov/lov_merge.c +++ b/drivers/staging/lustre/lustre/lov/lov_merge.c @@ -27,7 +27,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 7abe484c07c0..6c2bdfe9cdcf 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -27,7 +27,7 @@ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -2277,35 +2277,35 @@ out: } static struct obd_ops lov_obd_ops = { - .o_owner = THIS_MODULE, - .o_setup = lov_setup, - .o_precleanup = lov_precleanup, - .o_cleanup = lov_cleanup, - /*.o_process_config = lov_process_config,*/ - .o_connect = lov_connect, - .o_disconnect = lov_disconnect, - .o_statfs = lov_statfs, - .o_statfs_async = lov_statfs_async, - .o_packmd = lov_packmd, - .o_unpackmd = lov_unpackmd, - .o_create = lov_create, - .o_destroy = lov_destroy, - .o_getattr_async = lov_getattr_async, - .o_setattr_async = lov_setattr_async, - .o_adjust_kms = lov_adjust_kms, - .o_find_cbdata = lov_find_cbdata, - .o_iocontrol = lov_iocontrol, - .o_get_info = lov_get_info, - .o_set_info_async = lov_set_info_async, - .o_notify = lov_notify, - .o_pool_new = lov_pool_new, - .o_pool_rem = lov_pool_remove, - .o_pool_add = lov_pool_add, - .o_pool_del = lov_pool_del, - .o_getref = lov_getref, - .o_putref = lov_putref, - .o_quotactl = lov_quotactl, - .o_quotacheck = lov_quotacheck, + .owner = THIS_MODULE, + .setup = lov_setup, + .precleanup = lov_precleanup, + .cleanup = lov_cleanup, + /*.process_config = lov_process_config,*/ + .connect = lov_connect, + .disconnect = lov_disconnect, + .statfs = lov_statfs, + .statfs_async = lov_statfs_async, + .packmd = lov_packmd, + .unpackmd = lov_unpackmd, + .create = lov_create, + .destroy = lov_destroy, + .getattr_async = lov_getattr_async, + .setattr_async = lov_setattr_async, + .adjust_kms = lov_adjust_kms, + .find_cbdata = lov_find_cbdata, + .iocontrol = lov_iocontrol, + .get_info = lov_get_info, + .set_info_async = lov_set_info_async, + .notify = lov_notify, + .pool_new = lov_pool_new, + .pool_rem = lov_pool_remove, + .pool_add = lov_pool_add, + .pool_del = lov_pool_del, + .getref = lov_getref, + .putref = lov_putref, + .quotactl = lov_quotactl, + .quotacheck = lov_quotacheck, }; struct kmem_cache *lov_oinfo_slab; @@ -2352,7 +2352,7 @@ static void /*__exit*/ lov_exit(void) lu_kmem_fini(lov_caches); } -MODULE_AUTHOR("Sun Microsystems, Inc. <http://www.lustre.org/>"); +MODULE_AUTHOR("OpenSFS, Inc. <http://www.lustre.org/>"); MODULE_DESCRIPTION("Lustre Logical Object Volume OBD driver"); MODULE_LICENSE("GPL"); MODULE_VERSION(LUSTRE_VERSION_STRING); diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index c7ff817bb6fb..3b79ebc8eccf 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c index 9c8c77c05a8a..aa520aa76e09 100644 --- a/drivers/staging/lustre/lustre/lov/lov_offset.c +++ b/drivers/staging/lustre/lustre/lov/lov_offset.c @@ -27,7 +27,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_pack.c b/drivers/staging/lustre/lustre/lov/lov_pack.c index 2fb1e974cc70..6b2d1007192b 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pack.c +++ b/drivers/staging/lustre/lustre/lov/lov_pack.c @@ -27,7 +27,7 @@ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -258,22 +258,9 @@ static int lov_verify_lmm(void *lmm, int lmm_bytes, __u16 *stripe_count) int rc; if (lsm_op_find(le32_to_cpu(*(__u32 *)lmm)) == NULL) { - char *buffer; - int sz; - CERROR("bad disk LOV MAGIC: 0x%08X; dumping LMM (size=%d):\n", le32_to_cpu(*(__u32 *)lmm), lmm_bytes); - sz = lmm_bytes * 2 + 1; - buffer = libcfs_kvzalloc(sz, GFP_NOFS); - if (buffer != NULL) { - int i; - - for (i = 0; i < lmm_bytes; i++) - sprintf(buffer+2*i, "%.2X", ((char *)lmm)[i]); - buffer[sz - 1] = '\0'; - CERROR("%s\n", buffer); - kvfree(buffer); - } + CERROR("%*phN\n", lmm_bytes, lmm); return -EINVAL; } rc = lsm_op_find(le32_to_cpu(*(__u32 *)lmm))->lsm_lmm_verify(lmm, diff --git a/drivers/staging/lustre/lustre/lov/lov_page.c b/drivers/staging/lustre/lustre/lov/lov_page.c index 463cadbd9d40..037ae91b74e7 100644 --- a/drivers/staging/lustre/lustre/lov/lov_page.c +++ b/drivers/staging/lustre/lustre/lov/lov_page.c @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c index b03827ef6514..b43ce6cd64c2 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pool.c +++ b/drivers/staging/lustre/lustre/lov/lov_pool.c @@ -412,8 +412,7 @@ int lov_pool_new(struct obd_device *obd, char *poolname) if (!new_pool) return -ENOMEM; - strncpy(new_pool->pool_name, poolname, LOV_MAXPOOLNAME); - new_pool->pool_name[LOV_MAXPOOLNAME] = '\0'; + strlcpy(new_pool->pool_name, poolname, sizeof(new_pool->pool_name)); new_pool->pool_lobd = obd; /* ref count init to 1 because when created a pool is always used * up to deletion diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index 1a150c26798d..42deda71f577 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -27,7 +27,7 @@ * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2011, 2012, Intel Corporation. + * Copyright (c) 2011, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -74,7 +74,7 @@ void lov_finish_set(struct lov_request_set *set) kfree(set); } -int lov_set_finished(struct lov_request_set *set, int idempotent) +static int lov_set_finished(struct lov_request_set *set, int idempotent) { int completes = atomic_read(&set->set_completes); @@ -89,8 +89,8 @@ int lov_set_finished(struct lov_request_set *set, int idempotent) return 0; } -void lov_update_set(struct lov_request_set *set, - struct lov_request *req, int rc) +static void lov_update_set(struct lov_request_set *set, + struct lov_request *req, int rc) { req->rq_complete = 1; req->rq_rc = rc; @@ -118,7 +118,8 @@ int lov_update_common_set(struct lov_request_set *set, return rc; } -void lov_set_add_req(struct lov_request *req, struct lov_request_set *set) +static void lov_set_add_req(struct lov_request *req, + struct lov_request_set *set) { list_add_tail(&req->rq_link, &set->set_list); set->set_count++; @@ -144,7 +145,7 @@ static int lov_check_set(struct lov_obd *lov, int idx) * If the OSC has not yet had a chance to connect to the OST the first time, * wait once for it to connect instead of returning an error. */ -int lov_check_and_wait_active(struct lov_obd *lov, int ost_idx) +static int lov_check_and_wait_active(struct lov_obd *lov, int ost_idx) { wait_queue_head_t waitq; struct l_wait_info lwi; @@ -591,8 +592,9 @@ int lov_fini_statfs_set(struct lov_request_set *set) return rc; } -void lov_update_statfs(struct obd_statfs *osfs, struct obd_statfs *lov_sfs, - int success) +static void lov_update_statfs(struct obd_statfs *osfs, + struct obd_statfs *lov_sfs, + int success) { int shift = 0, quit = 0; __u64 tmp; diff --git a/drivers/staging/lustre/lustre/lov/lovsub_dev.c b/drivers/staging/lustre/lustre/lov/lovsub_dev.c index 8bc04c8d3d60..f1795c3e2db5 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_dev.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_dev.c @@ -26,6 +26,8 @@ /* * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. + * + * Copyright (c) 2013, 2015, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lovsub_object.c b/drivers/staging/lustre/lustre/lov/lovsub_object.c index d775e28d4097..5ba5ee1b8681 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_object.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_object.c @@ -27,7 +27,7 @@ * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2015 Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ diff --git a/drivers/staging/lustre/lustre/lov/lproc_lov.c b/drivers/staging/lustre/lustre/lov/lproc_lov.c index a0be15c6b55a..337241d84980 100644 --- a/drivers/staging/lustre/lustre/lov/lproc_lov.c +++ b/drivers/staging/lustre/lustre/lov/lproc_lov.c @@ -27,7 +27,7 @@ * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2015 Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ |