linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] smalle cleanup + get_fs_info rework
@ 2013-03-11 23:12 Eric Sandeen
  2013-03-11 23:12 ` [PATCH 1/4] btrfs-progs: close fd on return from label get/set functions Eric Sandeen
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Eric Sandeen @ 2013-03-11 23:12 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-03-12 17:30 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-11 23:12 [PATCH 0/4] smalle cleanup + get_fs_info rework Eric Sandeen
2013-03-11 23:12 ` [PATCH 1/4] btrfs-progs: close fd on return from label get/set functions Eric Sandeen
2013-03-11 23:12 ` [PATCH 2/4] btrfs-progs: three new device/path helpers Eric Sandeen
2013-03-11 23:13 ` [PATCH 3/4] btrfs-progs: don't open-code mountpoint discovery in scrub cancel Eric Sandeen
2013-03-11 23:13 ` [PATCH 4/4] btrfs-progs: rework get_fs_info to remove side effects Eric Sandeen
2013-03-11 22:27   ` Eric Sandeen
2013-03-12  4:17   ` [PATCH 4/4 V2] " Eric Sandeen
2013-03-12 16:40     ` David Sterba
2013-03-12 17:30       ` David Sterba

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).