
On Mon, 7 Apr 2014, Chris Samuel wrote:
On Mon, 7 Apr 2014 05:11:30 PM Trent W. Buck wrote:
Avi Miller <avi.miller@gmail.com> writes:
The rotational = 0 means it’s non-spinning, so that’s fine.
Does this change anything *other than* making -o ssd the default?
Doesn't appear to, no.
if (!btrfs_test_opt(tree_root, SSD) && !btrfs_test_opt(tree_root, NOSSD) && !fs_info->fs_devices->rotating) { printk(KERN_INFO "BTRFS: detected SSD devices, enabling SSD " "mode\n"); btrfs_set_opt(fs_info->mount_opt, SSD); }
That fs-devices->rotating variable is populated when initialising or opening a btrfs device by something like:
· if (!blk_queue_nonrot(bdev_get_queue(bdev))) . · root->fs_info->fs_devices->rotating = 1;
I wonder if a fibre channel SAN gets marked as "non rotating"? It might be rotating today, and non-rotating tomorrow when the data is a bit hotter. I notice there's a lot of static tests in filesystem/RAID code that should be checked dynamically. I remember the 512 BIO bug that affects LVM/mdadm - add a USB disk to a raid array, and ext3 spits out warnings only because it falls back and does the right thing (albeit very slowly) when requests fail. But all the other FSs corrupt data instead. Oh looky here, a very similar bug to the one I reported upstream: https://bugzilla.redhat.com/show_bug.cgi?id=648885 -- Tim Connors