smalle cleanup + get_fs_info rework
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest4 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/4 | btrfs-progs: close fd on return from label get/set functionsutils.c | +2 | 0 replies | |
| 2/4 | btrfs-progs: three new device/path helpersutils.c utils.h | +87 | 0 replies | |
| 3/4 | btrfs-progs: don't open-code mountpoint discovery in scrub cancelcmds-scrub.c | +17 | 0 replies | |
| 4/4 | btrfs-progs: rework get_fs_info to remove side effectscmds-device.c cmds-replace.c cmds-scrub.c +2 more | +66 | 4 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/4] smalle cleanup + get_fs_info rework
The first patch is a trival close of fd on function returns, somehow missed that last go-round.
The next 3 are a little more substantial, working to avoid the nasty behavior of get_fs_info, closing & re-opening the callers' filehandle out of scope, if it needs to switch from device node to mountpoint.
(I suppose we could pass in *fd by reference, but this behavior just seems like a wrong, magical side effect for get_fs_info).
So instead, the callers use a helper to *always* wind up with the mountpoint opened, and get_fs_info() now *only* - well - only gets fs info. The previous behavior of "if given a device act only on that device; if given a mountpoint act on all devices" should persist; I guess that's the original intent.
It's really only lightly tested; it should mostly affect:
* btrfs device stats
* btrfs replace start
* btrfs scrub start
* btrfs scrub status
so any independent sanity testing of that would be great. It'l be nice if/when we get xfstests coverage of some of this to make it easier. :)
Thanks,
-Eric