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


> +#include "u.h"

can you give this header a more human friendly name ?

> +#include "if_aoe.h"
> +
> +#define VER 2
> +#define nil NULL

please just use NULL

> +#define nelem(A) (sizeof (A) / sizeof (A)[0])
> +#define AOE_MAJOR 152
> +#define ROOT_PATH "/dev/etherd/"

ehhhh device drivers really should be agnostic to device node paths!

> +typedef struct Bufq Bufq;
> +struct Bufq {
> +	Buf *head, *tail;
> +};

is there a good reason to not use list.h lists ??

> +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 ?

> +	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 ?


> +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!



  reply	other threads:[~2004-12-06 22:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-06 15:51 Ed L Cashin
2004-12-06 16:14 ` Arjan van de Ven [this message]
2004-12-10 16:19   ` Ed L Cashin
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=1102349564.2721.103.camel@laptop.fenrus.org \
    --to=arjan@fenrus.demon.nl \
    --cc=ecashin@coraid.com \
    --cc=greg@kroah.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®