public inbox for linux-btrfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Kay Sievers <kay.sievers@vrfy.org>
To: David Zeuthen <zeuthen@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: btrfs and /proc/self/mountinfo
Date: Sun, 12 Apr 2009 12:01:41 -0700	[thread overview]
Message-ID: <ac3eb2510904121201p66ee37a2gcd75aeea683ff254@mail.gmail.com> (raw)
In-Reply-To: <7b13a0f80904120735r41736455hb7e226ab8ad30bd7@mail.gmail.com>

On Sun, Apr 12, 2009 at 07:35, David Zeuthen <zeuthen@gmail.com> wrote:

> But we'd still need some kind of way of having the kernel tell user
> space what devices are currently claimed by the btrfs filesystem
> instance (and we'd need notifications on changes too). Otherwise we
> don't have enough information for the desktop shell and partitioning
> programs to let the user know that /dev/sdb2 or /dev/sdc1 or whatever
> is currently claimed by the 0:19 btrfs mount at /media/fedora-usb.
>
> One idea is to have a pollable file, /proc/fs/btrfs/devs, that maps
> from the dev_t of the btrfs filesystem instance (as used in
> /proc/self/mountinfo) to the set of dev_t for block devices currently
> claimed? E.g. for the example above we'd have
>
> =C2=A0/proc/fs/btrfs/devs:
> =C2=A00:19 =C2=A0 =C2=A08:18

Btrfs used to export some information in /sys/fs/btrfs/, this is
disabled for now. Maybe we can possibly make it export something like:
  $ tree /sys/fs/btrfs/
  /sys/fs/btrfs/
  |-- 969d1386-a002-4c28-94f2-47be23f344e4
  |   |-- ba1532f3-849b-400b-9c76-2c9aee126c52
  |   |   |-- device -> ../../../devices/.../block/sda/sda3
  |   |   |-- attribute1
  |   |   |-- ...
  |   `-- 45645656-849b-400b-9c76-2c9aee126c52
  |       |-- device -> ../../../devices/.../block/sdb/sdb3
  |       |-- attribute1
  |       ....
  `-- 645645686-a002-4c28-94f2-47be23f344e4
      |-- ...


So you could look for a "device" link at the subvolume devices? Or if
that does not fit for some reason, we could also add a "btrfs" class,
to export details about the subvolumes.

Thanks,
Kay
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2009-04-12 19:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-12 14:35 btrfs and /proc/self/mountinfo David Zeuthen
2009-04-12 19:01 ` Kay Sievers [this message]
2009-04-12 21:08   ` David Zeuthen
2009-04-12 23:19     ` Oliver Mattos
2009-04-13 13:40 ` Chris Mason

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=ac3eb2510904121201p66ee37a2gcd75aeea683ff254@mail.gmail.com \
    --to=kay.sievers@vrfy.org \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=zeuthen@gmail.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