lkml.org 
[lkml]   [2012]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 05/11] firewire-sbp-target: Add sbp_configfs.c
On 15/02/2012 19:21, Stefan Richter wrote:
> On Feb 15 Chris Boot wrote:
>> --- /dev/null
>> +++ b/drivers/target/sbp/sbp_configfs.c
>> @@ -0,0 +1,751 @@
>> +/*
>> + * SBP2 target driver (SCSI over IEEE1394 in target mode)
>> + *
>> + * Copyright (C) 2011 Chris Boot<bootc@bootc.net>
>> + *
>> + * This program is free software; you can redistribute it and/or modify
>> + * it under the terms of the GNU General Public License as published by
>> + * the Free Software Foundation; either version 2 of the License, or
>> + * (at your option) any later version.
>> + *
>> + * 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 for more details.
>> + *
>> + * You should have received a copy of the GNU General Public License
>> + * along with this program; if not, write to the Free Software Foundation,
>> + * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
>> + */
>> +
>> +#define KMSG_COMPONENT "sbp_target"
>> +#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt
>> +
>> +#include<linux/module.h>
>> +#include<linux/moduleparam.h>
>> +#include<linux/version.h>
>> +#include<linux/init.h>
>> +#include<linux/slab.h>
>> +#include<linux/kthread.h>
>> +#include<linux/types.h>
>> +#include<linux/string.h>
>> +#include<linux/configfs.h>
>> +#include<linux/ctype.h>
>> +#include<linux/firewire.h>
>> +
>> +#include<asm/unaligned.h>
>> +
>> +#include<target/target_core_base.h>
>> +#include<target/target_core_backend.h>
>> +#include<target/target_core_fabric.h>
>> +#include<target/target_core_configfs.h>
>> +#include<target/target_core_fabric_configfs.h>
>> +#include<target/configfs_macros.h>
>> +
>> +#include "sbp_base.h"
>> +#include "sbp_fabric.h"
>> +#include "sbp_management_agent.h"
>> +
>> +/* Local pointer to allocated TCM configfs fabric module */
>> +struct target_fabric_configfs *sbp_fabric_configfs;
>> +
>> +struct workqueue_struct *sbp_workqueue;
>
> #include<linux/workqueue.h> goes before this.

Yep.

> [...]
>> + sbp_workqueue = alloc_workqueue("firewire-sbp-target", WQ_UNBOUND, 0);
>> + if (!sbp_workqueue) {
>> + target_fabric_configfs_deregister(fabric);
>> + return -ENOMEM;
>> + }
>
> What are your specific requirements that you cannot use one of the
> system-wide workqueues?

Nothing specific, I just thought it was sensible to use your own
workqueue if you put enough work into it. I'll switch to the system queues.

--
Chris Boot
bootc@bootc.net


\
 
 \ /
  Last update: 2012-02-16 10:59    [W:0.252 / U:0.704 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site