summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/osc
diff options
context:
space:
mode:
authorMike Rapoport <mike.rapoport@gmail.com>2015-10-13 16:03:40 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-13 10:21:10 -0700
commit50ffcb7edca4e2f6e2204058b78cadd3d1a2e04f (patch)
treea7a7a6d0a7db1d6e34cca9ba3e8d33315f5683e2 /drivers/staging/lustre/lustre/osc
parent3fd624b37da50ba0c63bb153cfd6e1b97b83cc4a (diff)
staging: lustre: add missing blank line after declarations
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>
Diffstat (limited to 'drivers/staging/lustre/lustre/osc')
-rw-r--r--drivers/staging/lustre/lustre/osc/lproc_osc.c5
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_cache.c9
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_page.c3
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_quota.c1
-rw-r--r--drivers/staging/lustre/lustre/osc/osc_request.c6
5 files changed, 24 insertions, 0 deletions
diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c
index 2a16046aac20..1ad07f6c1b7a 100644
--- a/drivers/staging/lustre/lustre/osc/lproc_osc.c
+++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c
@@ -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",
diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c
index 62da06157665..4d235972e5cc 100644
--- a/drivers/staging/lustre/lustre/osc/osc_cache.c
+++ b/drivers/staging/lustre/lustre/osc/osc_cache.c
@@ -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;
diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c
index 2af3232230ec..d696b321a659 100644
--- a/drivers/staging/lustre/lustre/osc/osc_page.c
+++ b/drivers/staging/lustre/lustre/osc/osc_page.c
@@ -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
diff --git a/drivers/staging/lustre/lustre/osc/osc_quota.c b/drivers/staging/lustre/lustre/osc/osc_quota.c
index 2ff253f458f8..3b32928eb4fc 100644
--- a/drivers/staging/lustre/lustre/osc/osc_quota.c
+++ b/drivers/staging/lustre/lustre/osc/osc_quota.c
@@ -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;
}
diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c
index 86c0303eb24a..e3808c97043f 100644
--- a/drivers/staging/lustre/lustre/osc/osc_request.c
+++ b/drivers/staging/lustre/lustre/osc/osc_request.c
@@ -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 */