lkml.org 
[lkml]   [2012]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 8/8] aoe: return real minor number for static minors
From
Date
The value returned by the static minor device number number
allocator is the real minor number, so it must be multiplied by
the supported number of partitions per aoedev.

Without this fix the support for systems without udev is
incomplete, and the few users of aoe on such systems will have
surprising results when device nodes names do not match the AoE
target.

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

diff --git a/drivers/block/aoe/aoedev.c b/drivers/block/aoe/aoedev.c
index 80b3d3e..aaaea66 100644
--- a/drivers/block/aoe/aoedev.c
+++ b/drivers/block/aoe/aoedev.c
@@ -95,7 +95,7 @@ minor_get_static(ulong *sysminor, ulong aoemaj, int aoemin)
} else
set_bit(n, used_minors);
spin_unlock_irqrestore(&used_minors_lock, flags);
- *sysminor = n;
+ *sysminor = n * AOE_PARTITIONS;
out:
return error;
}
--
1.7.1


\
 
 \ /
  Last update: 2012-11-25 02:21    [W:2.930 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site