From: Patrick Schmid <schmid@phys.ethz.ch>
To: Btrfs BTRFS <linux-btrfs@vger.kernel.org>
Subject: btrfs replace status over 100%
Date: Wed, 16 Mar 2016 15:07:50 +0100 [thread overview]
Message-ID: <56E968B6.7030108@phys.ethz.ch> (raw)
Hi all
I had to replace an 10TiB disk. The replacing works well, but the status
shows me values over 100%!
btrfs replace status -1 /export/backup/group/dphys
209.5% done, 0 write errs, 0 uncorr. read errs
I use btrfs-progs version 4.0.1 (master) from
git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git
and im running a 4.5.0-rc4 kernel from
https://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git
I had done some calculations and the deviation of the status value is
around factor 4.
This mean 209.5% from the replace status is in real live only around 52.4%.
After source code digging, i stuck on the following kernel code lines:
fs/btrfs/dev-replace.c:674
case BTRFS_IOCTL_DEV_REPLACE_STATE_SUSPENDED:
srcdev = dev_replace->srcdev;
args->status.progress_1000 = div_u64(dev_replace->cursor_left,
div_u64(btrfs_device_get_total_bytes(srcdev), 1000));
is there a possibility that "dev_replace->cursor_left" and
"btrfs_device_get_total_bytes(srcdev)" dont have the same unit?
or I'm totally wrong?
Thanks Patrick
--
Patrick Schmid <schmid@phys.ethz.ch> support: +41 44 633 2668
IT Services Group, HPT H 8 voice: +41 44 633 3997
Departement Physik, ETH Zurich
CH-8093 Zurich, Switzerland
reply other threads:[~2016-03-16 14:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=56E968B6.7030108@phys.ethz.ch \
--to=schmid@phys.ethz.ch \
--cc=linux-btrfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.