From: "Darrick J. Wong" <djwong@kernel.org>
To: Daan De Meyer <daan.j.demeyer@gmail.com>
Cc: linux-xfs@vger.kernel.org
Subject: Re: mkfs.xfs protofile and paths with spaces
Date: Tue, 24 Jan 2023 17:53:47 -0800 [thread overview]
Message-ID: <Y9CLq0vtmwIDUl92@magnolia> (raw)
In-Reply-To: <CAO8sHc=t1nnLrQDL26zxFA5MwjYHNWTg16tN0Hi+5=s49m5Xxg@mail.gmail.com>
On Mon, Jan 23, 2023 at 10:13:12PM +0100, Daan De Meyer wrote:
> Hi,
>
> We're trying to use mkfs.xfs's "-p" protofile option for unprivileged
> population of XFS filesystems. However, the man page does not specify
> how to encode filenames with spaces in them. Spaces are used as the
> token delimiter so I was wondering if there's some way to escape
> filenames with spaces in them?
Spaces in filenames apparently weren't common when protofiles were
introduced in the Fourth Edition Unix in November 1973[1], so that
wasn't part of the specification for them:
"The prototype file contains tokens separated by spaces or new
lines."
The file format seems to have spread to other filesystems (minix, xenix,
afs, jfs, aix, etc.) without anybody adding support for spaces in
filenames.
One could make the argument that the protofile parsing code should
implicitly 's/\// /g' in the filename token since no Unix supports
slashes in directory entries, but that's not what people have been
doing for the past several decades.
At this point, 50 years later, it probably would make more sense to
clone the mke2fs -d functionality ("slurp up this directory tree") if
there's interest? Admittedly, at this point it's so old that we ought
to rev the entire format.
[1] https://dspinellis.github.io/unix-v4man/v4man.pdf (page 274)
or https://man.cat-v.org/unix-6th/8/mkfs
--D
> Cheers,
>
> Daan De Meyer
next prev parent reply other threads:[~2023-01-25 1:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-23 21:13 mkfs.xfs protofile and paths with spaces Daan De Meyer
2023-01-25 1:53 ` Darrick J. Wong [this message]
2023-01-25 11:09 ` Daan De Meyer
2023-02-02 0:56 ` Darrick J. Wong
2023-02-02 8:46 ` Daan De Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y9CLq0vtmwIDUl92@magnolia \
--to=djwong@kernel.org \
--cc=daan.j.demeyer@gmail.com \
--cc=linux-xfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.