On Tue, Oct 19, 2010 at 1:42 PM, Phillip Moore <[email protected]> wrote: > I took a simple first pass this, by simply allowing "precache" to behave > similar to commands like "bypassthreshold" and "storebehind". This seemed > like it would be a simple matter of copying the approach used by other > functions. > Based on how bypassthreshold is implemented, I tried the function pasted > below, and it simply doesn't work, and I wonder if the issue is in the code > that implements the pioctl call (and I can't even find that....) > The resulting fs binary does two things I don't understand. First, when no > argument is given, I expected the pioctl call to set the value of blob.out, > but instead I get this error: > fs: server or network not responding > If I try to set the value to, say, 100000, then I'm getting a completely > different value back: > Precache size 1101949910 > Is this a matter of the pioctl() call not supporting returning the value, > perhaps? I'm guessing that the error occurs because the pioctl() code is > written to expect an input value, and the strange integer value is just > random noise, because the same pioctl() code isn't setting the return value > in blob.out at all. > I'm not familiar with how the pioctl code is organized at all. Can someone > point me to the place that actually handles: > code = pioctl(0, VIOCPRECACHE, &blob, 1); > so I can figure this out?
look for DECL_PIOCTL(PPrecache) in src/afs/afs_pioctl.c. Sure enough, we only do a copyin() [via afs_pd_getInt()]... -Tom _______________________________________________ OpenAFS-devel mailing list [email protected] https://lists.openafs.org/mailman/listinfo/openafs-devel
