bcachefs
bcachefs copied to clipboard
Rename sysfs device label attribute to group and minor time tweak
Inspired by this Reddit thread, I've changed the /sys/fs/bcachefs/<uuid>/dev-#/label
attribute to /sys/fs/bcachefs/<uuid>/dev-#/group
to more closely mirror the bcachefs format and show-super output (naming it "group" instead of "label").
Additionally, this replaces two current_kernel_time64() calls with calls to ktime_get_coarse_real_ts64() (to fix the time portion of #13). Also since ktime_get_coarse_real_ts64() was added in the 4.18 kernel, the change can be done now (unlike the chacha changes, which were done in 5.0).
@koverstreet would you mind taking a look at this when you have a moment?
Hey, sorry for neglecting this.
I was intending to rename group to level throughout, but then that conflicts with the label option for the filesystem label. I don't really like group, since it doesn't really describe the current functionality very well. Path would be better.
Got any suggestions?
On Sun, Feb 24, 2019 at 12:05 AM Tim Schlueter [email protected] wrote:
@koverstreet https://github.com/koverstreet would you mind taking a look at this when you have a moment?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/koverstreet/bcachefs/pull/14#issuecomment-466734770, or mute the thread https://github.com/notifications/unsubscribe-auth/AB5r7sgxIgzlwGHH0qIzMPIM44_RY0KZks5vQh2HgaJpZM4abyFp .
I don't really like level either because I think that implies that it's numeric data (level 1, level 5...) rather than a string/identifier as it currently is (and I think it's better to be a string here anyway).
I may have missed something, but I'm not seeing how path would describe the current functionality better than group. And at least for me, path generally refers to either a file path (/tmp/my/file
) or $PATH
. And since we're talking about disks, it seems somewhat logical to preface it with the word disk and "disk path" to me would convey something like /dev/sda
rather than the functionality represented here.
I find myself liking group because it seems to convey the functionality fairly well (as I understand it) from a user standpoint. A group is composed of one or more disks, and then when you're selecting a foreground/background/promote target, you can choose to either use individual disks, or you can choose to use a group of disks to handle it. And also I think that "disk group" conveys similar meaning, which I think would be useful.
I think foreground/background/promote path could make sense rather than "target", but that's a bit of a slightly different discussion than disk group vs path.
why not fallback to "tiers" instead of groups/ labels