<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi Rob,<br>
<br>
Rob Latham a écrit :
<blockquote cite="mid:20100921122105.GA23782@mcs.anl.gov" type="cite">
<pre wrap="">On Fri, Sep 17, 2010 at 01:17:22PM +0200, Pascal Deveze wrote:
</pre>
<blockquote type="cite">
<pre wrap="">After initializing lum->lmm_stripe_count to a "correct value", this
problem disappears.
I think this is a Lustre bug, but I propose to integer this patch:
</pre>
</blockquote>
<pre wrap=""><!---->
thanks, pascal!
</pre>
<blockquote type="cite">
<pre wrap="">--- src/mpi/romio/adio/ad_lustre/ad_lustre_open.c 2010-09-17
12:50:58.000000000 +0200
+++ src/mpi/romio/adio/ad_lustre/ad_lustre_open.c.OLD 2010-05-25
20:59:13.000000000 +0200
@@ -59,9 +59,6 @@
MAX_LOV_UUID_COUNT * sizeof(struct lov_user_ost_data);
lum = (struct lov_user_md *)ADIOI_Malloc(lumlen);
lum->lmm_magic = LOV_USER_MAGIC;
- /* Initialize lum->lmm_stripe_count with a value else
ioctl() returns an error */
- /* This value must be greater or egal than the existing
lmm_stripe_count (bug in Lustre ?) */
- lum->lmm_stripe_count = -1;
err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *)lum);
if (!err) {
value = (char *)
ADIOI_Malloc((MPI_MAX_INFO_VAL+1)*sizeof(char));
</pre>
</blockquote>
<pre wrap=""><!---->
What if instead of explicitly initializing elements of the struct
lov_user_md, we called ADIOI_Calloc(1, lumlen) to set
everything in the struct to zero? then if that struct changes in
lustre-2.0 or lustre-5.0 or whatever we'll still be covered.. Or,
would zero also give that error about value too large?
</pre>
</blockquote>
<br>
I did not test the value 0. In fact the value 0 is accepted.<br>
So, you are right, we can call ADIOI_Calloc(1, lumlen).<br>
I copy you the new patch hereafter (only one changed line):<br>
<br>
--- src/mpi/romio/adio/ad_lustre/ad_lustre_open.c 2010-09-21
15:50:07.000000000 +0200<br>
+++ src/mpi/romio/adio/ad_lustre/ad_lustre_open.c.OLD 2010-05-25
20:59:13.000000000 +0200<br>
@@ -57,7 +57,7 @@<br>
* then a list of 'lmm_objects' representing stripe */<br>
lumlen = sizeof(struct lov_user_md) +<br>
MAX_LOV_UUID_COUNT * sizeof(struct lov_user_ost_data);<br>
- lum = (struct lov_user_md *)ADIOI_Calloc(1, lumlen);<br>
+ lum = (struct lov_user_md *)ADIOI_Malloc(lumlen);<br>
lum->lmm_magic = LOV_USER_MAGIC;<br>
err = ioctl(fd->fd_sys, LL_IOC_LOV_GETSTRIPE, (void *)lum);<br>
if (!err) {<br>
<br>
<br>
Pascal<br>
<br>
</body>
</html>