linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrei Popa <ierdnah@gmail.com>
To: Stefan Behrens <sbehrens@giantdisaster.de>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH v3 0/3] Btrfs-progs: support get/reset device stats via ioctl
Date: Wed, 16 May 2012 20:03:04 +0300	[thread overview]
Message-ID: <1337187784.1525.6.camel@ierdnac-hp> (raw)
In-Reply-To: <1337187058-560-1-git-send-email-sbehrens@giantdisaster.de>

Hi,

It would be nice if this function could show the file names affected by
errors, in case of a single, non-redundant drive, btrfs-progs should
show what files are affected by errors.
Then, an admin could restore only those files from backup.

On Wed, 2012-05-16 at 18:50 +0200, Stefan Behrens wrote:
> "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
> 
> 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    |  113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  cmds-inspect.c   |    1 +
>  cmds-scrub.c     |   72 +---------------------------------
>  cmds-subvolume.c |    1 +
>  commands.h       |    3 --
>  common.c         |   46 ----------------------
>  ctree.h          |    6 +++
>  ioctl.h          |   27 +++++++++++++
>  man/btrfs.8.in   |   14 +++++++
>  print-tree.c     |    6 +++
>  utils.c          |   97 +++++++++++++++++++++++++++++++++++++++++++++-
>  utils.h          |    7 ++++
>  15 files changed, 275 insertions(+), 151 deletions(-)
>  delete mode 100644 common.c
> 



  parent reply	other threads:[~2012-05-16 17:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-16 16:50 [PATCH v3 0/3] Btrfs-progs: support get/reset device stats via ioctl Stefan Behrens
2012-05-16 16:50 ` [PATCH v3 1/3] Btrfs-progs: move open_file_or_dir() to utils.c Stefan Behrens
2012-05-16 16:50 ` [PATCH v3 2/3] Btrfs-progs: make two utility functions globally available Stefan Behrens
2012-05-16 16:50 ` [PATCH v3 3/3] Btrfs-progs: add command to get/reset device stats via ioctl Stefan Behrens
2012-05-16 17:03 ` Andrei Popa [this message]
2012-05-17  8:44   ` [PATCH v3 0/3] Btrfs-progs: support " Stefan Behrens
2012-05-17  9:18     ` Andrei Popa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337187784.1525.6.camel@ierdnac-hp \
    --to=ierdnah@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sbehrens@giantdisaster.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).