linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josef Bacik <josef@redhat.com>
To: kreijack@libero.it
Cc: Josef Bacik <josef@redhat.com>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: add a disk info ioctl to get the disks attached to a filesystem
Date: Tue, 28 Sep 2010 20:24:33 -0400	[thread overview]
Message-ID: <20100929002433.GD32420@dhcp231-156.rdu.redhat.com> (raw)
In-Reply-To: <201009290028.52133.kreijack@libero.it>

On Wed, Sep 29, 2010 at 12:28:51AM +0200, Goffredo Baroncelli wrote:
> Hi Josef,
> 
> what about using your ioctl to exporting also other info ? For example devid, 
> size, bytes, uuid ...
> 
> I know that btrfs filesystem-show does the same, but it reads the partition 
> (the disk) instead of query the filesystem. That means:
> - It work even for unmounted filesystem (which is good)
> - The results are inaccurate for a mounted filesystem, because the read data 
> is not valid until a flush of the pages (which is bad.. very bad).
>

Well a) the data on disk is always valid, thats the point :).  And b) the only
way the data is not uptodate is if we happened to add/remove/resize a disk right
before running btrfs-show, something that isn't going to happen often.  So I
think btrfs-show solves this problem well enough.  My ioctl is to give apps a
nice quick programmable way to get the list of disks in the fs so they can do
whatever they want instead of having to ship a libbtrfs or some such thing and
make them use that.  Thanks,

Josef

  reply	other threads:[~2010-09-29  0:24 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-28 20:53 [PATCH] Btrfs: add a disk info ioctl to get the disks attached to a filesystem Josef Bacik
2010-09-28 22:28 ` Goffredo Baroncelli
2010-09-29  0:24   ` Josef Bacik [this message]
2010-09-28 23:25 ` Christoph Hellwig
2010-09-29  0:08   ` Josef Bacik
2010-09-29  0:19     ` Lennart Poettering
2010-09-29  7:25       ` Ric Wheeler
2010-09-29  8:04         ` Kay Sievers
2010-09-29 23:43           ` Christoph Hellwig
2010-09-30  0:32             ` Josef Bacik
2010-09-30  7:43             ` Kay Sievers
2010-09-30 12:38               ` Josef Bacik
2010-09-30 13:47               ` Andi Kleen
2010-09-30 19:48             ` Josef Bacik
2010-09-30 19:59               ` Kay Sievers
2010-09-30 20:37                 ` Lennart Poettering
2010-09-29 11:59         ` Lennart Poettering
2010-09-29 12:08           ` Ric Wheeler
2010-09-29 12:19   ` Kay Sievers

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=20100929002433.GD32420@dhcp231-156.rdu.redhat.com \
    --to=josef@redhat.com \
    --cc=kreijack@libero.it \
    --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).