message: builder: align to 4k for uncompressed blob meta
  For uncompressed blob meta, keeping 4k alignment to make compatible
  with nydusd runtime, allowing runtime to use the blob meta in blob
  cache directory directly.
diff: @@ -6,8 +6,8 @@ use std::io::Write;
  use std::os::unix::ffi::OsStrExt;
  use anyhow::{Context, Result};
  -use nydus_utils::compress;
  use nydus_utils::digest::{self, DigestHasher, RafsDigest};
  +use nydus_utils::{compress, try_round_up_4k};
  use sha2::Digest;
  use storage::meta::{BlobChunkInfoOndisk, BlobMetaHeaderOndisk};
  @@ -84,6 +84,7 @@ impl Blob {
  pub fn dump_meta_data_raw(
  pos: u64,
  blob_meta_info: &[BlobChunkInfoOndisk],
  + compressor: compress::Algorithm,
  ) -> Result<(std::borrow::Cow<[u8]>, BlobMetaHeaderOndisk)> {
  let data = unsafe {
  std::slice::from_raw_parts(
  @@ -91,12 +92,12 @@ impl Blob {
  blob_meta_info.len() * std::mem::size_of::<BlobChunkInfoOndisk>(),
  )
  };
  - let (buf, compressed) = compress::compress(data, compress::Algorithm::Lz4Block)
  + let (buf, compressed) = compress::compress(data, compressor)
  .with_context(|| "failed to compress blob chunk info array".to_string())?;
  let mut header = BlobMetaHeaderOndisk::default();
  if compressed {
  - header.set_ci_compressor(compress::Algorithm::Lz4Block);
  + header.set_ci_compressor(compressor);
  } else {
  header.set_ci_compressor(compress::Algorithm::None);
  }
  @@ -117,7 +118,11 @@ impl Blob {
  if let Some(writer) = &mut blob_ctx.writer {
  let pos = writer.pos()?;
  - let (data, header) = Self::dump_meta_data_raw(pos, &blob_ctx.blob_meta_info)?;
  + let (data, header) = Self::dump_meta_data_raw(
  + pos,
  + &blob_ctx.blob_meta_info,
  + compress::Algorithm::Lz4Block,
  + )?;
  writer.write_all(&data)?;
  writer.write_all(header.as_bytes())?;
  @@ -126,10 +131,19 @@ impl Blob {
  blob_ctx.blob_hash.update(&data);
  blob_ctx.blob_hash.update(header.as_bytes());
  } else if let Some(stor) = ctx.blob_meta_storage.clone() {
  + // Dump blob meta to an independent local file, use uncompressed format.
  let mut writer = ArtifactWriter::new(stor, false)?;
  - let (data, header) = Self::dump_meta_data_raw(0, &blob_ctx.blob_meta_info)?;
  + let (data, header) =
  + Self::dump_meta_data_raw(0, &blob_ctx.blob_meta_info, compress::Algorithm::None)?;
  +
  writer.write_all(&data)?;
  + // For uncompressed blob meta, keeping 4k alignment to make compatible
  + // with nydusd runtime, allowing runtime to use the blob meta in blob
  + // cache directory directly.
  + let aligned_len: usize = try_round_up_4k(data.len() as u64).unwrap();
  + writer.write_all(&vec![0u8; aligned_len - data.len()])?;
  writer.write_all(header.as_bytes())?;
  +
  blob_ctx.blob_meta_header = header;
  }
  