On Thu, 30.09.10 21:59, Kay Sievers (kay.siev...@vrfy.org) wrote: > > So my question is, is this what we want? Do I just need to quit bitching > > and > > make it work? Or am I doing something wrong? This is a completely new > > area for > > me so I'm just looking around at what md/dm does and trying to mirror it > > for my > > own uses, if thats not what I should be doing please tell me, otherwise this > > seems like alot of work for a very shitty solution to our problem. Thanks, > > 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. > > 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) printf("FS contains at least one SSD disk"); if (statvfs.f_flag & ST_ROTATING) printf("FS contains at least one rotating disk"); Lennart -- Lennart Poettering - Red Hat, Inc. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html