linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lennart Poettering <lennart@poettering.net>
To: Josef Bacik <josef@redhat.com>
Cc: Christoph Hellwig <hch@infradead.org>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs: add a disk info ioctl to get the disks attached to a filesystem
Date: Wed, 29 Sep 2010 02:19:54 +0200	[thread overview]
Message-ID: <20100929001954.GA9182@tango.0pointer.de> (raw)
In-Reply-To: <20100929000809.GC32420@dhcp231-156.rdu.redhat.com>

On Tue, 28.09.10 20:08, Josef Bacik (josef@redhat.com) wrote:

> 
> On Tue, Sep 28, 2010 at 07:25:13PM -0400, Christoph Hellwig wrote:
> > On Tue, Sep 28, 2010 at 04:53:16PM -0400, Josef Bacik wrote:
> > > This was a request from the systemd guys.  They need a quick and easy way to get
> > > all devices attached to a Btrfs filesystem in order to check if any of the disks
> > > are SSD for...something, I didn't ask :).   I've tested this with the
> > > btrfs-progs patch that accompanies this patch.  Thanks,
> > 
> > So please tell the "systemd guys" to explain what the fuck they're doing
> > to linux-fsdevel and fiend a proper interface.  Chance is they will fuck
> > up as much as just about ever other lowlevel userspace tool are very
> > high.
> > 
> 
> Lennart? :).  And Christoph, what would be a good interface?  LVM has a slaves/
> subdir in sysfs which symlinks to all of their dev's, would you rather I
> resurrect the sysfs stuff for Btrfs and do a similar thing?  I'm open to
> suggestions, I just took the quick and painless way out.  Thanks,

When doing readahead you want to know whether you are on SSD or rotating
media, because you a) want to order the readahead requests on bootup
after access time on SSD and after location on disk on rotating
media. And b) because you might want to priorize readahead reads over
other reads on rotating media, but prefer other reads over readahead
reads on SSD.

This in fact is how all current readahead implementations work, be it
the fedora, the suse or ubuntu's readahead or Arjan's sreadahead. What's
new is that in the systemd case we try to test for ssd/rotating
properly, instead of just hardcoding a check for
/sys/class/block/sda/queue/rotational.

I hope this explains what the fuck we are doing.

Lennart

-- 
Lennart Poettering - Red Hat, Inc.

  reply	other threads:[~2010-09-29  0:19 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 [this message]
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=20100929001954.GA9182@tango.0pointer.de \
    --to=lennart@poettering.net \
    --cc=hch@infradead.org \
    --cc=josef@redhat.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 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).