From: Duncan <1i5t5.duncan@cox.net>
To: linux-btrfs@vger.kernel.org
Subject: Re: btrfs check, btrfsck, fsck.btrfs
Date: Tue, 20 May 2014 23:02:01 +0000 (UTC) [thread overview]
Message-ID: <pan$bfe22$348a9807$13d86fd5$5784dae1@cox.net> (raw)
In-Reply-To: 9B5A4230-5A2F-4C00-AC4F-D9CA36A91620@colorremedies.com
Chris Murphy posted on Tue, 20 May 2014 10:56:26 -0600 as excerpted:
> Should the initrd/initramfs no longer include btrfsck, and instead
> include btrfs and fsck.btrfs?
btrfs (the program) should be included in any case as btrfs device scan
should be run (normally triggered via udev rules when a btrfs filesystem
block device is detected) to enable mounting multi-device btrfs' (the
filesystem) from within the initr*.
That's already the case with dracut's btrfs module, anyway, and has been
for some time.
> In btrfs-progs 3.14 there is now a 1K /sbin/fsck.btrfs placeholder file.
To be more exact, it's a nearly noop shell-script (basically copied from
fsck.xfs) that simply verifies that the passed in filename exists. If it
does, in auto-mode (if called automatically via a passno > 0 in fstab),
it exits without error. In non-auto-mode, it simply points the user at
btrfs check. If the device doesn't exist, it exits with "8" as the error
status. No check other than that the last parameter passed in is
actually an existing file, not even whether it's actually a device or
not, is done.
As btrfs (the filesystem) doesn't need a pre-mount check, the
recommendation is to set passno to 0 for btrfs in any case, in which case
fsck.btrfs shouldn't be needed at all.
As such, fsck.btrfs really shouldn't be needed in an initr*, since
whatever's creating the initr* shouldn't be running a pre-mount auto-fsck
against btrfs in any case, as to do so is certainly a bug.
(Tho with compression the incremental size of a single shell-script just
over 1 KiB in size before compression should be trivial.)
> btrfs and btrfsck files are the same binary, the difference is btrfsck
> only can do check/repair. Including btrfs instead allows more
> flexibility to use additional subcommands, and it's also consistent with
> fsck.btrfs which references btrfs not btrfsck.
Ideally, btrfsck would be a symlink to btrfs in btrfs-progs, and
potentially not included in an initr* at all, or if included, likewise
included as a symlink.
--
Duncan - List replies preferred. No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master." Richard Stallman
next prev parent reply other threads:[~2014-05-20 23:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 16:56 btrfs check, btrfsck, fsck.btrfs Chris Murphy
2014-05-20 23:02 ` Duncan [this message]
2014-05-21 0:26 ` Chris Murphy
[not found] ` <4QT21o01E1EMSLa01QT4fM>
2014-05-21 10:47 ` Duncan
2014-05-21 15:21 ` Chris Murphy
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='pan$bfe22$348a9807$13d86fd5$5784dae1@cox.net' \
--to=1i5t5.duncan@cox.net \
--cc=linux-btrfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).