diff options
author | Ed L. Cashin <ecashin@coraid.com> | 2008-02-08 07:20:06 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-08 12:22:32 -0500 |
commit | 6b9699bbd24e82d2ec3bb5a43100099a936ded04 (patch) | |
tree | dc36d8716cc502aaac7e6159ffc1a307a4c5302d /drivers/block/aoe/aoecmd.c | |
parent | 9bb237b6a670fa7a6af3adc65231b1f6fda44510 (diff) |
aoe: only install new AoE device once
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>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/aoe/aoecmd.c')
-rw-r--r-- | 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 b49e06ef121e..7a9618313ea3 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) | |||
698 | d->fw_ver, (long long)ssize); | 698 | d->fw_ver, (long long)ssize); |
699 | d->ssize = ssize; | 699 | d->ssize = ssize; |
700 | d->geo.start = 0; | 700 | d->geo.start = 0; |
701 | if (d->flags & (DEVFL_GDALLOC|DEVFL_NEWSIZE)) | ||
702 | return; | ||
701 | if (d->gd != NULL) { | 703 | if (d->gd != NULL) { |
702 | d->gd->capacity = ssize; | 704 | d->gd->capacity = ssize; |
703 | d->flags |= DEVFL_NEWSIZE; | 705 | d->flags |= DEVFL_NEWSIZE; |