From: Lennart Poettering <lennart@poettering.net>
To: Kay Sievers <kay.sievers@vrfy.org>
Cc: Josef Bacik <josef@redhat.com>,
Christoph Hellwig <hch@infradead.org>,
Ric Wheeler <rwheeler@redhat.com>,
linux-btrfs@vger.kernel.org, chris.mason@oracle.com
Subject: Re: [PATCH] Btrfs: add a disk info ioctl to get the disks attached to a filesystem
Date: Thu, 30 Sep 2010 22:37:32 +0200 [thread overview]
Message-ID: <20100930203732.GA27473@tango.0pointer.de> (raw)
In-Reply-To: <AANLkTin9=gRRWrJ66-UVkPCYHeyPQCmq9u2YoWEr1U3B@mail.gmail.com>
On Thu, 30.09.10 21:59, Kay Sievers (kay.sievers@vrfy.org) wrote:
> > So my question is, is this what we want? =A0Do I just need to quit =
bitching and
> > make it work? =A0Or am I doing something wrong? =A0This is a comple=
tely new area for
> > me so I'm just looking around at what md/dm does and trying to mirr=
or it for my
> > own uses, if thats not what I should be doing please tell me, other=
wise this
> > seems like alot of work for a very shitty solution to our problem. =
=A0Thanks,
>=20
> Yeah, that matches what I was experiencing when thinking about the
> options. Making a btrfs mount a fake blockdev of zero size seems like
> a pretty weird hack, just get some 'dead' directories in sysfs. A
> btrfs mount is just not a raw blockdev, and should probably not
> pretend to be one.
>=20
> I guess a statfs()-like call from the filesystem side and not the
> block side, which can put out such information in some generic way,
> would better fit here.
Note that for my particular usecase it would even suffice to have two
flags in struct statfs or struct statvfs that encode whether there's a =
at
least one SSD in the fs, resp. at least one rotating disk in the fs.
if (statvfs.f_flag & ST_SSD)=20
printf("FS contains at least one SSD disk");
if (statvfs.f_flag & ST_ROTATING)=20
printf("FS contains at least one rotating disk");
Lennart
--=20
Lennart Poettering - Red Hat, Inc.
--
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
next prev parent reply other threads:[~2010-09-30 20:37 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
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 [this message]
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=20100930203732.GA27473@tango.0pointer.de \
--to=lennart@poettering.net \
--cc=chris.mason@oracle.com \
--cc=hch@infradead.org \
--cc=josef@redhat.com \
--cc=kay.sievers@vrfy.org \
--cc=linux-btrfs@vger.kernel.org \
--cc=rwheeler@redhat.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 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.