Help with xattrFilter

Hi all

I feel somewhat puzzled with the feature so I’m reluctant with my translation. Please enlight my questions:

  • I think I read it somewhere but I can’t find it back: each rule field allows coma separated list isn’t it?
  • (not a matter of translation) What is the purpose of fields “Maximum single entry size” & “Maximum total size”? Is it to limit the size(s) of the xattr data themselves or the size(s) of the fields? If they are for the later, why do we need to specify limits if the end of string could do the job? If they are for the former please try to tell some words or link to TFM about the mystery for my general education :wink: (I don’t feel skilled enough with xattr to play/run tests around).
  • Now the rough: (I think some examples in the doc like the one we find at ignore patterns bottom could have helped me).

01 - no rule default-permit

If I “Save” the settings as is (above), all local extended attributes are sent to the cluster, right? It depends on remote devices to accept or not.

[EDIT]:

Now, just above, ctime is not sent (unchecked=deny), atime is sent ((explicitly specified + checked box)=permit=send). All other xattr (unchecked *) are not sent. Further more, “Deny” being default (to be understood like in netfilter iptables --policy <chain> --jump DROP that takes place in the end when all rules have been parsed - I first though the default thing concept applied to each line, which I now guess is wrong), the last line is useless as redundant with current default.

Furthermore the first line is useless too for the same reason, unless we want it as a reminder or place holder, or to tweak the second line in the case we also specified ctime here and we don’t want touch it (first match wins).

Right?

[EDIT]:

This time (still above), atime is sent, ctime is not sent, and all other xattr are sent. Furthermore, default Deny being overridden by the “Permit-all-remaining-unmatched-above” last line (* box checked), the first line is useless, unless we want it as a reminder or place holder, or to tweak the second line in the case we also specified atime here and we don’t want touch it (first match wins).

Right?

Let me try to give some answers…

No. In fact, commas are valid as part of extended attribute names, so that would be bad.

To limit the size of data. Because this data gets stored in the file metadata (index) and sent around everywhere. So one is effectively a limit on len(name)+len(value) (“entry size”) and the other is a limit on the sum of that (“total size”), per file.

(example one) Yes, as it says default: permit, everything is sent.

(example two) Yes, I think your reasoning is correct. You’ll note the GUI stopped saying default: deny when you added an explicit deny-all at the end.

(example three) Yep.

Except for both the last examples you are filtering an attribute called atime,user.comment, which is a possible name on some systems, not anything comma separated.

Thanks for lights Jakob. So as a rule of thumb, a single attribute per line.

1 Like

And again, many thanks for this jewel Syncthing.

1 Like