Discussion:
Another lookup question.
Robert Rappaport
2009-02-17 23:02:12 UTC
Permalink
Again in search_dirblock(), the following seems to happen:

1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.

2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.

3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.

I do not understand the reason why the appearance of the "@" makes a
difference in what epoch number to use.

Also I do not understand what is supposed to happend when the name
string ends with the "@" character.

- Robert
Zachary N. J. Peterson
2009-02-18 13:25:00 UTC
Permalink
Yes, sorry. I forgot to address your last email about scoping.
You're absolutely correct that the parsing of of epoch numbers is not
very robust and could use some input checking.

The Flux Token is a special character in ext3cow and, as a rule,
should not be included in any file names. It is used specifically to
operate on files in previous epochs, with one exception: 'ls file@'
should list all the epochs in which that file has a version.
Post by Robert Rappaport
1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.
This is desired behavior, as telling the file system you want
Post by Robert Rappaport
2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.
This is also correct, as the parent directory holds the scoping
information for that directory. For example, if you cd '/***@time'
then the file system does a lookup to fine that version of bin and
puts you in that directory. If you then type 'ls' you don't want
current version of bin's contents, you want the version you cd'd to.
Post by Robert Rappaport
3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.
There is some logic that tries to deal with file names that do have
the flux token character in them. Assigning the scoping epoch number
to the system epoch number is another way of saying look for that file
"right now."

As to the "onehour" stuff -- that code should not be in there. It
doesn't work, and was just something I was screwing around with.

Hope this helps,
Zachary

---
Zachary N. J. Peterson
Assistant Research Scientist
The Johns Hopkins University

zachary-***@public.gmane.org
http://znjp.com
Post by Robert Rappaport
1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.
2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.
3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.
difference in what epoch number to use.
Also I do not understand what is supposed to happend when the name
- Robert
_______________________________________________
ext3cow-devel mailing list
http://hssl.cs.jhu.edu/cgi-bin/mailman/listinfo/ext3cow-devel
Robert Rappaport
2009-02-18 22:42:21 UTC
Permalink
Thanks. I still am a little puzzled over the difference in scoping when the
Flux Token is part of the name. If the directory has a different epoch
number than the system epoch number doesn't that mean that either this is a
directory from the past, or that the directory has not been modified since
it acquired its epoch number? It seems to me that either way the
directory's epoch number is the relevant one. Am I missing something?

- Robert
Post by Zachary N. J. Peterson
Yes, sorry. I forgot to address your last email about scoping.
You're absolutely correct that the parsing of of epoch numbers is not very
robust and could use some input checking.
The Flux Token is a special character in ext3cow and, as a rule, should not
be included in any file names. It is used specifically to operate on files
epochs in which that file has a version.
1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.
This is desired behavior, as telling the file system you want
2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.
This is also correct, as the parent directory holds the scoping information
system does a lookup to fine that version of bin and puts you in that
directory. If you then type 'ls' you don't want current version of bin's
contents, you want the version you cd'd to.
3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.
There is some logic that tries to deal with file names that do have the
flux token character in them. Assigning the scoping epoch number to the
system epoch number is another way of saying look for that file "right now."
As to the "onehour" stuff -- that code should not be in there. It doesn't
work, and was just something I was screwing around with.
Hope this helps,
Zachary
---
Zachary N. J. Peterson
Assistant Research Scientist
The Johns Hopkins University
http://znjp.com
1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.
2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.
3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.
difference in what epoch number to use.
Also I do not understand what is supposed to happend when the name
- Robert
_______________________________________________
ext3cow-devel mailing list
http://hssl.cs.jhu.edu/cgi-bin/mailman/listinfo/ext3cow-devel
Tim Post
2009-02-19 07:15:22 UTC
Permalink
Hi,
Post by Robert Rappaport
Thanks. I still am a little puzzled over the difference in scoping
when the Flux Token is part of the name. If the directory has a
different epoch number than the system epoch number doesn't that mean
that either this is a directory from the past, or that the directory
has not been modified since it acquired its epoch number? It seems to
me that either way the directory's epoch number is the relevant one.
Am I missing something?
As Zachary said, its wise to avoid using the flux capacitor in file
names.. however, if you MUST use @ in a file name, its easy to change
the flux token to something else (but problematic).

If you have file-***@public.gmane.org , you are needlessly taxing the kernel, even if
you change how that token is parsed. That still shoots you in the foot
with globbing and shell expansion if you approach ARG_MAX with files
that contain the flux. Given that temporal inodes exist only in VFS,
this is potentially _very_ problematic.

You really have these choices, all of them more efficient than trying to
use the flux token in a file name:

1 - Patch ls, cat, bash, etc to read right to left and check the
validity (or nullness) of whatever comes after the rightmost @
(expensive)

2 - Modify the flux token to be something else (i.e. +, but that might
break things when using globbing / regex when handling strings)

3 - Don't use @ in a file name :) (easiest)

I fought with this while using ext3cow to version mailboxes using a
custom MTA that would store my mail as such:

echo-***@public.gmane.org_inbox
echo-***@public.gmane.org_trash
echo-***@public.gmane.org_spam

It was much easier to modify the MTA, s/@/AT/g

Cheers,
--Tim
Post by Robert Rappaport
- Robert
Yes, sorry. I forgot to address your last email about
scoping. You're absolutely correct that the parsing of of
epoch numbers is not very robust and could use some input
checking.
The Flux Token is a special character in ext3cow and, as a
rule, should not be included in any file names. It is used
specifically to operate on files in previous epochs, with one
file has a version.
Post by Robert Rappaport
1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.
This is desired behavior, as telling the file system you want
Post by Robert Rappaport
2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.
This is also correct, as the parent directory holds the
scoping information for that directory. For example, if you
version of bin and puts you in that directory. If you then
type 'ls' you don't want current version of bin's contents,
you want the version you cd'd to.
Post by Robert Rappaport
3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.
There is some logic that tries to deal with file names that do
have the flux token character in them. Assigning the scoping
epoch number to the system epoch number is another way of
saying look for that file "right now."
As to the "onehour" stuff -- that code should not be in
there. It doesn't work, and was just something I was screwing
around with.
Hope this helps,
Zachary
---
Zachary N. J. Peterson
Assistant Research Scientist
The Johns Hopkins University
http://znjp.com
Post by Robert Rappaport
1. If the EXT3COW_FLUX_TOKEN does appear in the name and
is followed by a numeric string then epoch_number is assigned
the value of this numeric string and the name is truncated.
2. If the EXT3COW_FLUX_TOKEN does NOT appear in the name,
then epoch_number is assigned from the epoch of the directory.
3. If the EXT3COW_FLUX_TOKEN does appear but is NOT followed
by a numeric string then epoch_number is assigned from the
system epoch number.
difference in what epoch number to use.
Also I do not understand what is supposed to happend when the name
- Robert
_______________________________________________
ext3cow-devel mailing list
http://hssl.cs.jhu.edu/cgi-bin/mailman/listinfo/ext3cow-devel
_______________________________________________
ext3cow-devel mailing list
http://hssl.cs.jhu.edu/cgi-bin/mailman/listinfo/ext3cow-devel
Loading...