linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Borzenkov <arvidjaar@gmail.com>
To: Chris Murphy <lists@colorremedies.com>
Cc: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>,
	Kai Krakow <hurikhan77@gmail.com>,
	Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: Re: 64-btrfs.rules and degraded boot
Date: Wed, 6 Jul 2016 21:29:44 +0300	[thread overview]
Message-ID: <CAA91j0WN85uzYJWbUCXjWWyzg2JS_5or8dHh4PRvpgu3U6LeJA@mail.gmail.com> (raw)
In-Reply-To: <CAJCQCtRd-=RYAVWJBoVKPLU3-jx0T1oQgmhJwBM01j9zpFsUvg@mail.gmail.com>

On Wed, Jul 6, 2016 at 9:23 PM, Chris Murphy <lists@colorremedies.com> wrote:
>>> [root@f24s ~]# btrfs fi show
>>> warning, device 2 is missing
>>> Label: none  uuid: 96240fd9-ea76-47e7-8cf4-05d3570ccfd7
>>>     Total devices 3 FS bytes used 2.26GiB
>>>     devid    3 size 50.00GiB used 3.01GiB path /dev/mapper/VG-3
>>>     *** Some devices missing
>>>
>>> [root@f24s ~]# btrfs device ready /dev/mapper/VG-3
>>> [root@f24s ~]#
>>
>> You won't get any output from it regardless, you have to check the return
>> code as it's intended to be a tool for scripts and such.
>
> How do I check the return code? When I use strace, no matter what I'm getting
>
> +++ exited with 0 +++
>
> I see both 'brfs device ready' and the udev btrfs builtin test are
> calling BTRFS_IOC_DEVICES_READY so, it looks like udev is not using
> user space tools to check but rather a btrfs ioctl.

Correct. It is possible that ioctl returns correct result only the
very first time; notice that in your example btrfs had seen all other
devices at least once while at boot it is really the case of other
devices missing so far.

Which returns us to the question - how we can reliably query kernel
about mountability of filesystem.

> So clearly that
> works or I wouldn't have stalled boots when all devices aren't
> present.
>
> --
> Chris Murphy

  reply	other threads:[~2016-07-06 18:29 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-05 18:53 64-btrfs.rules and degraded boot Chris Murphy
2016-07-05 19:27 ` Kai Krakow
2016-07-05 19:30   ` Chris Murphy
2016-07-05 20:10     ` Chris Murphy
2016-07-06  9:51       ` Andrei Borzenkov
2016-07-06 11:45         ` Austin S. Hemmelgarn
2016-07-06 11:55           ` Andrei Borzenkov
2016-07-06 12:14             ` Austin S. Hemmelgarn
2016-07-06 12:39               ` Andrei Borzenkov
2016-07-06 12:48                 ` Austin S. Hemmelgarn
2016-07-07 16:52                   ` Goffredo Baroncelli
2016-07-07 18:23                     ` Austin S. Hemmelgarn
2016-07-07 18:58                       ` Chris Murphy
2016-07-07 19:14                         ` Chris Murphy
2016-07-07 19:59                         ` Austin S. Hemmelgarn
2016-07-07 20:20                           ` Chris Murphy
2016-07-08 12:24                             ` Austin S. Hemmelgarn
2016-07-11 21:07                               ` Chris Murphy
2016-07-12 15:34                                 ` Austin S. Hemmelgarn
2016-07-07 20:13                         ` Goffredo Baroncelli
2016-07-07 19:41                       ` Goffredo Baroncelli
2016-07-06 12:49             ` Tomasz Torcz
2016-07-06 17:19         ` Chris Murphy
2016-07-06 18:04           ` Austin S. Hemmelgarn
2016-07-06 18:23             ` Chris Murphy
2016-07-06 18:29               ` Andrei Borzenkov [this message]
2016-07-06 19:17               ` Austin S. Hemmelgarn
2016-07-06 20:00                 ` Chris Murphy
2016-07-07 17:00                   ` Goffredo Baroncelli
2016-07-06 18:24           ` Andrei Borzenkov
2016-07-06 18:57             ` Chris Murphy
2016-07-07 17:07               ` Goffredo Baroncelli
2016-07-07 16:37 ` Goffredo Baroncelli

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=CAA91j0WN85uzYJWbUCXjWWyzg2JS_5or8dHh4PRvpgu3U6LeJA@mail.gmail.com \
    --to=arvidjaar@gmail.com \
    --cc=ahferroin7@gmail.com \
    --cc=hurikhan77@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=lists@colorremedies.com \
    /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).