All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/1] osd_uld: Important fix also for 3.2 Stable
@ 2012-01-25 19:40 Boaz Harrosh
  2012-01-25 19:42 ` [PATCH 1/1] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576 Boaz Harrosh
  0 siblings, 1 reply; 3+ messages in thread
From: Boaz Harrosh @ 2012-01-25 19:40 UTC (permalink / raw)
  To: James Bottomley, linux-scsi, open-osd, linux-fsdevel, Al Viro,
	Andrew Morton
  Cc: Welch, Brent, Bhamare, Sachin, Stable Tree


There was a mine hiding in the osd_uld driver. It was limited by the number of device minors
it registers at startup which was 64.

The rest of the code is not limited at all and can hold as many devices as permitted
by memory conditions.

The fix is very simple just bump the max number to the maximum minor permitted which
is 2^20.

This is a serious BUG because some of the systems that intend to use the 3.2 Kernel
to deploy pnfs. (Fedora 17 most probably) are bigger then 64 OSDs and will break.

I have tested this on 64bit platform and user-mode works just fine with this.
(Kernel is not an issue). Might there be issues hiding in 32bit ARCHs. From
reading the code I could not find any.

James would you like to take this through your tree for the next rc-fixes round
or give me an ACK-BY: and I'll push it through the osd tree?

The patch:
[PATCH 1/1] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576

Thanks
Boaz


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/1] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576
  2012-01-25 19:40 [PATCHSET 0/1] osd_uld: Important fix also for 3.2 Stable Boaz Harrosh
@ 2012-01-25 19:42 ` Boaz Harrosh
  2012-02-01 15:50   ` Boaz Harrosh
  0 siblings, 1 reply; 3+ messages in thread
From: Boaz Harrosh @ 2012-01-25 19:42 UTC (permalink / raw)
  To: James Bottomley, linux-scsi, open-osd, linux-fsdevel, Al Viro,
	Andrew Morton
  Cc: Welch, Brent, Bhamare, Sachin, Stable Tree


It used to be that minors where 8 bit. But now they
are actually 20 bit. So the fix is simplicity itself.

I've tested with 300 devices and all user-mode utils
work just fine. I have also mechanically added 10,000
to the ida (so devices are /dev/osd10000, /dev/osd10001 ...)
and was able to mkfs an exofs filesystem and access osds
from user-mode.

All the open-osd user-mode code uses the same library
to access devices through their symbolic names in
/dev/osdX so I'd say it's pretty safe. (Well tested)

This patch is very important because some of the systems
that will be deploying the 3.2 pnfs-objects code are larger
than 64 OSDs and will stop to work properly when reaching
that number.

CC: Stable <stable@vger.kernel.org>
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
 drivers/scsi/osd/osd_uld.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index b31a8e3..d4ed9eb 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -69,10 +69,10 @@
 #ifndef SCSI_OSD_MAJOR
 #  define SCSI_OSD_MAJOR 260
 #endif
-#define SCSI_OSD_MAX_MINOR 64
+#define SCSI_OSD_MAX_MINOR MINORMASK
 
 static const char osd_name[] = "osd";
-static const char *osd_version_string = "open-osd 0.2.0";
+static const char *osd_version_string = "open-osd 0.2.1";
 
 MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>");
 MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko");
-- 
1.7.2.3



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576
  2012-01-25 19:42 ` [PATCH 1/1] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576 Boaz Harrosh
@ 2012-02-01 15:50   ` Boaz Harrosh
  0 siblings, 0 replies; 3+ messages in thread
From: Boaz Harrosh @ 2012-02-01 15:50 UTC (permalink / raw)
  To: James Bottomley
  Cc: linux-scsi, open-osd, linux-fsdevel, Al Viro, Andrew Morton,
	Welch, Brent, Bhamare, Sachin, Stable Tree

On 01/25/2012 09:42 PM, Boaz Harrosh wrote:
> 
> It used to be that minors where 8 bit. But now they
> are actually 20 bit. So the fix is simplicity itself.
> 
> I've tested with 300 devices and all user-mode utils
> work just fine. I have also mechanically added 10,000
> to the ida (so devices are /dev/osd10000, /dev/osd10001 ...)
> and was able to mkfs an exofs filesystem and access osds
> from user-mode.
> 
> All the open-osd user-mode code uses the same library
> to access devices through their symbolic names in
> /dev/osdX so I'd say it's pretty safe. (Well tested)
> 
> This patch is very important because some of the systems
> that will be deploying the 3.2 pnfs-objects code are larger
> than 64 OSDs and will stop to work properly when reaching
> that number.
> 
> CC: Stable <stable@vger.kernel.org>
> Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>

James Hi

You never came back to me on this patch. It is very important for the
setups all this osd stuff is intended for. It is a simple bug right in the
middle of the system, which makes it useless. (I'm so embarrassed I made it
in the first place)

I have put it in today's linux-next, so it can collect dust there.
Please tell me if you want to carry this for this rc-fixes or I should
push it through the osd tree.

Thanks
Boaz

> ---
>  drivers/scsi/osd/osd_uld.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
> index b31a8e3..d4ed9eb 100644
> --- a/drivers/scsi/osd/osd_uld.c
> +++ b/drivers/scsi/osd/osd_uld.c
> @@ -69,10 +69,10 @@
>  #ifndef SCSI_OSD_MAJOR
>  #  define SCSI_OSD_MAJOR 260
>  #endif
> -#define SCSI_OSD_MAX_MINOR 64
> +#define SCSI_OSD_MAX_MINOR MINORMASK
>  
>  static const char osd_name[] = "osd";
> -static const char *osd_version_string = "open-osd 0.2.0";
> +static const char *osd_version_string = "open-osd 0.2.1";
>  
>  MODULE_AUTHOR("Boaz Harrosh <bharrosh@panasas.com>");
>  MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko");


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-02-01 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-01-25 19:40 [PATCHSET 0/1] osd_uld: Important fix also for 3.2 Stable Boaz Harrosh
2012-01-25 19:42 ` [PATCH 1/1] osd_uld: Bump MAX_OSD_DEVICES from 64 to 1,048,576 Boaz Harrosh
2012-02-01 15:50   ` Boaz Harrosh

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.