Обновить internal/endpoint/endpoint.go
This commit is contained in:
@@ -631,7 +631,7 @@ func clientRoot(rootFS *zfs.DatasetPath, clientIdentity string) (*zfs.DatasetPat
|
||||
}
|
||||
|
||||
func (s *Receiver) clientRootFromCtx(ctx context.Context) *zfs.DatasetPath {
|
||||
// Патч: Игнорируем AppendClientIdentity и всегда возвращаем чистый root_fs
|
||||
// Всегда чистый root без client identity
|
||||
return s.conf.RootWithoutClientComponent.Copy()
|
||||
}
|
||||
|
||||
@@ -661,18 +661,18 @@ func (f subroot) MapToLocal(fs string) (*zfs.DatasetPath, error) {
|
||||
return nil, errors.Errorf("cannot map empty filesystem")
|
||||
}
|
||||
|
||||
// Убираем pool из source
|
||||
// Убираем pool name из source (hdd_...)
|
||||
if p.Length() > 1 {
|
||||
subpath := p.Copy()
|
||||
subpath.TrimNPrefixComps(1)
|
||||
p = subpath
|
||||
}
|
||||
|
||||
// Берём ТОЛЬКО первый компонент от localRoot (chunk_9XG1J8T0)
|
||||
// Всегда оставляем только root (chunk_9XG1J8T0)
|
||||
c := f.localRoot.Copy()
|
||||
if c.Length() > 0 {
|
||||
if c.Length() > 1 {
|
||||
rootOnly := c.Copy()
|
||||
rootOnly.TrimNPrefixComps(c.Length() - 1) // оставляем только chunk_...
|
||||
rootOnly.TrimNPrefixComps(c.Length() - 1)
|
||||
c = rootOnly
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user