code: public synchronized void setUfsMode(Supplier<JournalContext> journalContext, AlluxioURI ufsPath,
        UfsMode ufsMode) throws InvalidPathException {
      LOG.info("Set ufs mode for {} to {}", ufsPath, ufsMode);
  
      String root = ufsPath.getRootPath();
      if (!mUfsRoots.contains(root)) {
        LOG.warn("No managed ufs for physical ufs path {}", root);
        throw new InvalidPathException(String.format("Unknown Ufs path %s", root));
      }
  
      mState.applyAndJournal(journalContext, UpdateUfsModeEntry.newBuilder()
          .setUfsPath(ufsPath.getRootPath())
          .setUfsMode(File.UfsMode.valueOf(ufsMode.name()))
          .build());
    }
docs: Set the operation mode the given physical ufs.
  
  @param journalContext the journal context
  @param ufsPath the physical ufs path (scheme and authority only)
  @param ufsMode the ufs operation mode
  @throws InvalidPathException if no managed ufs covers the given path