linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Btrfs-progs: support get/reset device stats via ioctl
@ 2012-05-25 14:07 Stefan Behrens
  2012-05-25 14:07 ` [PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c Stefan Behrens
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Stefan Behrens @ 2012-05-25 14:07 UTC (permalink / raw)
  To: linux-btrfs

"btrfs device stats" is used to retrieve and print the device stats.
"btrfs device stats -z" is used to atomically retrieve, reset and
print the stats.

In order to share two utility functions between scrub and the dev stats
code, these two functions are moved to utils.c and renamed.
Since these functions are using open_file_or_dir(), and since the linking
against utils.o and common.o was different, open_file_or_dir() was moved
from common.c to utils.c. And since that function makes use of the
function dirfd(3), the required XOPEN version was raised from 6 to 7.

Changes v1->v2:
- Remove a verbose printf()
- Cast u64 to unsigned long long for printf()
- Update the man page

Changes v2->v3:
- Rebase on Chris' current master branch
- Split the patch into three seperate patches because after rebasing,
  open_file_or_dir() was moved and additional changes had been necessary

Changes v3->v4:
- Add padding at end of ioctl structure

Changes v4->v5:
- The statistic members in the ioctl are now organized as an array of
  64 bit values. Symbolic names for the array indexes are defined in
  an enum, which also defines the max value

Stefan Behrens (3):
  Btrfs-progs: move open_file_or_dir() to utils.c
  Btrfs-progs: make two utility functions globally available
  Btrfs-progs: add command to get/reset device stats via ioctl

 Makefile         |    4 +-
 btrfsctl.c       |   28 -------------
 cmds-balance.c   |    1 +
 cmds-device.c    |  118 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
 cmds-inspect.c   |    1 +
 cmds-scrub.c     |   72 +--------------------------------
 cmds-subvolume.c |    1 +
 commands.h       |    3 --
 common.c         |   46 ---------------------
 ctree.h          |    6 +++
 ioctl.h          |   33 +++++++++++++++
 man/btrfs.8.in   |   14 +++++++
 print-tree.c     |    6 +++
 utils.c          |   97 +++++++++++++++++++++++++++++++++++++++++++-
 utils.h          |    7 ++++
 15 files changed, 286 insertions(+), 151 deletions(-)
 delete mode 100644 common.c

-- 
1.7.10.2


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

end of thread, other threads:[~2012-10-31 12:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-25 14:07 [PATCH v5 0/3] Btrfs-progs: support get/reset device stats via ioctl Stefan Behrens
2012-05-25 14:07 ` [PATCH v5 1/3] Btrfs-progs: move open_file_or_dir() to utils.c Stefan Behrens
2012-06-07 19:38   ` Goffredo Baroncelli
2012-06-08  7:30     ` Stefan Behrens
2012-10-31 10:34   ` Anand Jain
2012-10-31 11:37     ` Stefan Behrens
2012-10-31 12:37     ` Goffredo Baroncelli
2012-05-25 14:07 ` [PATCH v5 2/3] Btrfs-progs: make two utility functions globally available Stefan Behrens
2012-06-06 18:16   ` Hugo Mills
2012-06-07 12:35     ` Stefan Behrens
2012-05-25 14:07 ` [PATCH v5 3/3] Btrfs-progs: add command to get/reset device stats via ioctl Stefan Behrens

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