All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ed L Cashin <ecashin@coraid.com>
To: linux-kernel@vger.kernel.org
Cc: Arjan van de Ven <arjan@fenrus.demon.nl>
Subject: Re: [PATCH] ATA over Ethernet driver for 2.6.9
Date: Fri, 10 Dec 2004 11:19:28 -0500	[thread overview]
Message-ID: <87pt1i15yn.fsf@coraid.com> (raw)
In-Reply-To: 1102349564.2721.103.camel@laptop.fenrus.org

Arjan van de Ven <arjan@fenrus.demon.nl> writes:

[helpful suggestions]
...
>> +struct Aoedev {
>> +	Aoedev *next;
>> +	uchar addr[6];		/* remote mac addr */
>> +	ushort flags;
>> +	ulong sysminor;
>> +	ulong aoemajor;
>> +	ulong aoeminor;
>
> sounds like the wrong type, why not use dev_t ?

These are ATA over Ethernet major and minor addresses, not device node
major and minor numbers.

>> +	ulong nopen;		/* user count */
>
> why do you need this ?
>
>> +static int
>> +aoeblk_release(struct inode *inode, struct file *filp)
>> +{
>> +	Aoedev *d;
>> +	ulong flags;
>> +
>> +	d = (Aoedev *) inode->i_bdev->bd_disk->private_data;
>> +
>> +	spin_lock_irqsave(&d->lock, flags);
>> +	if (--d->nopen == 0)
>
> eh why not just a ->release function instead that uses the blocklayer
> refcounting instead of doing your own ?

Do you just mean we should use inode->i_bdev->bd_openers instead of
having d->nopen?

>> +int
>> +aoeblk_make_request(request_queue_t *q, struct bio *bio)
>> +{
>> +	Aoedev *d;
>> +	Buf *buf;
>> +	struct sk_buff *sl;
>> +	ulong flags;
>> +
>> +	blk_queue_bounce(q, &bio);
>> +
>> +	buf = kallocz(sizeof *buf, GFP_KERNEL);
>
> this is deadlocky; you HAVE to use a mempool for allocations here!

OK.  Thanks for pointing that out.

-- 
  Ed L Cashin <ecashin@coraid.com>


  reply	other threads:[~2004-12-10 16:19 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-06 15:51 [PATCH] ATA over Ethernet driver for 2.6.9 Ed L Cashin
2004-12-06 16:14 ` Arjan van de Ven
2004-12-10 16:19   ` Ed L Cashin [this message]
2004-12-06 16:21 ` Jan-Benedict Glaw
2004-12-06 16:11   ` Alan Cox
2004-12-06 17:06   ` Ed L Cashin
2004-12-07 13:00   ` Pavel Machek
2004-12-08 10:02     ` Helge Hafting
2004-12-08 15:44       ` Ed L Cashin
2004-12-08 15:53       ` Pavel Machek
2004-12-06 16:28 ` Adam Heath
2004-12-06 16:45   ` Ed L Cashin
2004-12-06 16:09     ` Alan Cox
2004-12-06 17:10     ` Adam Heath
2004-12-06 21:54 ` Greg KH
2004-12-09 15:48   ` Ed L Cashin
2004-12-09 16:37     ` Greg KH
2004-12-09 15:57   ` Ed L Cashin
2004-12-09 16:40     ` Greg KH
     [not found]   ` <87zn0n5vyd.fsf@coraid.com>
2004-12-09 16:42     ` Greg KH
2004-12-08  9:53 ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87pt1i15yn.fsf@coraid.com \
    --to=ecashin@coraid.com \
    --cc=arjan@fenrus.demon.nl \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.