private static @NotNull VFSAttributesStorage createAttributesStorage_makeStorage(@NotNull Path attributesFile) throws IOException {
    if (FSRecordsImpl.USE_STREAMLINED_ATTRIBUTES_IMPLEMENTATION) {
      //avg record size is ~60b, hence I've chosen minCapacity=64 bytes, and defaultCapacity= 2*minCapacity
      final SpaceAllocationStrategy allocationStrategy = new DataLengthPlusFixedPercentStrategy(
        /*min: */64, /*default: */ 128,
        /*max: */StreamlinedBlobStorageHelper.MAX_CAPACITY,
        /*percentOnTop: */30
      );
      final StreamlinedBlobStorage blobStorage;
      boolean nativeBytesOrder = true;
      if (FSRecordsImpl.USE_ATTRIBUTES_OVER_NEW_FILE_PAGE_CACHE && PageCacheUtils.LOCK_FREE_PAGE_CACHE_ENABLED) {
        LOG.info("VFS uses streamlined attributes storage (over new FilePageCache)");
        //RC: make page smaller for the transition period: new FPCache has quite a small memory and it's hard
        //    to manage huge 10Mb pages having only ~100-150Mb budget in total, it ruins large-numbers assumptions
        int pageSize = 1 << 20;//PageCacheUtils.DEFAULT_PAGE_SIZE,
        blobStorage = IOUtil.wrapSafely(
          new PagedFileStorageWithRWLockedPageContent(
            attributesFile,
            PERSISTENT_FS_STORAGE_CONTEXT,
            pageSize,
            nativeBytesOrder,
            PageContentLockingStrategy.LOCK_PER_PAGE
          ),
          storage -> new StreamlinedBlobStorageOverLockFreePagedStorage(storage, allocationStrategy)
        );
      }
      else if (FSRecordsImpl.USE_ATTRIBUTES_OVER_MMAPPED_FILE) {
        LOG.info("VFS uses streamlined attributes storage (over mmapped file)");
        int pageSize = 1 << 24;//16Mb
        blobStorage = MMappedFileStorageFactory.withDefaults()
          .pageSize(pageSize)
          //mmapped and !mmapped storages have the same binary layout, so mmapped storage could inherit all the
          // data from non-mmapped -- the only 'migration' needed is to page-align the file:
          .ifFileIsNotPageAligned(EXPAND_FILE)
          .wrapStorageSafely(
            attributesFile,
            storage -> new StreamlinedBlobStorageOverMMappedFile(storage, allocationStrategy)
          );
      }
      else {
        LOG.info("VFS uses streamlined attributes storage (over regular FilePageCache)");
        blobStorage = IOUtil.wrapSafely(
          new PagedFileStorage(
            attributesFile,
            PERSISTENT_FS_STORAGE_CONTEXT,
            PageCacheUtils.DEFAULT_PAGE_SIZE,
            /*valuesAreAligned: */ true,
            nativeBytesOrder
          ),
          storage -> new StreamlinedBlobStorageOverPagedStorage(storage, allocationStrategy)
        );
      }
      return new AttributesStorageOverBlobStorage(blobStorage);
    }
    else {
      LOG.info("VFS uses regular attributes storage");
      boolean bulkAttrReadSupport = false;
      boolean inlineAttributes = true;
      return new AttributesStorageOld(
        bulkAttrReadSupport,
        inlineAttributes,
        new Storage(attributesFile, PersistentFSConnection.REASONABLY_SMALL) {
          @Override
          protected AbstractRecordsTable createRecordsTable(@NotNull StorageLockContext context,
                                                            @NotNull Path recordsFile) throws IOException {
            return new CompactRecordsTable(recordsFile, context, false);
          }
        });
    }
  }
private static @NotNull VFSAttributesStorage createAttributesStorage_makeStorage(@NotNull Path attributesFile)