All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Reed <joelwreed@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: btrfsctl -a doesn't find my btrfs
Date: Wed, 26 Aug 2009 15:11:20 -0400	[thread overview]
Message-ID: <4A9588D8.7020208@gmail.com> (raw)

If I scan I device with a btrfs with -A, it finds it:

(~/btrfs-progs-unstable) sudo ./btrfsctl -A /dev/sda5
operation complete
Btrfs v0.19-1-g4f89b6e-dirty

But when I do a "scan all devices", it can't find my btrfs on /dev/sda5:

(~/btrfs-progs-unstable) sudo ./btrfsctl -a
Scanning for Btrfs filesystems
failed to read /dev/sr0

I'm using btrfs-progs-unstable version 
4f89b6eb0718ade63152791db32794da78fbba70. Am I doing something wrong or 
misinterpreting how btrfsctl works?

I notice that "-a" does a:

     ret = btrfs_scan_one_device(fd, fullpath, &tmp_devices,
&num_devices,
               BTRFS_SUPER_INFO_OFFSET);

Whereas "-A" does a:

     fd = open("/dev/btrfs-control", O_RDWR);
     if (fd < 0) {
       perror("failed to open /dev/btrfs-control");
       exit(1);
     }

Followed by a:

  ret = ioctl(fd, BTRFS_IOC_SCAN_DEV, &args);

Should "-a" be taught to follow "-A"? I could make a patch if so...

jr

                 reply	other threads:[~2009-08-26 19:11 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4A9588D8.7020208@gmail.com \
    --to=joelwreed@gmail.com \
    --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 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.