AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20090325105115.664f64e9@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:mail.onstor.net
NSV:
SSH:
R:<ed.kwan@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@exch1.onstor.net/INBOX	0	2779531E7C760D4491C96305019FEEB52AC8B56F60@exch1.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 25 Mar 2009 10:52:02 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: Ed Kwan <ed.kwan@onstor.com>
Subject: Re: please review code change for TED 26523 Polcom 11914 - nfs
 share modify Error: Duplicate option string (anon_uid33)
Message-ID: <20090325105202.47ccb0f5@ripper.onstor.net>
In-Reply-To: <2779531E7C760D4491C96305019FEEB52AC8B56F60@exch1.onstor.net>
References: <2779531E7C760D4491C96305019FEEB52AC8B56A31@exch1.onstor.net>
	<20090324175926.783b7f16@ripper.onstor.net>
	<2779531E7C760D4491C96305019FEEB52AC8B56F60@exch1.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Wed, 25 Mar 2009 10:36:29 -0700 Ed Kwan <ed.kwan@onstor.com> wrote:

> Hi Andy,
> 
> 
> 
> Here's the current output:
> 
> 
> 
> rw=10.4.0.200/32:10.4.0.205/32:10.4.0.206/32:10.4.0.207/32:10.200.0.92/32:10.200.0.88/32:10.200.0.89/32:10.20
> 
> 0.0.91/32:10.200.0.100/32:10.4.0.232/32
> 
> no_root_squash=10.4.0.200/32:10.4.0.205/32:10.4.0.206/32:10.4.0.207/32:10.200.0.92/32:10.200.0.88/32:10.200.0
> 
> .89/32:10.200.0.91/32:10.200.0.100/32:10.4.0.232/32
> 
> anon_uid33=10.4.0.200/32
> 
> anon_uid33=10.4.0.205/32
> 
> anon_uid33=10.4.0.206/32
> 
> anon_uid33=10.4.0.207/32
> 
> anon_uid33=10.200.0.92/32
> 
> anon_uid33=10.200.0.88/32
> 
> anon_uid33=10.200.0.89/32
> 
> anon_uid33=10.200.0.91/32
> 
> anon_uid33=10.200.0.100/32
> 
> anon_uid33=10.4.0.232/32
> 
> 
> 
> The problem is not whether the current "anon_uid" output is ugly or
> readable; "nfs share modify" generated this output, but won't accept
> it back, complaining about "Duplicate option string".  Here's the new
> output:

OK, so I thought this was more or less a UI/cosmetic/SGA issue, but
it's more than that.

>  rw=10.4.0.200/32:10.4.0.205/32:10.4.0.206/32:10.4.0.207/32:10.200.0.92/32:10.200.0.88/32:10.200.0.8
> 
> 9/32:10.200.0.91/32:10.200.0.100/32:10.4.0.232/32
> 
> no_root_squash=10.4.0.200/32:10.4.0.205/32:10.4.0.206/32:10.4.0.207/32:10.200.0.92/32:10.200.0.88/3
> 
> 2:10.200.0.89/32:10.200.0.91/32:10.200.0.100/32:10.4.0.232/32
> 
> anon_uid33=10.4.0.200/32:10.4.0.205/32:10.4.0.206/32:10.4.0.207/32:10.200.0.92/32:10.200.0.88/32:10
> 
> .200.0.89/32:10.200.0.91/32:10.200.0.100/32:10.4.0.232/32
> 
> anon_gid33=10.4.0.200/32:10.4.0.205/32:10.4.0.206/32:10.4.0.207/32:10.200.0.92/32:10.200.0.88/32:10
> 
> .200.0.89/32:10.200.0.91/32:10.200.0.100/32:10.4.0.232/32
> 
> 
> 
> The splitting of the identifier is in the original code of the same
> function:

I'm aware of that, but it's still sick and wrong, and since you're
changing those lines...

> 
> 
>    2715                             fprintf(f, "anon_uid%d=",
> nds_options[idx].
> 
>    2716
> neo_client_specs[sidx].neo_data.neo_uid);
> 
> 
> 
> as well as the "else" styling:

yes, well, that's why I marked it optional, but since there's two
different styles in the same file, in the same function even, and these
are the broken ones...

> 
> 
>    2718                     }
> 
>    2719                     else
> 
>    ...
> 
>    2725                     }
> 
>    2726                     else {
> 
>    2727                         if (cont) {
> 
>    2728                             fprintf(f, ":");
> 
>    2729                         }
> 
>    2730                         else {
> 
>    2731                             cont = 1;
> 
>    2732                         }
> 
>    2733                     }
> 
> 
> 
> I'm just keeping the current coding style.  I can change them per
> your suggestion if you want.
> 
> Yes, I've tested with more than 1 client, as well as using "anon_gid".
> 
> 
> 
> Thanks,
> 
> Ed
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Andy Sharp
> Sent: Tuesday, March 24, 2009 5:59 PM
> To: Ed Kwan
> Subject: Re: please review code change for TED 26523 Polcom 11914 -
> nfs share modify Error: Duplicate option string (anon_uid33)
> 
> 
> 
> On Mon, 23 Mar 2009 16:04:57 -0700 Ed Kwan <ed.kwan@onstor.com> wrote:
> 
> 
> 
> > Change 32159 by edk@edk-dev on 2009/03/23 16:03:58 *pending*
> 
> >
> 
> >         For TED 26523 Polcom 11914 - nfs share modify Error:
> > Duplicate
> 
> >         option string (anon_uid33)
> 
> >         For the anon_uid and anon_gid options, we were printing one
> 
> > client per line.  Modified cmd_modifyNdsOptions() to print all the
> 
> > clients in the same line.
> 
> >         Reviewed by AndyS.
> 
> >
> 
> > Affected files ...
> 
> >
> 
> > ... //depot/dev/nfx-tree/code/ssc-nfxsh/cmd_nfs.c#22 edit
> 
> 
> 
> 
> 
> = Change 32159 by edk@edk-dev on 2009/03/23 16:03:58 *pending*
> 
> =
> 
> =     For TED 26523 Polcom 11914 - nfs share modify Error: Duplicate
> 
> =     option string (anon_uid33)
> 
> =     For the anon_uid and anon_gid options, we were printing one
> client
> 
> =     per line.  Modified cmd_modifyNdsOptions() to print all the
> clients
> 
> =     in the same line.
> 
> =     Reviewed by AndyS.
> 
> =
> 
> 
> 
> nfx-tree/code/ssc-nfxsh/cmd_nfs.c
> 
> 
> 
>      oops, forgot about this one.
> 
> 
> 
>      Can you give me a sample output from each?  I'm not entirely sure
> 
>      I can picture it in my mind.  I guess my one thought is, what if
> 
>      there are 2k clients?  Might be kind of ugly all on one line.
> 
>      Of course, might be kind of ugly the other way as well.  So,
> 
>      nevermind, no sample necessary, I leave it to you.
> 
> 
> 
>      line 2718, this identifier should not be split up into separate
> 
>      lines.  either write the code such that these huge identifiers
> 
>      can be dispensed with, or have it all on one line.  I'm even
> 
>      surprised the compiler takes it.  you can split the line after
> the
> 
>      '=' sign if that helps.  uid =\n mega.silly.identifier[nuts].foo;
> 
> 
> 
>      line 2733 too.
> 
> 
> 
>      optional: clean up the coding style here.  line 2730 for example,
> 
>      }
> 
>         else
> 
>         if () {
> 
>      should be
> 
>      } else if () {
> 
>      like it is elsewhere in the file.  line 2748 too.
> 
> 
> 
> 
> 
>      the logic of the code is a bit difficult to follow.  I assume
> 
>      that you've tested this, however, for some number of clients > 1?
> 
> 
> 
> 
> 
> 
