mirror of
https://github.com/versity/versitygw.git
synced 2026-10-22 14:22:40 +00:00
The previous revision hard-coded .zfs next to .sgwtmp in the ListObjects, ListObjectsV2 and ListObjectVersions walks. That hides a directory named .zfs on filesystems that don't have ZFS snapshots, and it gives an operator no way to exclude a different control directory. Add PosixOpts.ExcludeDirs and build the effective skip list once in New from the gateway's own metadata directory plus the configured entries, so all three listing operations read the same list. The new --exclude-dirs flag (VGW_EXCLUDE_DIRS) exposes it, so a dataset mounted with snapdir=visible is handled with --exclude-dirs .zfs. .zfs isn't in the default list: on a filesystem without ZFS snapshots a directory with that name is ordinary bucket content. An operator who needs the skip sets --exclude-dirs .zfs.