PFS in HAMMER1
Michael Neumann
mneumann at ntecs.de
Fri Jun 17 06:14:41 PDT 2016
On 06/17/16 14:15, Tomohiro Kusumi wrote:
> Technically speaking, we could change the format of "@@-1:00001" to
> "@@-1something00001" without breaking userspace unless userspace use
> raw PFS name "@@-1:00001" for some reasons.
that would be great. maybe something else than the "empty word" would be
better.
> In the previous post, I intentionally used raw PFS name, but users or
> userspace programs basically never directly use this format, so it
> really doesn't matter if the separator is ":" or something else as
> long as there is something between.
>
> In other words, when we have
>
> # ls -l /pfs/var.tmp
> lrwxr-xr-x 1 root wheel 10 Aug 26 2015 /pfs/var.tmp -> @@-1:00006
> # grep "/var/tmp" /etc/fstab
> /pfs/var.tmp /var/tmp null rw 0 0
>
> users would do
>
> # cd /pfs/var.tmp
> or
> # cd /var/tmp
>
> but users most likely never do
>
> # cd /pfs/@@-1:00006
> or
> # cd /@@-1:00006
> or
> # cd /var/tmp/@@-1:00006
> or
> # cd /pfs/@@-1:00006/@@-1:00006/@@-1:00006/@@-1:00006
> or
> # cd /@@-1:00001/@@-1:00002/@@-1:00003/@@-1:00004/@@-1:00005/@@-1:00006
>
> which are all the same.
it's correct that users wouldn't do that directly, but the sysctl
KERN_PROC_PATHNAME returns such a path which is used by programs like
rust. they assume that paths can be separated by ":" and as such are not
allowed to themselves contain a ":".
the current solution is to patch rust is a very ugly way, by hardcoding
the path "/usr/local/bin/rust" to avoid the sysctl (or reading from
/proc filesystem). this clearly is not a good solution.
Regards,
Michael
>
>
> 2016-06-17 0:28 GMT+09:00 Michael Neumann <mneumann at ntecs.de>:
>>
>>
>> On 06/16/16 02:26, Tomohiro Kusumi wrote:
>>>
>>> There was discussion about @@ in PFS path on irc channel a few days
>>> ago. This post has nothing to do with it, but explains what that @@
>>> really means. This is very tricky, so most users probably had
>>> difficult time understanding what this @@ means.
>>
>>
>> This is a bit off-topic, but related to the PFS naming. Having ":" in the
>> path causes a lot of trouble. Dunno if this issue has been brought up by
>> jmarino. One such situation is the sysctl KERN_PROC_PATHNAME, e.g. used by
>> rust to find the path of the executable. The problem arises when this is
>> used in a PATH variable, as ":" is used there as a separator as well. The
>> alternative is using /proc/curproc/cmdline, but this requires a mounted
>> /proc filesystem which causes problems with the synth builder.
>>
>> Regards,
>>
>> Michael
>>
More information about the Users
mailing list