In class IDiskRemote, all metadata file system operations use os file system api directly.
There is little extendiability if we want store the metadata of HDFS or S3 into distributed file system.
So I suggest change this way by using DiskPtr and will propose a pull request.

In addition, metadata of HDFS or S3 only store local FS which is not sharable.

{
public:
    RemoteFSPathKeeper(size_t chunk_limit_) : chunk_limit(chunk_limit_) {}
    virtual ~RemoteFSPathKeeper() = default;
    virtual void addPath(const String & path) = 0;
protected:
    size_t chunk_limit;
};
using RemoteFSPathKeeperPtr = std::shared_ptr<RemoteFSPathKeeper>;
class IAsynchronousReader;
using AsynchronousReaderPtr = std::shared_ptr<IAsynchronousReader>;
class IDiskRemote : public IDisk
{
friend class DiskRemoteReservation;
public:
    IDiskRemote(
        const String & name_,
        const String & remote_fs_root_path_,
        const String & metadata_path_,
        const String & log_name_,
        size_t thread_pool_size);
    struct Metadata;
    const String & getName() const final override { return name; }
    const String & getPath() const final override { return metadata_path; }
    Metadata readMeta(const String & path) const;
    Metadata createMeta(const String & path) const;
    Metadata readOrCreateMetaForWriting(const String & path, WriteMode mode);
    UInt64 getTotalSpace() const override { return std::numeric_limits<UInt64>::max(); }