casd: Use <hash>.exec files when staging executable files with hardlinks

Support for creating and maintaining <hash>.exec blobs that are executable versions of the usual <hash> files. These files will still live in the typical 00-ff subdirectories, but just have the .exec suffix to distinguish them from their non-executable counterparts. The HardLinkStager will create these executable copies and will only stage these copies rather than the regular blobs.

  • LocalCas, LruLocalCas, and FsLocalCas now support methods to handle executable blobs separately (e.g. writeExecutableBlob, deleteExecutableBlob, etc)
    • listBlobs now takes a callback accepting an additional parameter (bool executable) for handling discovery of executable blobs
    • cleanup() in LruLocalCas will call the appropriate deleteBlob() / deleteExecutableBlob() based on the above
  • HardLinkStager will now create and stage an executable copy of a blob, rather than setting the permissions on the original
    • Note this requires the regular blob to already be present in CAS

This has the interesting case of staging a blob as both non-executable and also executable, which should both be hard-linked to its according variant.

Merge request reports

Loading
Loading