From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>, Petr Uzel <petr.uzel@suse.cz>
Cc: util-linux <util-linux@vger.kernel.org>
Subject: [PATCH 2/9] fdisk: API: add topology debug
Date: Sun, 17 Jun 2012 18:10:04 +0200 [thread overview]
Message-ID: <1339949404.2668.14.camel@offbook> (raw)
From: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
---
fdisk/fdisk.h | 1 +
fdisk/utils.c | 5 +++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/fdisk/fdisk.h b/fdisk/fdisk.h
index c645b24..9d17cdd 100644
--- a/fdisk/fdisk.h
+++ b/fdisk/fdisk.h
@@ -35,6 +35,7 @@
/* fdisk debugging flags/options */
#define FDISK_DEBUG_INIT (1 << 1)
#define FDISK_DEBUG_CONTEXT (1 << 2)
+#define FDISK_DEBUG_TOPOLOGY (1 << 3)
#define FDISK_DEBUG_ALL 0xFFFF
# define ON_DBG(m, x) do { \
diff --git a/fdisk/utils.c b/fdisk/utils.c
index 5bb4984..d105d8e 100644
--- a/fdisk/utils.c
+++ b/fdisk/utils.c
@@ -85,6 +85,11 @@ static int __discover_topology(struct fdisk_context *cxt)
if (!cxt->phy_sector_size) /* could not discover physical size */
cxt->phy_sector_size = cxt->sector_size;
+ DBG(TOPOLOGY, dbgprint("topology discovered for %s:\n"
+ "\tlogical/physical sector sizes: %ld/%ld\n"
+ "\tfdisk/minimal/optimal io sizes: %ld/%ld/%ld\n",
+ cxt->dev_path, cxt->sector_size, cxt->phy_sector_size,
+ cxt->io_size, cxt->optimal_io_size, cxt->min_io_size));
return 0;
}
--
1.7.4.1
reply other threads:[~2012-06-17 16:10 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=1339949404.2668.14.camel@offbook \
--to=dave@gnu.org \
--cc=kzak@redhat.com \
--cc=petr.uzel@suse.cz \
--cc=util-linux@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 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).