[PATCH v4 0/4] mkfs: add ability to populate filesystem from directory

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently the only way to pre populate an XFS partition is via the prototype
file. While it works it has some limitations like:
  - not allowed spaces in file names
  - not preserving timestamps of original inodes

This series adds a new -P option to mkfs.xfs that allows users to
populate a newly created filesystem directly from an existing directory.
While similar to the prototype functionality, this doesn't require writing
a prototype file.
The implementation preserves file and directory attributes (ownership,
permissions, timestamps) from the source directory when copying content to
the new filesystem.

[v1] -> [v2]
  remove changes to protofile spec
  ensure backward compatibility
[v2] -> [v3]
  use inode_set_[acm]time() as suggested
  avoid copying atime and ctime
  they are often problematic for reproducibility, and
  mtime is the important information to preserve anyway
[v3] -> [v4]
  rewrite functionality to populate directly from an input directory
  this is similar to mkfs.ext4 option.

Luca Di Maio (4):
  proto: expose more functions from proto
  mkfs: add -P flag to populate a filesystem from a directory
  man: document -P flag to populate a filesystem from a directory
  populate: add ability to populate a filesystem from a directory

 man/man8/mkfs.xfs.8.in |   7 +
 mkfs/Makefile          |   2 +-
 mkfs/populate.c        | 287 +++++++++++++++++++++++++++++++++++++++++
 mkfs/populate.h        |   4 +
 mkfs/proto.c           |  33 ++---
 mkfs/proto.h           |  22 ++++
 mkfs/xfs_mkfs.c        |  22 +++-
 7 files changed, 352 insertions(+), 25 deletions(-)
 create mode 100644 mkfs/populate.c
 create mode 100644 mkfs/populate.h

Signed-off-by: Luca Di Maio <luca.dimaio1@xxxxxxxxx>

--
2.49.0




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux