This adds support for syncing extended attributes on supported filesystem on Linux, macOS, FreeBSD and NetBSD. Windows is currently excluded because the APIs seem onerous and annoying and frankly the uses cases seem few and far between. On Unixes this also covers ACLs as those are stored as extended attributes. Similar to ownership syncing this will optional & opt-in, which two settings controlling the main behavior: one to "sync" xattrs (read & write) and another one to "scan" xattrs (only read them so other devices can "sync" them, but not apply any locally). Co-authored-by: Tomasz Wilczyński <twilczynski@naver.com>
This commit is contained in:
co-authored by
Tomasz Wilczyński
parent
8065cf7e97
commit
6cac308bcd
@@ -114,10 +114,15 @@ message FileInfo {
|
||||
// received (we make sure to zero it), nonetheless we need it on our
|
||||
// struct and to be able to serialize it to/from the database.
|
||||
uint32 local_flags = 1000;
|
||||
|
||||
// The version_hash is an implementation detail and not part of the wire
|
||||
// format.
|
||||
bytes version_hash = 1001;
|
||||
|
||||
// The time when the inode was last changed (i.e., permissions, xattrs
|
||||
// etc changed). This is host-local, not sent over the wire.
|
||||
int64 inode_change_ns = 1002;
|
||||
|
||||
bool deleted = 6;
|
||||
bool invalid = 7 [(ext.goname) = "RawInvalid"];
|
||||
bool no_permissions = 8;
|
||||
@@ -151,6 +156,10 @@ message Counter {
|
||||
message PlatformData {
|
||||
UnixData unix = 1 [(gogoproto.nullable) = true];
|
||||
WindowsData windows = 2 [(gogoproto.nullable) = true];
|
||||
XattrData linux = 3 [(gogoproto.nullable) = true];
|
||||
XattrData darwin = 4 [(gogoproto.nullable) = true];
|
||||
XattrData freebsd = 5 [(gogoproto.nullable) = true, (ext.goname) = "FreeBSD"];
|
||||
XattrData netbsd = 6 [(gogoproto.nullable) = true, (ext.goname) = "NetBSD"];
|
||||
}
|
||||
|
||||
message UnixData {
|
||||
@@ -171,6 +180,15 @@ message WindowsData {
|
||||
bool owner_is_group = 2;
|
||||
}
|
||||
|
||||
message XattrData {
|
||||
repeated Xattr xattrs = 1;
|
||||
}
|
||||
|
||||
message Xattr {
|
||||
string name = 1;
|
||||
bytes value = 2;
|
||||
}
|
||||
|
||||
// Request
|
||||
|
||||
message Request {
|
||||
|
||||
Reference in New Issue
Block a user