>Detail: > > The SAM-QFS daemons 'sam-stagerd' and 'sam-arcopy' are currently > reading and writing a tape format that is a slightly modified version > of a format used by a very old version of GNU tar. The older GNU tar > format was modified for SAM-QFS because it didn't satify the project's > needs for file size and long file names. > > The SAM-QFS team would like to modify these daemons to read and write > a pax compliant tar format, as described in [1]. > > The default behavior will call for 'sam-arcopy' to continue writing > the old-style tar format. The new format can be selected by setting a > new 'tar_format = posix' option in the existing SAM-QFS config file, > /etc/opt/SUNWsamfs/defaults.conf.
Why isn't this 'tar_format = pax'? The POSIX standard specifies three archive formats: cpio, ustar, and pax. Saying 'tar_format = posix' doesn't make it clear that you mean pax format. I assume you mean pax format because the ustar format has a 12 octet field for size (giving a maxiximum file size of 999,999,999,999 bytes), and prefix and name fields of 155 and 100 octets, respectively (giving a maximum pathname length of 256 bytes; and you can get this maximum only if the final component of the pathname is exactly 100 bytes long and the pathname of all of its parent directories from the current working directory is exactly 155 bytes long). > > The 'sam-stagerd' daemon will read the tape by validating the magic in > the tar header. If the old GNU magic of "ustar[sp][sp][null]" is > found then the old format is read. If the new magic of > "ustar[null]00" is found then the new format will be read. In the standard, ustar and pax archive formats have magic as a 6 octet field. Am I correct in assuming that you mean magic will be set to "ustar" (with a trailing null byte) and version will be set to "00" (with no trailing null) as specified for the ustar and pax archive formats? > > If an old version of SAM-QFS attempts to read a new pax format tar > header it will declare the file 'damaged', which is an existing > SAM-QFS concept. No legacy patch is planned, and this incompatibility > will be documented for customers. > > The SAM-QFS 'sls -D' command and option, a SAM-QFS-aware version of > ls(1), will be modified to report the tape format used for the given > file, if that file is currently on tape. It will make this decision > based on an available bit in the on-disk inode, which is currently > zeroed on existing SAM-QFS filesystems. > > A new versioned library, libpax_xhdr.so, will be added to SAM-QFS. > This library is created by abstracting the tar-specific bits out of > 'stager' and 'arcopy'. Rather than factor tar, pax, stager, and arcopy internals into a new library, why not just invoke the pax utility to read and write pax archives? If you use pax instead of rewriting stager and arcopy, you will be able to read several forms of cpio archive formats, standard ustar format, and standard pax format when you read archives without specifying the format. The pax utility autodetects these formats.
