[OpenAFS] Re: Documentation on fs bypassthreshold?

Phillip Moore w.phillip.moore@gmail.com
Mon, 18 Oct 2010 13:25:09 -0400


--000e0cd215b446783b0492e77551
Content-Type: text/plain; charset=ISO-8859-1

As usual, if you read the source, it's kinda obvious form the comments:

/*
 * Set cache-bypass threshold.  Files larger than this size will not be
cached.
 * With a threshold of 0, the cache is always bypassed.  With a threshold of
-1,
 * cache bypass is disabled.
 */

However, while playing around with it, to understand the syntax, it seems to
me that there's no way to reset the value back to -1 to turn it off.

[root@rpcore ~]# fs bypassthreshold 100000
Cache bypass threshold 100000
[root@rpcore ~]# fs bypassthreshold -1
fs bypassthreshold -size: -1 must be an undecorated digit string.
[root@rpcore ~]# fs bypassthreshold 0
Cache bypass threshold 0

The code asserts that the value of -size be an "undecorated integer", since
it validates it with isdigit().

If it's not possible to reset the value back to -1, that's a pretty obvious
bug.

Then again, maybe I misunderstand how this is supposed to be used.

You can set it to a value of zero, but my reading of the code says that this
will mean NOTHING gets cached.  That can't be right...

On Mon, Oct 18, 2010 at 1:16 PM, Phillip Moore <w.phillip.moore@gmail.com>wrote:

> In 1.5.77, there's no man page for fs_bypassthreshold, and Google's not
> showing much that helps, either.
>
> Can someone explain to me what this does?   For the purposes of supporting
> it in AFS::Command, I only need to know the CLI syntax, and I can read
> venus/fs.c to figure out how to parse the output, but...
>
> What does it DO?
>
>

--000e0cd215b446783b0492e77551
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<div><br></div>As usual, if you read the source, it&#39;s kinda obvious for=
m the comments:<div><br></div><div><div>/*</div><div>=A0* Set cache-bypass =
threshold. =A0Files larger than this size will not be cached.</div><div>=A0=
* With a threshold of 0, the cache is always bypassed. =A0With a threshold =
of -1,</div>
<div>=A0* cache bypass is disabled.</div><div>=A0*/</div><div><br></div><di=
v>However, while playing around with it, to understand the syntax, it seems=
 to me that there&#39;s no way to reset the value back to -1 to turn it off=
.</div>
<div><br></div><div><div>[root@rpcore ~]# fs bypassthreshold 100000</div><d=
iv>Cache bypass threshold 100000</div><div>[root@rpcore ~]# fs bypassthresh=
old -1</div><div>fs bypassthreshold -size: -1 must be an undecorated digit =
string.</div>
<div>[root@rpcore ~]# fs bypassthreshold 0</div><div>Cache bypass threshold=
 0</div></div><div><br></div><div>The code asserts that the value of -size =
be an &quot;undecorated integer&quot;, since it validates it with isdigit()=
.</div>
<div><br></div><div>If it&#39;s not possible to reset the value back to -1,=
 that&#39;s a pretty obvious bug.</div><div><br></div><div>Then again, mayb=
e I misunderstand how this is supposed to be used.</div><div><br></div>
<div>You can set it to a value of zero, but my reading of the code says tha=
t this will mean NOTHING gets cached. =A0That can&#39;t be right...</div><b=
r><div class=3D"gmail_quote">On Mon, Oct 18, 2010 at 1:16 PM, Phillip Moore=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:w.phillip.moore@gmail.com">w.phill=
ip.moore@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;">In 1.5.77, there&#39;s no man page for fs_b=
ypassthreshold, and Google&#39;s not showing much that helps, either.<div><=
br>
</div><div>Can someone explain to me what this does? =A0 For the purposes o=
f supporting it in AFS::Command, I only need to know the CLI syntax, and I =
can read venus/fs.c to figure out how to parse the output, but...</div>
<div><br></div><div>What does it DO?</div><div><br></div>
</blockquote></div><br></div>

--000e0cd215b446783b0492e77551--