Thread (9 messages) 9 messages, 3 authors, 2014-09-22

Re: [PATCH 4/4] Default to acting like fsck.

From: David Sterba <hidden>
Date: 2014-09-22 13:13:10

On Mon, Sep 22, 2014 at 09:58:34AM +0100, Dimitri John Ledkov wrote:
On 21 September 2014 13:59, Tobias Geerinckx-Rice
[off-list ref] wrote:
quoted
On 21 September 2014 03:01, Dimitri John Ledkov [off-list ref] wrote:
quoted
Inspect arguments, if we are not called as btrfs, then assume we are
called to act like fsck.
[...]
quoted
-       if (!strcmp(bname, "btrfsck")) {
+       if (strcmp(bname, "btrfs") != 0) {
That's assuming a lot.

Silently (!) breaking people's btrfs-3.15_patched-DontRandomlyPanicV2
is a recipe for needless hair-pulling. Is there a reason for not using
something less like strstr(bname, "fsck") that I am missing?
Quite. This is verbatim patch as I have currently applied in Debian
packaging, and it was a fast fix to prevent breakage we had at one
point.

Indeed using "strstr(bname, "fsck")" would be better and sufficient to
resolve the problem we encountered (specifically fsck.btrfs -> btrfs
not acting like btrfs). Also using strstr, would fix btrfsck.my-build
to act like fsck tool.
The intention was to provide backward compatibility shortcut for
'btrfsck' -> 'btrfs check' and nothing else. The referenced bug is again
for 0.19 but there's an upstream-shipped stub fsck.btrfs (since 3.14)
that should avoid any packaging tricks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help