Re: [PATCH 2/2] android: add sync_fence_create_dma
Hey, On 15-08-14 08:46, Greg Kroah-Hartman wrote: > On Thu, Aug 14, 2014 at 11:54:52AM +0200, Maarten Lankhorst wrote: >> This allows users of dma fences to create a android fence. > > Who is going to use these functions? I need an in-kernel user before I > can add new api calls. So I found a in-kernel user and PATCH 1/2 fixes a mem-leak with android out of tree drivers, and android's in-kernel sw-sync. Will you apply these patches? ~Maarten ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: mdc: expand the GOTO macro
From: Julia Lawall The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ - GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ - GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall --- This should be applied after the return-parenthesis patch. drivers/staging/lustre/lustre/mdc/mdc_locks.c |4 drivers/staging/lustre/lustre/mdc/mdc_request.c | 311 ++-- 2 files changed, 196 insertions(+), 119 deletions(-) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 9c3e533..3c0f49e 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -1236,7 +1236,7 @@ static int mdc_intent_getattr_async_interpret(const struct lu_env *env, if (rc < 0) { CERROR("ldlm_cli_enqueue_fini: %d\n", rc); mdc_clear_replay_flag(req, rc); - GOTO(out, rc); + goto out; } lockrep = req_capsule_server_get(&req->rq_pill, &RMF_DLM_REP); @@ -1247,7 +1247,7 @@ static int mdc_intent_getattr_async_interpret(const struct lu_env *env, rc = mdc_finish_enqueue(exp, req, einfo, it, lockh, rc); if (rc) - GOTO(out, rc); + goto out; rc = mdc_finish_intent_lock(exp, req, &minfo->mi_data, it, lockh); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index fce8567..a2a6334 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -122,16 +122,18 @@ static int send_getstatus(struct obd_import *imp, struct lu_fid *rootfid, rc = ptlrpc_queue_wait(req); if (rc) - GOTO(out, rc); + goto out; body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); - if (body == NULL) - GOTO(out, rc = -EPROTO); + if (body == NULL) { + rc = -EPROTO; + goto out; + } if (body->valid & OBD_MD_FLMDSCAPA) { rc = mdc_unpack_capa(NULL, req, &RMF_CAPA1, pc); if (rc) - GOTO(out, rc); + goto out; } *rootfid = body->fid1; @@ -519,28 +521,33 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, if (!S_ISREG(md->body->mode)) { CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, should be a regular file, but is not\n"); - GOTO(out, rc = -EPROTO); + rc = -EPROTO; + goto out; } if (md->body->eadatasize == 0) { CDEBUG(D_INFO, "OBD_MD_FLEASIZE set, but eadatasize 0\n"); - GOTO(out, rc = -EPROTO); + rc = -EPROTO; + goto out; } lmmsize = md->body->eadatasize; lmm = req_capsule_server_sized_get(pill, &RMF_MDT_MD, lmmsize); - if (!lmm) - GOTO(out, rc = -EPROTO); + if (!lmm) { + rc = -EPROTO; + goto out; + } rc = obd_unpackmd(dt_exp, &md->lsm, lmm, lmmsize); if (rc < 0) - GOTO(out, rc); + goto out; if (rc < sizeof(*md->lsm)) { CDEBUG(D_INFO, "lsm size too small: rc < sizeof (*md->lsm) (%d < %d)\n", rc, (int)sizeof(*md->lsm)); - GOTO(out, rc = -EPROTO); + rc = -EPROTO; + goto out; } } else if (md->body->valid & OBD_MD_FLDIREA) { @@ -550,7 +557,8 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, if (!S_ISDIR(md->body->mode)) { CDEBUG(D_INFO, "OBD_MD_FLDIREA set, should be a directory, but is not\n"); - GOTO(out, rc = -EPROTO); + rc = -EPROTO; + goto out; } if (md->body->eadatasize == 0) { @@ -562,19 +570,22 @@ int mdc_get_lustre_md(struct obd_export *exp, struct ptlrpc_request *req, lmvsize = md->body->eadatasize; lmv = req_capsule_server_sized_get(pill, &RMF_MDT_MD, lmvsize); - if (!lmv) - GOTO(out, rc = -EPROTO); + if (!lmv) { + rc =
Re: Fwd: Re: [PATCH] staging:lustre:lnet: lib-md.c fix checkpath warnings and errors.
No worries. But Greg asked you to break the patch up into 4 patches: patch 1: long lines patch 2: spaces patch 3: comments patch 4: trailing statements. Please resend. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] android: add sync_fence_create_dma
On Thu, Aug 28, 2014 at 08:54:05AM +0200, Maarten Lankhorst wrote: > Hey, > > On 15-08-14 08:46, Greg Kroah-Hartman wrote: > > On Thu, Aug 14, 2014 at 11:54:52AM +0200, Maarten Lankhorst wrote: > >> This allows users of dma fences to create a android fence. > > > > Who is going to use these functions? I need an in-kernel user before I > > can add new api calls. > > So I found a in-kernel user and PATCH 1/2 fixes a mem-leak with android out > of tree drivers, and android's in-kernel sw-sync. > Will you apply these patches? Can you resend the patches? Fix the changelog of the first one to mention that it is a bugfix. Send a [patch 3/3] which uses the new functions in [patch 2/3]. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: mdc: expand the GOTO macro
Thanks. These are nice. We need to get rid of the GOTO() macro entirely. regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH] staging: lustre: mdc: expand the GOTO macro
On Thu, 28 Aug 2014, Dan Carpenter wrote: > Thanks. These are nice. We need to get rid of the GOTO() macro > entirely. I will. The whole patch is 11,000 lines (including the context code, @@s etc), and I didn't have the patience to check all of that at once... julia ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)
Hi Dexuan, On Thu, Aug 28, 2014 at 03:21:59AM +, Dexuan Cui wrote: > > > > First let me thank you guys for looking into this issue. Looking at Feel free to add Reported-by: Sitsofe Wheeler to your patches (it's useful too me because it makes it easier for me to show what I've been doing to others :-) > > > The only issue seen on boot now is similar to > > > https://lkml.org/lkml/2014/8/19/227 ... > I don't see this issue. Do you still see the issue for EVERY boot > after you applied KY's always-use-page-allocation patch? I doubt that > because in the log of the above link: I think it depends on if I do a UP or SMP boot. With f1bd473f95e02bc382d4dae94d7f82e2a455e05d (post v3.17-rc2) with the V2 BUG_ON patch set coupled with the allocation change patch set a UP boot was able to run a small bunch of CPU and network stress tests without any issue. However, when doing an SMP boot the following happened: [ OK ] Started Getty on tty1. [ OK ] Reached target Login Prompts. [ OK ] Started Login Service. [ 36.023957] hv_netvsc vmbus_0_15: net device safe to remove [ 36.078386] hv_netvsc: hv_netvsc channel opened successfully Fedora release 20 ([ 36.964636] hv_netvsc vmbus_0_15: Send section size: 6144, Section count:2560 [ 37.014857] hv_netvsc vmbus_0_15: Device MAC 00:15:5d:6f:02:a5 link state up Heisenbug)[ 37.180170] BUG: unable to handle kernel pKageing reqruestn at 8801f2ec4068 [ 37.181156] IP: el[ 3.1<7.0-ffrc2.x8ff814e77dc>] netvsc_start_xmit+0x6ac/0x7c0 [ 6_ 64- 00044-g0bb037.181156] PGD 2db0067 PUa5Dd on 2 an x86_6407dc0067 PM (ttyDS0) 207c280ara67refedora PTE 8 001f2eclo4gin0: 60 [ 37.181156] Oops: [#1] SMP DEBUG_PAGEALLOC [ 37.181156] CPU: 2 PID: 0 Comm: swapper/2 Not tainted 3.17.0-rc2.x86_64-00044-g0bb0a5d #132 [ 37.181156] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [ 37.181156] task: 8801fb27b9f0 ti: 8801fb31 task.ti: 8801fb31 [ 37.181156] RIP: 0010:[] [] netvsc_start_xmit+0x6ac/0x7c0 [ 37.181156] RSP: 0018:880206c43960 EFLAGS: 00010246 [ 37.181156] RAX: RBX: 8801f2e9f2d8 RCX: 0007f000 [ 37.181156] RDX: 0007da20 RSI: 00034f70 RDI: 0007efc8 [ 37.181156] RBP: 880206c439a8 R08: R09: [ 37.181156] R10: 0001 R11: 0001 R12: [ 37.181156] R13: 8801f2ec4000 R14: 8800f1335680 R15: 8801f2e9c4ea [ 37.181156] FS: () GS:880206c4() knlGS: [ 37.181156] CS: 0010 DS: ES: CR0: 80050033 [ 37.181156] CR2: 8801f2ec4068 CR3: 01c0e000 CR4: 000406e0 [ 37.181156] Stack: [ 37.181156] 8801f2e9f344 0062 8800f1335680 81d23300 [ 37.181156] 0062 8800f1335680 000400014883 8800ecc56fa0 [ 37.181156] 8801f2ec4000 880206c43a00 815ce458 8800f13311c8 [ 37.181156] Call Trace: [ 37.181156] [ 37.181156] [] dev_hard_start_xmit+0x348/0x630 [ 37.181156] [] sch_direct_xmit+0x7a/0x290 That's all I got - all my consoles froze and not even sysrq worked any more. Here's another splat that also just happened: [ OK ] Started NTP client/server. [ OK ] Started Login Service. [ 32.558951] hv_netvsc vmbus_0_15: net device safe to remove [ 32.599919] hv_netvsc: hv_netvsc channel opened successfully [ 33.728294] hv_netvsc vmbus_0_15: Send section size: 6144, Section count:2560 [ 33.782371] hv_netvsc vmbus_0_15: Device MAC 00:15:5d:6f:02:a5 link state up Fedora release 20 (Heisenbug) Kernel 3.17.0-rc2.x86_64-00044-g0bb0a5d on an x86_64 (ttyS0) ararefedora login: [ 35.301491] BUG: unable to handle kernel paging request at 8800ef0df973 [ 35.302392] IP: [] netvsc_select_queue+0x3d/0x150 [ 35.302392] PGD 2db0067 PUD 2075be067 PMD 207445067 PTE 8000ef0df060 [ 35.302392] Oops: [#1] SMP DEBUG_PAGEALLOC [ 35.302392] CPU: 1 PID: 723 Comm: arping Not tainted 3.17.0-rc2.x86_64-00044-g0bb0a5d #132 [ 35.302392] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006 05/23/2012 [ 35.302392] task: 8800eea68000 ti: 8801f5af task.ti: 8801f5af [ 35.302392] RIP: 0010:[] [] netvsc_select_queue+0x3d/0x150 [ 35.302392] RSP: 0018:8801f5af3c60 EFLAGS: 00010206 [ 35.302392] RAX: RBX: 8800f0c49160 RCX: [ 35.302392] RDX: 8800ef0cf968 RSI: 8801fa42a1c0 RDI: 8800f0c49160 [ 35.302392] RBP: 8801f5af3c88 R08: 002a R09: [ 35.302392] R10: 8801f372b3d8 R11: 000a R12: 8801fa42a1c0 [ 35.302392] R13: R14: 8801f3832e68 R15: 8801fa42a1c0 [ 35.302392] FS: 7f3359e96740() GS:880206c2() knlGS: [ 36.090561] CS: 0010 DS: ES: CR0: 0
Re: [PATCH 04/38] Staging: bcm: Bcmchar.c: Renamed variable: "uiBit" -> "bit"
On Wed, Aug 27, 2014 at 12:57:41PM +0200, Matthias Beyer wrote: > Signed-off-by: Matthias Beyer This is a write-only variable. Just delete it (in a follow on patch is fine). regards, dan carpenter ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: Fwd: Re: [PATCH] staging:lustre:lnet: lib-md.c fix checkpath warnings and errors.
On Thu, Aug 28, 2014 at 10:23:05AM +0800, Janet Liu wrote: > On 08/28/2014 10:20 AM, Janet Liu wrote: > > > > > > > > Original Message > >Subject: Re: [PATCH] staging:lustre:lnet: lib-md.c fix checkpath > >warnings and errors. > >Date: Tue, 26 Aug 2014 18:22:45 -0700 > >From: Greg KH > >To: Janet Liu > >CC: de...@driverdev.osuosl.org, linux-ker...@vger.kernel.org > > > >On Mon, Aug 25, 2014 at 01:18:54AM +0800, Janet Liu wrote: > >>Sliences the following warning and error: > >> > >> WARNING: line over 80 characters > >> WARNING: space prohibited between function name and open parenthesis > >>'(' > >> ERROR: do not use C99 // comments > >> ERROR: trailing statements should be on next line > > > >You changed 4 things, in one patch :( > > > >Also, you sent 4 different patches, which one is correct? > > > >Please only do one thing per patch and please resend with the one that > >you wish to have reviewed. > > > >thanks, > > > >greg k-h > > > > > Hi Greg, > > I'm very sorry for having troubled you. > > The latest one is correct. It is send by my gmail box. I don't know what is the "latest one", if you do not version your patches with a "v2" or "v3" and the like in the subject area. Otherwise we are relying on mail timestamps, which are not always correct. thanks, greg k-h ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: obdech: remove unused file
From: Julia Lawall This file contains unresolved references and is not mentioned in the Makefile. Signed-off-by: Julia Lawall --- This should be applied after the return-parenthesis patch. diff --git a/drivers/staging/lustre/lustre/obdecho/echo.c b/drivers/staging/lustre/lustre/obdecho/echo.c deleted file mode 100644 index 3d0686d..000 --- a/drivers/staging/lustre/lustre/obdecho/echo.c +++ /dev/null @@ -1,672 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2010, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/obdecho/echo.c - * - * Author: Peter Braam - * Author: Andreas Dilger - */ - -#define DEBUG_SUBSYSTEM S_ECHO - -#include "../include/obd_support.h" -#include "../include/obd_class.h" -#include "../include/lustre_debug.h" -#include "../include/lustre_dlm.h" -#include "../include/lprocfs_status.h" - -#include "echo_internal.h" - -/* The echo objid needs to be below 2^32, because regular FID numbers are - * limited to 2^32 objects in f_oid for the FID_SEQ_ECHO range. b=23335 */ -#define ECHO_INIT_OID 0x1000ULL -#define ECHO_HANDLE_MAGIC0xabcd0123fedc9876ULL - -#define ECHO_PERSISTENT_PAGES (ECHO_PERSISTENT_SIZE >> PAGE_CACHE_SHIFT) -static struct page *echo_persistent_pages[ECHO_PERSISTENT_PAGES]; - -enum { - LPROC_ECHO_READ_BYTES = 1, - LPROC_ECHO_WRITE_BYTES = 2, - LPROC_ECHO_LAST = LPROC_ECHO_WRITE_BYTES +1 -}; - -static int echo_connect(const struct lu_env *env, - struct obd_export **exp, struct obd_device *obd, - struct obd_uuid *cluuid, struct obd_connect_data *data, - void *localdata) -{ - struct lustre_handle conn = { 0 }; - int rc; - - data->ocd_connect_flags &= ECHO_CONNECT_SUPPORTED; - rc = class_connect(&conn, obd, cluuid); - if (rc) { - CERROR("can't connect %d\n", rc); - return rc; - } - *exp = class_conn2export(&conn); - - return 0; -} - -static int echo_disconnect(struct obd_export *exp) -{ - LASSERT (exp != NULL); - - return server_disconnect_export(exp); -} - -static int echo_init_export(struct obd_export *exp) -{ - return ldlm_init_export(exp); -} - -static int echo_destroy_export(struct obd_export *exp) -{ - target_destroy_export(exp); - ldlm_destroy_export(exp); - - return 0; -} - - static __u64 echo_next_id(struct obd_device *obddev) -{ - u64 id; - - spin_lock(&obddev->u.echo.eo_lock); - id = ++obddev->u.echo.eo_lastino; - spin_unlock(&obddev->u.echo.eo_lock); - - return id; -} - -static int echo_create(const struct lu_env *env, struct obd_export *exp, - struct obdo *oa, struct lov_stripe_md **ea, - struct obd_trans_info *oti) -{ - struct obd_device *obd = class_exp2obd(exp); - - if (!obd) { - CERROR("invalid client cookie %#llx\n", - exp->exp_handle.h_cookie); - return -EINVAL; - } - - if (!(oa->o_mode & S_IFMT)) { - CERROR("echo obd: no type!\n"); - return -ENOENT; - } - - if (!(oa->o_valid & OBD_MD_FLTYPE)) { - CERROR("invalid o_valid %#llx\n", oa->o_valid); - return -EINVAL; - } - - ostid_set_seq_echo(&oa->o_oi); - ostid_set_id(&oa->o_oi, echo_next_id(obd)); - oa->o_valid = OBD_MD_FLID; - - return 0; -} - -static int echo_destroy(const struct lu_env *env, struct obd_export *exp, - struct obdo *oa, struct lov_stripe_md *ea, - struct obd_trans_info *oti, struct obd_export *md_exp, - void *capa) -{ - struct obd_device *obd = class_exp2obd(exp
[PATCH] staging: lustre: mgc: remove unused file
From: Julia Lawall This file contains unresolved references and is not mentioned in the Makefile. Signed-off-by: Julia Lawall --- This should be applied after the return-parenthesis patch. diff --git a/drivers/staging/lustre/lustre/mgc/libmgc.c b/drivers/staging/lustre/lustre/mgc/libmgc.c deleted file mode 100644 index 8012f0f..000 --- a/drivers/staging/lustre/lustre/mgc/libmgc.c +++ /dev/null @@ -1,158 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/mgc/libmgc.c - * - * Lustre Management Client - * Author: Nathan Rutman - */ - -/* Minimal MGC for liblustre: only used to read the config log from the MGS - at setup time, no updates. */ - -#define DEBUG_SUBSYSTEM S_MGC - -#include "../include/liblustre.h" - -#include "../include/obd_class.h" -#include "../include/lustre_dlm.h" -#include "../include/lustre_log.h" -#include "../include/lustre_fsfilt.h" -#include "../include/lustre_disk.h" - - -static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg) -{ - int rc; - - ptlrpcd_addref(); - - rc = client_obd_setup(obd, lcfg); - if (rc) - GOTO(err_decref, rc); - - /* liblustre only support null flavor to MGS */ - obd->u.cli.cl_flvr_mgc.sf_rpc = SPTLRPC_FLVR_NULL; - - rc = obd_llog_init(obd, &obd->obd_olg, obd, NULL); - if (rc) { - CERROR("failed to setup llogging subsystems\n"); - GOTO(err_cleanup, rc); - } - - return rc; - -err_cleanup: - client_obd_cleanup(obd); -err_decref: - ptlrpcd_decref(); - return rc; -} - -static int mgc_precleanup(struct obd_device *obd, enum obd_cleanup_stage stage) -{ - int rc = 0; - - switch (stage) { - case OBD_CLEANUP_EARLY: - case OBD_CLEANUP_EXPORTS: - obd_cleanup_client_import(obd); - rc = obd_llog_finish(obd, 0); - if (rc != 0) - CERROR("failed to cleanup llogging subsystems\n"); - break; - } - return rc; -} - -static int mgc_cleanup(struct obd_device *obd) -{ - int rc; - - ptlrpcd_decref(); - - rc = client_obd_cleanup(obd); - return rc; -} - -static int mgc_llog_init(struct obd_device *obd, struct obd_llog_group *olg, -struct obd_device *tgt, int *index) -{ - struct llog_ctxt *ctxt; - int rc; - - LASSERT(olg == &obd->obd_olg); - rc = llog_setup(NULL, obd, olg, LLOG_CONFIG_REPL_CTXT, tgt, - &llog_client_ops); - if (rc < 0) - return rc; - - ctxt = llog_group_get_ctxt(olg, LLOG_CONFIG_REPL_CTXT); - llog_initiator_connect(ctxt); - llog_ctxt_put(ctxt); - - return rc; -} - -static int mgc_llog_finish(struct obd_device *obd, int count) -{ - struct llog_ctxt *ctxt; - - - ctxt = llog_get_context(obd, LLOG_CONFIG_REPL_CTXT); - if (ctxt) - llog_cleanup(NULL, ctxt); - - return 0; -} - -struct obd_ops mgc_obd_ops = { - .o_owner= THIS_MODULE, - .o_setup= mgc_setup, - .o_precleanup = mgc_precleanup, - .o_cleanup = mgc_cleanup, - .o_add_conn = client_import_add_conn, - .o_del_conn = client_import_del_conn, - .o_connect = client_connect_import, - .o_disconnect = client_disconnect_export, - .o_llog_init= mgc_llog_init, - .o_llog_finish = mgc_llog_finish, -}; - -int __init mgc_init(void) -{ - return class_register_type(&mgc_obd_ops, NULL, - NULL, LUSTRE_MGC_NAME, NULL); -} ___ devel mailing list de...@linuxdriverproje
[PATCH] staging: lustre: mgc: expand the GOTO macro
From: Julia Lawall The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ identifier lbl; identifier rc; constant c; @@ - GOTO(lbl,\(rc\|c\)); + goto lbl; @@ identifier lbl; expression rc; @@ - GOTO(lbl,rc); + rc; + goto lbl; // Signed-off-by: Julia Lawall --- This should be applied after the return-parenthesis patch. drivers/staging/lustre/lustre/mgc/mgc_request.c | 118 +++- 1 file changed, 74 insertions(+), 44 deletions(-) diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index aeaa2bf..b21a135 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -329,7 +329,8 @@ static int config_log_add(struct obd_device *obd, char *logname, CONFIG_T_SPTLRPC, NULL, NULL); if (IS_ERR(sptlrpc_cld)) { CERROR("can't create sptlrpc log: %s\n", seclogname); - GOTO(out_err, rc = PTR_ERR(sptlrpc_cld)); + rc = PTR_ERR(sptlrpc_cld); + goto out_err; } } params_cld = config_params_log_add(obd, cfg, sb); @@ -337,13 +338,14 @@ static int config_log_add(struct obd_device *obd, char *logname, rc = PTR_ERR(params_cld); CERROR("%s: can't create params log: rc = %d\n", obd->obd_name, rc); - GOTO(out_err1, rc); + goto out_err1; } cld = do_config_log_add(obd, logname, CONFIG_T_CONFIG, cfg, sb); if (IS_ERR(cld)) { CERROR("can't create log: %s\n", logname); - GOTO(out_err2, rc = PTR_ERR(cld)); + rc = PTR_ERR(cld); + goto out_err2; } cld->cld_sptlrpc = sptlrpc_cld; @@ -354,8 +356,10 @@ static int config_log_add(struct obd_device *obd, char *logname, struct config_llog_data *recover_cld; *strrchr(seclogname, '-') = 0; recover_cld = config_recover_log_add(obd, seclogname, cfg, sb); - if (IS_ERR(recover_cld)) - GOTO(out_err3, rc = PTR_ERR(recover_cld)); + if (IS_ERR(recover_cld)) { + rc = PTR_ERR(recover_cld); + goto out_err3; + } cld->cld_recover = recover_cld; } @@ -680,7 +684,7 @@ static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb) /* Setup the configs dir */ rc = lu_env_init(env, LCT_MG_THREAD); if (rc) - GOTO(out_err, rc); + goto out_err; fid.f_seq = FID_SEQ_LOCAL_NAME; fid.f_oid = 1; @@ -688,30 +692,34 @@ static int mgc_fs_setup(struct obd_device *obd, struct super_block *sb) rc = local_oid_storage_init(env, lsi->lsi_dt_dev, &fid, &cli->cl_mgc_los); if (rc) - GOTO(out_env, rc); + goto out_env; rc = dt_root_get(env, lsi->lsi_dt_dev, &rfid); if (rc) - GOTO(out_env, rc); + goto out_env; root = dt_locate_at(env, lsi->lsi_dt_dev, &rfid, &cli->cl_mgc_los->los_dev->dd_lu_dev); - if (unlikely(IS_ERR(root))) - GOTO(out_los, rc = PTR_ERR(root)); + if (unlikely(IS_ERR(root))) { + rc = PTR_ERR(root); + goto out_los; + } dto = local_file_find_or_create(env, cli->cl_mgc_los, root, MOUNT_CONFIGS_DIR, S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO); lu_object_put_nocache(env, &root->do_lu); - if (IS_ERR(dto)) - GOTO(out_los, rc = PTR_ERR(dto)); + if (IS_ERR(dto)) { + rc = PTR_ERR(dto); + goto out_los; + } cli->cl_mgc_configs_dir = dto; LASSERT(lsi->lsi_osd_exp->exp_obd->obd_lvfs_ctxt.dt); rc = mgc_local_llog_init(env, obd, lsi->lsi_osd_exp->exp_obd); if (rc) - GOTO(out_llog, rc); + goto out_llog; /* We take an obd ref to insure that we can't get to mgc_cleanup * without calling mgc_fs_cleanup first. */ @@ -746,7 +754,7 @@ static int mgc_fs_cleanup(struct obd_device *obd) rc = lu_env_init(&env, LCT_MG_THREAD); if (rc) - GOTO(unlock, rc); + goto unlock; mgc_local_llog_fini(&env, obd); @@ -853,12 +861,12 @@ static int mgc_setup(struct obd_device *obd, struct lustre_cfg *lcfg) rc = client_obd_setup(obd, lcfg); if (rc) - GOTO(err_decref, rc); + goto err_decref; rc = mgc_llog_init(NULL, obd); if (rc) { CERROR("failed to setup llogging subsystems\
Re: [PATCH v3 00/11] lib: introduce string_escape_mem and %*pE specifier
Any objections? Do you (Andy) want me to merge this through the wireless tree? John On Wed, Aug 20, 2014 at 12:42:41PM +0300, Andy Shevchenko wrote: > The introduced function is a kind of opposite to string_unescape. We have > several users of such functionality each of them created custom > implementation. > The series contains clean up of test suite, adding new call, and switching few > users to use it via %*pE specifier. > > Test suite covers all of existing and most of potential use cases. > > Changelog v3: > - address Joe's comments (typos and styling of documentation / commit > messages) > - add patch 7/11 > - rebase on top of recent linux-next > > Changelog v2: > - addressed Joe's comments: > - added patch 4/10 > - moving patches 5/10-10/10 to %*pE instead of direct string_escape_mem call, >as a result the series and code looks cleaner > - address few of Andrew's comments: > - added patch 1/10 > - kernel documentation moved to c-file > - when test case fails the necessary messages are printed on KERN_WARNING >level > > Andy Shevchenko (11): > lib / string_helpers: move documentation to c-file > lib / string_helpers: refactoring the test suite > lib / string_helpers: introduce string_escape_mem() > lib/vsprintf: add %*pE[achnops] format specifier > wireless: libertas: print esaped string via %*pE > wireless: ipw2x00: print SSID via %*pE > wireless: hostap: proc: print properly escaped SSID > lib80211: remove unused print_ssid() > staging: wlan-ng: use %*pEhp to print SN > staging: rtl8192e: use %*pEn to escape buffer > staging: rtl8192u: use %*pEn to escape buffer > > Documentation/printk-formats.txt | 32 +++ > drivers/net/wireless/hostap/hostap_proc.c | 4 +- > drivers/net/wireless/ipw2x00/ipw2100.c | 22 +- > drivers/net/wireless/ipw2x00/ipw2200.c | 270 +++-- > drivers/net/wireless/ipw2x00/libipw_rx.c | 65 +++--- > drivers/net/wireless/ipw2x00/libipw_wx.c | 16 +- > drivers/net/wireless/libertas/cfg.c| 8 +- > drivers/net/wireless/libertas/mesh.c | 7 +- > drivers/staging/rtl8192e/rtllib.h | 14 +- > drivers/staging/rtl8192u/ieee80211/ieee80211.h | 14 +- > drivers/staging/wlan-ng/prism2sta.c| 28 +-- > include/linux/string_helpers.h | 65 +++--- > include/net/lib80211.h | 5 - > lib/string_helpers.c | 312 > + > lib/test-string_helpers.c | 250 +++- > lib/vsprintf.c | 72 ++ > net/wireless/lib80211.c| 32 --- > 17 files changed, 822 insertions(+), 394 deletions(-) > > -- > 2.1.0 > > -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/4] staging/lustre/obdclass: remove unused file md_attrs.c
It's only used by server side luster for on-disk structure swabbing. And also remove forward declarations for its functions from md_object.h and lustre_idl.h Signed-off-by: Oleg Drokin --- .../lustre/lustre/include/lustre/lustre_idl.h | 6 - drivers/staging/lustre/lustre/include/md_object.h | 4 - drivers/staging/lustre/lustre/obdclass/md_attrs.c | 199 - 3 files changed, 209 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/obdclass/md_attrs.c diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index 570f54f..acb77d5 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -321,9 +321,6 @@ enum lma_incompat { }; #define LMA_INCOMPAT_SUPP (LMAI_AGENT | LMAI_REMOTE_PARENT) -extern void lustre_lma_swab(struct lustre_mdt_attrs *lma); -extern void lustre_lma_init(struct lustre_mdt_attrs *lma, - const struct lu_fid *fid, __u32 incompat); /** * SOM on-disk attributes stored in a separate xattr. */ @@ -344,8 +341,6 @@ struct som_attrs { /** mds mount id the size is valid for */ __u64 som_mountid; }; -extern void lustre_som_swab(struct som_attrs *attrs); - #define SOM_INCOMPAT_SUPP 0x0 /** @@ -362,7 +357,6 @@ struct hsm_attrs { /** version associated with the last archiving, if any */ __u64 hsm_arch_ver; }; -extern void lustre_hsm_swab(struct hsm_attrs *attrs); /** * fid constants diff --git a/drivers/staging/lustre/lustre/include/md_object.h b/drivers/staging/lustre/lustre/include/md_object.h index bd5f618..454a230 100644 --- a/drivers/staging/lustre/lustre/include/md_object.h +++ b/drivers/staging/lustre/lustre/include/md_object.h @@ -854,10 +854,6 @@ struct lu_local_obj_desc { struct list_head llod_linkage; }; -int lustre_buf2som(void *buf, int rc, struct md_som_data *msd); -int lustre_buf2hsm(void *buf, int rc, struct md_hsm *mh); -void lustre_hsm2buf(void *buf, struct md_hsm *mh); - struct lu_ucred { __u32 uc_valid; __u32 uc_o_uid; diff --git a/drivers/staging/lustre/lustre/obdclass/md_attrs.c b/drivers/staging/lustre/lustre/obdclass/md_attrs.c deleted file mode 100644 index d9e6348..000 --- a/drivers/staging/lustre/lustre/obdclass/md_attrs.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * - * GPL HEADER END - */ -/* - * Copyright (c) 2012, Intel Corporation. - * Use is subject to license terms. - * - * Author: Johann Lombardi - */ - -#include "../include/lustre/lustre_idl.h" -#include "../include/obd.h" -#include "../include/md_object.h" - -/** - * Initialize new \a lma. Only fid is stored. - * - * \param lma - is the new LMA structure to be initialized - * \param fid - is the FID of the object this LMA belongs to - * \param incompat - features that MDS must understand to access object - */ -void lustre_lma_init(struct lustre_mdt_attrs *lma, const struct lu_fid *fid, -__u32 incompat) -{ - lma->lma_compat = 0; - lma->lma_incompat = incompat; - lma->lma_self_fid = *fid; - - /* If a field is added in struct lustre_mdt_attrs, zero it explicitly -* and change the test below. */ - LASSERT(sizeof(*lma) == - (offsetof(struct lustre_mdt_attrs, lma_self_fid) + -sizeof(lma->lma_self_fid))); -}; -EXPORT_SYMBOL(lustre_lma_init); - -/** - * Swab, if needed, LMA structure which is stored on-disk in little-endian order. - * - * \param lma - is a pointer to the LMA structure to be swabbed. - */ -void lustre_lma_swab(struct lustre_mdt_attrs *lma) -{ - /* Use LUSTRE_MSG_MAGIC to detect local endianness. */ - if (LUSTRE_MSG_MAGIC != cpu_to_le32(LUSTRE_MSG_MAGIC)) { - __swab32s(&lma->lma_compat); - __swab32s(&lma->lma_incompat); - lustre_swab_lu_fid(&lma->lma_self_fid); - } -}; -EXPORT_SYMBOL(lustre_lma_swab); - -/** - * Swab, if needed, SOM structure which is stored on-disk in litt
[PATCH 3/4] staging/lustre/obdclass: remove unused file linkea.c
Also unused header file lustre_linkea.h Signed-off-by: Oleg Drokin --- .../staging/lustre/lustre/include/lustre_linkea.h | 57 -- drivers/staging/lustre/lustre/obdclass/linkea.c| 194 - 2 files changed, 251 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/lustre_linkea.h delete mode 100644 drivers/staging/lustre/lustre/obdclass/linkea.c diff --git a/drivers/staging/lustre/lustre/include/lustre_linkea.h b/drivers/staging/lustre/lustre/include/lustre_linkea.h deleted file mode 100644 index 500ace3..000 --- a/drivers/staging/lustre/lustre/include/lustre_linkea.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * - * GPL HEADER END - */ -/* - * Copyright (c) 2013, Intel Corporation. - * Use is subject to license terms. - * - * Author: di wang - */ - -struct linkea_data { - /** -* Buffer to keep link EA body. -*/ - struct lu_buf *ld_buf; - /** -* The matched header, entry and its length in the EA -*/ - struct link_ea_header *ld_leh; - struct link_ea_entry*ld_lee; - int ld_reclen; -}; - -int linkea_data_new(struct linkea_data *ldata, struct lu_buf *buf); -int linkea_init(struct linkea_data *ldata); -void linkea_entry_unpack(const struct link_ea_entry *lee, int *reclen, -struct lu_name *lname, struct lu_fid *pfid); -int linkea_add_buf(struct linkea_data *ldata, const struct lu_name *lname, - const struct lu_fid *pfid); -void linkea_del_buf(struct linkea_data *ldata, const struct lu_name *lname); -int linkea_links_find(struct linkea_data *ldata, const struct lu_name *lname, - const struct lu_fid *pfid); - -#define LINKEA_NEXT_ENTRY(ldata) \ - (struct link_ea_entry *)((char *)ldata.ld_lee + ldata.ld_reclen) - -#define LINKEA_FIRST_ENTRY(ldata) \ - (struct link_ea_entry *)(ldata.ld_leh + 1) diff --git a/drivers/staging/lustre/lustre/obdclass/linkea.c b/drivers/staging/lustre/lustre/obdclass/linkea.c deleted file mode 100644 index 8a1c7b6..000 --- a/drivers/staging/lustre/lustre/obdclass/linkea.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 021110-1307, USA - * - * GPL HEADER END - */ -/* - * Copyright (c) 2013, Intel Corporation. - * Use is subject to license terms. - * - * Author: Di Wang - */ - -#include "../include/lustre/lustre_idl.h" -#include "../include/obd.h" -#include "../include/lustre_linkea.h" - -int linkea_data_new(struct linkea_data *ldata, struct lu_buf *buf) -{ - ldata->ld_buf = lu_buf_check_and_alloc(buf, PAGE_CACHE_SIZE); - if (ldata->ld_buf->lb_buf == NULL) - return -ENOMEM; - ldata->ld_leh = ldata->ld_buf->lb_buf; - ldata->ld_leh->leh_magic = LINK_EA_MAGIC; - ldata->ld_leh->leh_len = sizeof(struct link_ea_header); - ldata->ld_leh->leh_reccount = 0; - return 0; -} -EXPORT_SYMBOL(linkea_data_new); - -int linkea_init(struct linkea_data *ldata) -{ - struct link_ea_header *leh; - - LASSERT(ldata->ld_buf != NULL); - leh = ldata->ld_buf->lb_buf; - if (leh->leh_magic == __swab32(LINK_EA_MAGIC)) { - leh->leh_magic = LINK_EA_MAGIC; - leh->leh_reccount = __swab32(leh->leh_reccount); - leh-
[PATCH 0/4] Remove unused lustre files
This batch of patches removes some lustre files that are not being built and are overall unneeded in the client only code. These include EA from disk swabbing code, various network request policies for server-site traffic prioritization, server-side llog code, lustre binary heap implementation. Please consider for inclusion. Oleg Drokin (4): staging/lustre/obdclass: remove unused file md_attrs.c staging/lustre/obdclass: remove unused file llog_lvfs.c staging/lustre/obdclass: remove unused file linkea.c staging/lustre: remove unused request policies. .../lustre/lustre/include/lustre/lustre_idl.h | 6 - .../staging/lustre/lustre/include/lustre_linkea.h | 57 -- drivers/staging/lustre/lustre/include/lustre_log.h | 3 - drivers/staging/lustre/lustre/include/lustre_net.h | 276 --- drivers/staging/lustre/lustre/include/md_object.h | 4 - drivers/staging/lustre/lustre/libcfs/heap.c| 475 drivers/staging/lustre/lustre/obdclass/linkea.c| 194 - drivers/staging/lustre/lustre/obdclass/llog_lvfs.c | 847 - drivers/staging/lustre/lustre/obdclass/md_attrs.c | 199 - drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c | 40 - 10 files changed, 2101 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/include/lustre_linkea.h delete mode 100644 drivers/staging/lustre/lustre/libcfs/heap.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/linkea.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_lvfs.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/md_attrs.c delete mode 100644 drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c -- 1.9.3 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 4/4] staging/lustre: remove unused request policies.
Client policies do not make much sense to have in client-only code, so remove all references to everything but fifo. This also removes lustre/libcfs/heap.c and its header, since it was only used by certain request policies (crr and orr). Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 276 drivers/staging/lustre/lustre/libcfs/heap.c| 475 - drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c | 40 -- 3 files changed, 791 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/libcfs/heap.c delete mode 100644 drivers/staging/lustre/lustre/ptlrpc/nrs_crr.c diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index d6af2ca..5749e1d 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -1183,276 +1183,6 @@ struct nrs_fifo_req { /** @} fifo */ /** - * \name CRR-N - * - * CRR-N, Client Round Robin over NIDs - * @{ - */ - -/** - * private data structure for CRR-N NRS - */ -struct nrs_crrn_net { - struct ptlrpc_nrs_resource cn_res; - cfs_binheap_t *cn_binheap; - struct cfs_hash*cn_cli_hash; - /** -* Used when a new scheduling round commences, in order to synchronize -* all clients with the new round number. -*/ - __u64 cn_round; - /** -* Determines the relevant ordering amongst request batches within a -* scheduling round. -*/ - __u64 cn_sequence; - /** -* Round Robin quantum; the maximum number of RPCs that each request -* batch for each client can have in a scheduling round. -*/ - __u16 cn_quantum; -}; - -/** - * Object representing a client in CRR-N, as identified by its NID - */ -struct nrs_crrn_client { - struct ptlrpc_nrs_resource cc_res; - struct hlist_node cc_hnode; - lnet_nid_t cc_nid; - /** -* The round number against which this client is currently scheduling -* requests. -*/ - __u64 cc_round; - /** -* The sequence number used for requests scheduled by this client during -* the current round number. -*/ - __u64 cc_sequence; - atomic_tcc_ref; - /** -* Round Robin quantum; the maximum number of RPCs the client is allowed -* to schedule in a single batch of each round. -*/ - __u16 cc_quantum; - /** -* # of pending requests for this client, on all existing rounds -*/ - __u16 cc_active; -}; - -/** - * CRR-N NRS request definition - */ -struct nrs_crrn_req { - /** -* Round number for this request; shared with all other requests in the -* same batch. -*/ - __u64 cr_round; - /** -* Sequence number for this request; shared with all other requests in -* the same batch. -*/ - __u64 cr_sequence; -}; - -/** - * CRR-N policy operations. - */ -enum nrs_ctl_crr { - /** -* Read the RR quantum size of a CRR-N policy. -*/ - NRS_CTL_CRRN_RD_QUANTUM = PTLRPC_NRS_CTL_1ST_POL_SPEC, - /** -* Write the RR quantum size of a CRR-N policy. -*/ - NRS_CTL_CRRN_WR_QUANTUM, -}; - -/** @} CRR-N */ - -/** - * \name ORR/TRR - * - * ORR/TRR (Object-based Round Robin/Target-based Round Robin) NRS policies - * @{ - */ - -/** - * Lower and upper byte offsets of a brw RPC - */ -struct nrs_orr_req_range { - __u64 or_start; - __u64 or_end; -}; - -/** - * RPC types supported by the ORR/TRR policies - */ -enum nrs_orr_supp { - NOS_OST_READ = (1 << 0), - NOS_OST_WRITE = (1 << 1), - NOS_OST_RW= (NOS_OST_READ | NOS_OST_WRITE), - /** -* Default value for policies. -*/ - NOS_DFLT = NOS_OST_READ -}; - -/** - * As unique keys for grouping RPCs together, we use the object's OST FID for - * the ORR policy, and the OST index for the TRR policy. - * - * XXX: We waste some space for TRR policy instances by using a union, but it - * allows to consolidate some of the code between ORR and TRR, and these - * policies will probably eventually merge into one anyway. - */ -struct nrs_orr_key { - union { - /** object FID for ORR */ - struct lu_fid ok_fid; - /** OST index for TRR */ - __u32 ok_idx; - }; -}; - -/** - * The largest base string for unique hash/slab object names is - * "nrs_orr_reg_", so 13 characters. We add 3 to this to be used for the C
[PATCH 2/4] staging/lustre/obdclass: remove unused file llog_lvfs.c
This contains server-side llog operations. Also remove declaration of public structure from lustre_log.h Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_log.h | 3 - drivers/staging/lustre/lustre/obdclass/llog_lvfs.c | 847 - 2 files changed, 850 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/obdclass/llog_lvfs.c diff --git a/drivers/staging/lustre/lustre/include/lustre_log.h b/drivers/staging/lustre/lustre/include/lustre_log.h index d02ea24..c2ab294 100644 --- a/drivers/staging/lustre/lustre/include/lustre_log.h +++ b/drivers/staging/lustre/lustre/include/lustre_log.h @@ -315,9 +315,6 @@ struct llog_handle { atomic_t lgh_refcount; }; -/* llog_lvfs.c */ -extern struct llog_operations llog_lvfs_ops; - /* llog_osd.c */ extern struct llog_operations llog_osd_ops; int llog_osd_get_cat_list(const struct lu_env *env, struct dt_device *d, diff --git a/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c b/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c deleted file mode 100644 index fd48d59..000 --- a/drivers/staging/lustre/lustre/obdclass/llog_lvfs.c +++ /dev/null @@ -1,847 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/obdclass/llog_lvfs.c - * - * OST<->MDS recovery logging infrastructure. - * Invariants in implementation: - * - we do not share logs among different OST<->MDS connections, so that - * if an OST or MDS fails it need only look at log(s) relevant to itself - * - * Author: Andreas Dilger - */ - -#define DEBUG_SUBSYSTEM S_LOG - - -#include "../include/obd.h" -#include "../include/obd_class.h" -#include "../include/lustre_log.h" -#include "../include/obd_ost.h" -#include -#include "../include/lvfs.h" -#include "../include/lustre_fsfilt.h" -#include "../include/lustre_disk.h" -#include "llog_internal.h" - -#if defined(LLOG_LVFS) - -static int llog_lvfs_pad(struct obd_device *obd, struct file *file, int len, -int index) -{ - struct llog_rec_hdr rec = { 0 }; - struct llog_rec_tail tail; - int rc; - - LASSERT(len >= LLOG_MIN_REC_SIZE && (len & 0x7) == 0); - - tail.lrt_len = rec.lrh_len = len; - tail.lrt_index = rec.lrh_index = index; - rec.lrh_type = LLOG_PAD_MAGIC; - - rc = fsfilt_write_record(obd, file, &rec, sizeof(rec), &file->f_pos, 0); - if (rc) { - CERROR("error writing padding record: rc %d\n", rc); - goto out; - } - - file->f_pos += len - sizeof(rec) - sizeof(tail); - rc = fsfilt_write_record(obd, file, &tail, sizeof(tail),&file->f_pos,0); - if (rc) { - CERROR("error writing padding record: rc %d\n", rc); - goto out; - } - - out: - return rc; -} - -static int llog_lvfs_write_blob(struct obd_device *obd, struct file *file, - struct llog_rec_hdr *rec, void *buf, loff_t off) -{ - int rc; - struct llog_rec_tail end; - loff_t saved_off = file->f_pos; - int buflen = rec->lrh_len; - - file->f_pos = off; - - if (buflen == 0) - CWARN("0-length record\n"); - - if (!buf) { - rc = fsfilt_write_record(obd, file, rec, buflen,&file->f_pos,0); - if (rc) { - CERROR("error writing log record: rc %d\n", rc); - goto out; - } - GOTO(out, rc = 0); - } - - /* the buf case */ - rec->lrh_len = sizeof(*rec) + buflen + sizeof(end); - rc = fsfilt_write_record(obd, file, rec, sizeof(*rec), &file->f_pos, 0); - if (rc) { - CERROR("error writing log hdr: r
Re: [PATCH v3 00/11] lib: introduce string_escape_mem and %*pE specifier
On Thu, 28 Aug 2014 14:33:30 -0400 "John W. Linville" wrote: > On Wed, Aug 20, 2014 at 12:42:41PM +0300, Andy Shevchenko wrote: > > The introduced function is a kind of opposite to string_unescape. We have > > several users of such functionality each of them created custom > > implementation. > > The series contains clean up of test suite, adding new call, and switching > > few > > users to use it via %*pE specifier. > > Any objections? Do you (Andy) want me to merge this through the > wireless tree? > Who is this top-poster and what have you done with John? I was going to apply them yesterday but in [4/11] Andy said he plans on sending out a v5. (v4 actually?) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 00/11] lib: introduce string_escape_mem and %*pE specifier
On Thu, Aug 28, 2014 at 12:08:51PM -0700, Andrew Morton wrote: > On Thu, 28 Aug 2014 14:33:30 -0400 "John W. Linville" > wrote: > > > On Wed, Aug 20, 2014 at 12:42:41PM +0300, Andy Shevchenko wrote: > > > The introduced function is a kind of opposite to string_unescape. We have > > > several users of such functionality each of them created custom > > > implementation. > > > The series contains clean up of test suite, adding new call, and > > > switching few > > > users to use it via %*pE specifier. > > > > Any objections? Do you (Andy) want me to merge this through the > > wireless tree? > > > > Who is this top-poster and what have you done with John? :-) > I was going to apply them yesterday but in [4/11] Andy said he plans on > sending out a v5. (v4 actually?) OK, I'll not worry any more about it. -- John W. LinvilleSomeday the world will need a hero, and you linvi...@tuxdriver.com might be all we have. Be ready. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: lustre: osc: add blank line after declarations
fixed a coding style issue Signed-off-by: Mario Schlegel --- drivers/staging/lustre/lustre/osc/osc_io.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index 886b1ef..fad4c13 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -63,6 +63,7 @@ static struct osc_io *cl2osc_io(const struct lu_env *env, const struct cl_io_slice *slice) { struct osc_io *oio = container_of0(slice, struct osc_io, oi_cl); + LINVRNT(oio == osc_env_io(env)); return oio; } @@ -360,6 +361,7 @@ static int trunc_check_cb(const struct lu_env *env, struct cl_io *io, { struct page *vmpage = cl_page_vmpage(env, page); + if (PageLocked(vmpage)) CDEBUG(D_CACHE, "page %p index %lu locked for %d.\n", ops, page->cp_index, @@ -498,6 +500,7 @@ static void osc_io_setattr_end(const struct lu_env *env, if (cl_io_is_trunc(io)) { __u64 size = io->u.ci_setattr.sa_attr.lvb_size; + osc_trunc_check(env, io, oio, size); if (oio->oi_trunc != NULL) { osc_cache_truncate_end(env, oio, cl2osc(obj)); -- 2.1.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 00/11] lib: introduce string_escape_mem and %*pE specifier
On Thu, Aug 28, 2014 at 10:08 PM, Andrew Morton wrote: > On Thu, 28 Aug 2014 14:33:30 -0400 "John W. Linville" > wrote: > >> On Wed, Aug 20, 2014 at 12:42:41PM +0300, Andy Shevchenko wrote: >> > The introduced function is a kind of opposite to string_unescape. We have >> > several users of such functionality each of them created custom >> > implementation. >> > The series contains clean up of test suite, adding new call, and switching >> > few >> > users to use it via %*pE specifier. >> >> Any objections? Do you (Andy) want me to merge this through the >> wireless tree? >> > > Who is this top-poster and what have you done with John? > > I was going to apply them yesterday but in [4/11] Andy said he plans on > sending out a v5. (v4 actually?) For now (so far no more comments) it is only couple of trivia fixes (removing useless comments). Would you like to resend whole series or just fixup would be enough? -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 00/11] lib: introduce string_escape_mem and %*pE specifier
On Thu, 28 Aug 2014 23:58:45 +0300 Andy Shevchenko wrote: > On Thu, Aug 28, 2014 at 10:08 PM, Andrew Morton > wrote: > > On Thu, 28 Aug 2014 14:33:30 -0400 "John W. Linville" > > wrote: > > > >> On Wed, Aug 20, 2014 at 12:42:41PM +0300, Andy Shevchenko wrote: > >> > The introduced function is a kind of opposite to string_unescape. We have > >> > several users of such functionality each of them created custom > >> > implementation. > >> > The series contains clean up of test suite, adding new call, and > >> > switching few > >> > users to use it via %*pE specifier. > >> > >> Any objections? Do you (Andy) want me to merge this through the > >> wireless tree? > >> > > > > Who is this top-poster and what have you done with John? > > > > I was going to apply them yesterday but in [4/11] Andy said he plans on > > sending out a v5. (v4 actually?) > > For now (so far no more comments) it is only couple of trivia fixes > (removing useless comments). Would you like to resend whole series or > just fixup would be enough? I fixed up the one Joe commented on. --- a/lib/vsprintf.c~lib-vsprintf-add-%pe-format-specifier-fix +++ a/lib/vsprintf.c @@ -,12 +,11 @@ char *escaped_string(char *buf, char *en int len; if (spec.field_width == 0) - /* nothing to print */ - return buf; + return buf; /* nothing to print */ if (ZERO_OR_NULL_PTR(addr)) - /* NULL pointer */ - return string(buf, end, NULL, spec); + return string(buf, end, NULL, spec);/* NULL pointer */ + do { switch (fmt[count++]) { _ ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH v3 00/11] lib: introduce string_escape_mem and %*pE specifier
On Fri, Aug 29, 2014 at 12:06 AM, Andrew Morton wrote: > On Thu, 28 Aug 2014 23:58:45 +0300 Andy Shevchenko > wrote: [] >> For now (so far no more comments) it is only couple of trivia fixes >> (removing useless comments). Would you like to resend whole series or >> just fixup would be enough? > > I fixed up the one Joe commented on. > > --- a/lib/vsprintf.c~lib-vsprintf-add-%pe-format-specifier-fix > +++ a/lib/vsprintf.c > @@ -,12 +,11 @@ char *escaped_string(char *buf, char *en > int len; > > if (spec.field_width == 0) > - /* nothing to print */ > - return buf; > + return buf; /* nothing to print */ > > if (ZERO_OR_NULL_PTR(addr)) > - /* NULL pointer */ > - return string(buf, end, NULL, spec); > + return string(buf, end, NULL, spec);/* NULL pointer */ > + > > do { > switch (fmt[count++]) { Thanks! I'm fine with this fix. -- With Best Regards, Andy Shevchenko ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 0/2] Drivers: hv: vmbus: Miscellaneous cleanup
Cleanup hv_post_message() to minimize failures. Also disable preemption when sampling CPU ID when preemption is otherwise possible. K. Y. Srinivasan (2): Drivers: hv: vmbus: Cleanup hv_post_message() Drivers: hv: vmbus: Properly protect calls to smp_processor_id() drivers/hv/channel.c |7 +-- drivers/hv/channel_mgmt.c | 21 +++-- drivers/hv/hv.c | 28 drivers/hv/hyperv_vmbus.h |4 4 files changed, 40 insertions(+), 20 deletions(-) -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 1/2] Drivers: hv: vmbus: Cleanup hv_post_message()
Minimize failures in this function by pre-allocating the buffer for posting messages. The hypercall for posting the message can fail for a number of reasons: 1. Transient resource related issues 2. Buffer alignment 3. Buffer cannot span a page boundry We address issues 2 and 3 by preallocating a per-cpu page for the buffer. Transient resource related failures are handled by retrying by the callers of this function. This patch is based on the investigation done by Dexuan Cui . I would like to thank Sitsofe Wheeler for reporting the issue and helping in debuggging. Signed-off-by: K. Y. Srinivasan Reported-by: Sitsofe Wheeler Cc: --- drivers/hv/hv.c | 27 +++ drivers/hv/hyperv_vmbus.h |4 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c index edfc848..3e4235c 100644 --- a/drivers/hv/hv.c +++ b/drivers/hv/hv.c @@ -138,6 +138,8 @@ int hv_init(void) memset(hv_context.synic_event_page, 0, sizeof(void *) * NR_CPUS); memset(hv_context.synic_message_page, 0, sizeof(void *) * NR_CPUS); + memset(hv_context.post_msg_page, 0, + sizeof(void *) * NR_CPUS); memset(hv_context.vp_index, 0, sizeof(int) * NR_CPUS); memset(hv_context.event_dpc, 0, @@ -217,26 +219,18 @@ int hv_post_message(union hv_connection_id connection_id, enum hv_message_type message_type, void *payload, size_t payload_size) { - struct aligned_input { - u64 alignment8; - struct hv_input_post_message msg; - }; struct hv_input_post_message *aligned_msg; u16 status; - unsigned long addr; if (payload_size > HV_MESSAGE_PAYLOAD_BYTE_COUNT) return -EMSGSIZE; - addr = (unsigned long)kmalloc(sizeof(struct aligned_input), GFP_ATOMIC); - if (!addr) - return -ENOMEM; - aligned_msg = (struct hv_input_post_message *) - (ALIGN(addr, HV_HYPERCALL_PARAM_ALIGN)); + hv_context.post_msg_page[get_cpu()]; aligned_msg->connectionid = connection_id; + aligned_msg->reserved = 0; aligned_msg->message_type = message_type; aligned_msg->payload_size = payload_size; memcpy((void *)aligned_msg->payload, payload, payload_size); @@ -244,8 +238,7 @@ int hv_post_message(union hv_connection_id connection_id, status = do_hypercall(HVCALL_POST_MESSAGE, aligned_msg, NULL) & 0x; - kfree((void *)addr); - + put_cpu(); return status; } @@ -294,6 +287,14 @@ int hv_synic_alloc(void) pr_err("Unable to allocate SYNIC event page\n"); goto err; } + + hv_context.post_msg_page[cpu] = + (void *)get_zeroed_page(GFP_ATOMIC); + + if (hv_context.post_msg_page[cpu] == NULL) { + pr_err("Unable to allocate post msg page\n"); + goto err; + } } return 0; @@ -308,6 +309,8 @@ static void hv_synic_free_cpu(int cpu) free_page((unsigned long)hv_context.synic_event_page[cpu]); if (hv_context.synic_message_page[cpu]) free_page((unsigned long)hv_context.synic_message_page[cpu]); + if (hv_context.post_msg_page[cpu]) + free_page((unsigned long)hv_context.post_msg_page[cpu]); } void hv_synic_free(void) diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h index 22b7507..c386d8d 100644 --- a/drivers/hv/hyperv_vmbus.h +++ b/drivers/hv/hyperv_vmbus.h @@ -515,6 +515,10 @@ struct hv_context { * per-cpu list of the channels based on their CPU affinity. */ struct list_head percpu_list[NR_CPUS]; + /* +* buffer to post messages to the host. +*/ + void *post_msg_page[NR_CPUS]; }; extern struct hv_context hv_context; -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH 2/2] Drivers: hv: vmbus: Properly protect calls to smp_processor_id()
Disable preemption when sampling current processor ID when preemption is otherwise possible. Signed-off-by: K. Y. Srinivasan --- drivers/hv/channel.c |7 +-- drivers/hv/channel_mgmt.c | 21 +++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 19bad59..433f72a 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c @@ -486,11 +486,14 @@ static int vmbus_close_internal(struct vmbus_channel *channel) channel->state = CHANNEL_OPEN_STATE; channel->sc_creation_callback = NULL; /* Stop callback and cancel the timer asap */ - if (channel->target_cpu != smp_processor_id()) + if (channel->target_cpu != get_cpu()) { + put_cpu(); smp_call_function_single(channel->target_cpu, reset_channel_cb, channel, true); - else + } else { reset_channel_cb(channel); + put_cpu(); + } /* Send a closing message */ diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index ed9350d..a2d1a96 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c @@ -224,11 +224,14 @@ static void vmbus_process_rescind_offer(struct work_struct *work) msg.header.msgtype = CHANNELMSG_RELID_RELEASED; vmbus_post_msg(&msg, sizeof(struct vmbus_channel_relid_released)); - if (channel->target_cpu != smp_processor_id()) + if (channel->target_cpu != get_cpu()) { + put_cpu(); smp_call_function_single(channel->target_cpu, percpu_channel_deq, channel, true); - else + } else { percpu_channel_deq(channel); + put_cpu(); + } if (channel->primary_channel == NULL) { spin_lock_irqsave(&vmbus_connection.channel_lock, flags); @@ -294,12 +297,15 @@ static void vmbus_process_offer(struct work_struct *work) spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags); if (enq) { - if (newchannel->target_cpu != smp_processor_id()) + if (newchannel->target_cpu != get_cpu()) { + put_cpu(); smp_call_function_single(newchannel->target_cpu, percpu_channel_enq, newchannel, true); - else + } else { percpu_channel_enq(newchannel); + put_cpu(); + } } if (!fnew) { /* @@ -314,12 +320,15 @@ static void vmbus_process_offer(struct work_struct *work) list_add_tail(&newchannel->sc_list, &channel->sc_list); spin_unlock_irqrestore(&channel->sc_lock, flags); - if (newchannel->target_cpu != smp_processor_id()) + if (newchannel->target_cpu != get_cpu()) { + put_cpu(); smp_call_function_single(newchannel->target_cpu, percpu_channel_enq, newchannel, true); - else + } else { percpu_channel_enq(newchannel); + put_cpu(); + } newchannel->state = CHANNEL_OPEN_STATE; if (channel->sc_creation_callback != NULL) -- 1.7.4.1 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] Drivers: scsi: storvsc: Force discovery of LUNs that may have been removed.
On Tue, Aug 26, 2014 at 10:54:51PM +, KY Srinivasan wrote: > > This looks pretty reasonable to me, but I wonder if we should move this up > > to common code so that it happens for any host rescan triggered by sysfs or > > other drivers as well. > Ping. Any decision on if/when this patch may be checked in. I'll need a review or two for it still.. ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] Drivers: scsi: storvsc: Force discovery of LUNs that may have been removed.
On 08/27/2014 09:31 AM, Hannes Reinecke wrote: > On 08/19/2014 07:54 PM, Christoph Hellwig wrote: >> On Sat, Aug 16, 2014 at 08:09:48PM -0700, K. Y. Srinivasan wrote: >>> The host asks the guest to scan when a LUN is removed or added. >>> The only way a guest can identify the removed LUN is when an I/O is >>> attempted on a removed LUN - the SRB status code indicates that the LUN >>> is invalid. We currently handle this SRB status and remove the device. >>> >>> Rather than waiting for an I/O to remove the device, force the >>> discovery of >>> LUNs that may have been removed prior to discovering LUNs that may have >>> been added. >> >> This looks pretty reasonable to me, but I wonder if we should move this >> up to common code so that it happens for any host rescan triggered by >> sysfs or other drivers as well. >> > Not without proper testing. > Currently we cannot rescan existing devices; the inquiry string is > nailed to the sdev structure. The only way to really refresh the > information is to delete it and rescan it again. How are distros handling 0x6/0x3f/0x0e (report luns changed) when it gets passed to userspace? Is everyone kicking off a new full (add and delete) scan to handle this or logging it? Is the driver returning this when the LUNs change? Also is the driver getting a 0x5/0x25/0 (invalid LUN) when the LUN does not exist, or is it just getting that SRB_STATUS_INVALID_LUN error code? ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
RE: [PANIC, hyperv] BUG: unable to handle kernel paging request at ffff880077800004 (hv_ringbuffer_write)
> -Original Message- > From: Sitsofe Wheeler > Sent: Thursday, August 28, 2014 20:49 PM > > > > The only issue seen on boot now is similar to > > > > https://lkml.org/lkml/2014/8/19/227 ... > > > I don't see this issue. Do you still see the issue for EVERY boot > > after you applied KY's always-use-page-allocation patch? I doubt that > > because in the log of the above link: > > I think it depends on if I do a UP or SMP boot. With > f1bd473f95e02bc382d4dae94d7f82e2a455e05d (post v3.17-rc2) with the V2 > BUG_ON > patch set coupled with the allocation change patch set a UP boot was able > to > run a small bunch of CPU and network stress tests without any issue. > However, > when doing an SMP boot the following happened: > > We can spin these off into a different thread if that would be helpful. Hi Sitsofe, This seems a hv_netvsc specific issue(?) IMO it's better to open a new thread. However, I tried vcpus=1, 2 and 4 for 5 times respectively but couldn't reproduce the same issue(surely I used all of KY's patches, including the page-aligned-input-parameter-for-hypercall one) I used a workload of dd-ing and scp-ing big files. > > > > How come previous alignment efforts weren't working out? > > I'm not sure. > > If we trust the hypervisor, I would guess in hv_post_message() > > 1) We'd better add "aligned_msg->reserved = 0;" > > 2) Should we make sure "aligned_msg->payload_size % 8 == 0"? IMO > >aligned_msg->payload is an array of 8-byte. > > In that case why would payload_size not be a multiple of 8 - can it > change due to debug padding? If so wouldn't its start have had to be > misaligned? I found in some normal code path, e.g., vmbus_open() -> vmbus_post_msg() -> ... (here the payload size is sizeof(struct vmbus_channel_open_channel), i.e., 148, not a multiple of 8), the payload_size is not a multiple of 8. I don't think this causes the issue here, but I think we'd better double check this and see if there is a potential issue or not. Thanks, -- Dexuan ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
[PATCH] staging: rts5208: Remove casting the return value which is a void pointer
Casting the return value which is a void pointer is redundant. The conversion from void pointer to any other pointer type is guaranteed by the C programming language. Signed-off-by: Jingoo Han --- drivers/staging/rts5208/rtsx.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/staging/rts5208/rtsx.c b/drivers/staging/rts5208/rtsx.c index e7a6ba2002ae..a2ea13a475fd 100644 --- a/drivers/staging/rts5208/rtsx.c +++ b/drivers/staging/rts5208/rtsx.c @@ -313,7 +313,7 @@ int rtsx_read_pci_cfg_byte(u8 bus, u8 dev, u8 func, u8 offset, u8 *val) */ static int rtsx_suspend(struct pci_dev *pci, pm_message_t state) { - struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci); + struct rtsx_dev *dev = pci_get_drvdata(pci); struct rtsx_chip *chip; if (!dev) @@ -348,7 +348,7 @@ static int rtsx_suspend(struct pci_dev *pci, pm_message_t state) static int rtsx_resume(struct pci_dev *pci) { - struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci); + struct rtsx_dev *dev = pci_get_drvdata(pci); struct rtsx_chip *chip; if (!dev) @@ -394,7 +394,7 @@ static int rtsx_resume(struct pci_dev *pci) static void rtsx_shutdown(struct pci_dev *pci) { - struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci); + struct rtsx_dev *dev = pci_get_drvdata(pci); struct rtsx_chip *chip; if (!dev) @@ -1017,7 +1017,7 @@ errout: static void rtsx_remove(struct pci_dev *pci) { - struct rtsx_dev *dev = (struct rtsx_dev *)pci_get_drvdata(pci); + struct rtsx_dev *dev = pci_get_drvdata(pci); dev_info(&pci->dev, "rtsx_remove() called\n"); -- 2.0.0 ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
Re: [PATCH 2/2] Drivers: scsi: storvsc: Force discovery of LUNs that may have been removed.
On 08/29/2014 04:42 AM, Mike Christie wrote: On 08/27/2014 09:31 AM, Hannes Reinecke wrote: On 08/19/2014 07:54 PM, Christoph Hellwig wrote: On Sat, Aug 16, 2014 at 08:09:48PM -0700, K. Y. Srinivasan wrote: The host asks the guest to scan when a LUN is removed or added. The only way a guest can identify the removed LUN is when an I/O is attempted on a removed LUN - the SRB status code indicates that the LUN is invalid. We currently handle this SRB status and remove the device. Rather than waiting for an I/O to remove the device, force the discovery of LUNs that may have been removed prior to discovering LUNs that may have been added. This looks pretty reasonable to me, but I wonder if we should move this up to common code so that it happens for any host rescan triggered by sysfs or other drivers as well. Not without proper testing. Currently we cannot rescan existing devices; the inquiry string is nailed to the sdev structure. The only way to really refresh the information is to delete it and rescan it again. How are distros handling 0x6/0x3f/0x0e (report luns changed) when it gets passed to userspace? Is everyone kicking off a new full (add and delete) scan to handle this or logging it? Is the driver returning this when the LUNs change? Currently it's logged to userspace and ignored. Doing an automated rescan has proven to be dangerous, as it might disconnect any LUNs which are still in use by applications. Especially HA or database setups tends to become very annoyed when you do an automated rescan. Cheers, Hannes -- Dr. Hannes Reinecke zSeries & Storage h...@suse.de +49 911 74053 688 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg) ___ devel mailing list de...@linuxdriverproject.org http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel