lkml.org 
[lkml]   [2007]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 08/13] only install new AoE device once
Date
An aoe driver user who had about 70 AoE targets found that he was
hitting a BUG in sysfs_create_file because the aoe driver was trying
to tell the kernel about an AoE device more than once. Each AoE
device was reachable by several local network interfaces, and multiple
ATA device indentify responses were returning from that single device.

This patch eliminates a race condition so that aoe always informs the
block layer of a new AoE device once in the presence of multiple
incoming ATA device identify responses.

Signed-off-by: Ed L. Cashin <ecashin@coraid.com>
---
drivers/block/aoe/aoecmd.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/block/aoe/aoecmd.c b/drivers/block/aoe/aoecmd.c
index b49e06e..7a96183 100644
--- a/drivers/block/aoe/aoecmd.c
+++ b/drivers/block/aoe/aoecmd.c
@@ -698,6 +698,8 @@ ataid_complete(struct aoedev *d, struct aoetgt *t, unsigned char *id)
d->fw_ver, (long long)ssize);
d->ssize = ssize;
d->geo.start = 0;
+ if (d->flags & (DEVFL_GDALLOC|DEVFL_NEWSIZE))
+ return;
if (d->gd != NULL) {
d->gd->capacity = ssize;
d->flags |= DEVFL_NEWSIZE;
--
1.5.3.4


\
 
 \ /
  Last update: 2007-12-20 23:21    [W:0.107 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site